:- module region_builtin.
:- use_module builtin, io, private_builtin.
:- type region_builtin.region.
:- pragma foreign_type(c, region_builtin.region, "MR_RegionHeader *", [can_pass_as_mercury_type]).
:- pragma foreign_type(java, region_builtin.region, "java.lang.Object").
:- pragma foreign_type(csharp, region_builtin.region, "object").
:- pragma foreign_type(erlang, region_builtin.region, "").
:- pragma foreign_import_module("C", region_builtin).
:- pragma foreign_import_module("C#", region_builtin).
:- pragma foreign_import_module("Java", region_builtin).
:- pragma foreign_import_module("Erlang", region_builtin).
:- pragma foreign_import_module("C", io).
:- pragma foreign_import_module("C#", io).
:- pragma foreign_import_module("Java", io).
:- pragma foreign_import_module("IL", io).
:- pragma foreign_import_module("Erlang", io).
:- pragma foreign_import_module("C", io).
:- pragma foreign_import_module("C#", io).
:- pragma foreign_import_module("Java", io).
:- pragma foreign_import_module("IL", io).
:- pragma foreign_import_module("Erlang", io).
:- pragma foreign_import_module("C", time).
:- pragma foreign_import_module("C", string).
:- pragma foreign_import_module("C", bitmap).
:- pragma foreign_import_module("C#", bitmap).
:- pragma foreign_import_module("Java", bitmap).
:- pragma foreign_import_module("IL", bitmap).
:- pragma foreign_import_module("Erlang", bitmap).
:- pragma foreign_import_module("C", bitmap).
:- pragma foreign_import_module("C#", bitmap).
:- pragma foreign_import_module("Java", bitmap).
:- pragma foreign_import_module("IL", bitmap).
:- pragma foreign_import_module("Erlang", bitmap).
:- pragma foreign_import_module("C", time).
:- pragma foreign_import_module("C#", time).
:- pragma foreign_import_module("Java", time).
:- pragma foreign_import_module("IL", time).
:- pragma foreign_import_module("Erlang", time).
:- pragma foreign_import_module("C", time).
:- pragma foreign_import_module("C#", time).
:- pragma foreign_import_module("Java", time).
:- pragma foreign_import_module("IL", time).
:- pragma foreign_import_module("Erlang", time).
:- pragma foreign_import_module("C#", rtti_implementation).
:- pragma foreign_import_module("Java", rtti_implementation).
:- pragma foreign_import_module("C#", rtti_implementation).
:- pragma foreign_import_module("Java", rtti_implementation).
:- pragma foreign_proc("C", region_builtin.print_rbmm_profiling_info(_IO0 :: (builtin.di), _IO :: (builtin.uo)), [will_not_call_mercury, not_thread_safe, not_tabled_for_io, promise_pure, may_modify_trail], "
#ifdef MR_USE_REGIONS
    MR_region_print_profiling_info();
#else
    printf(
        \"There is no rbmm profiling info to print in a non-rbmm grade.\\n\");
#endif
").
:- pragma exceptions(predicate, (region_builtin.create_region), 1, 0, will_not_throw).
:- pragma exceptions(predicate, (region_builtin.remove_region), 1, 0, will_not_throw).
:- pragma exceptions(predicate, (region_builtin.print_rbmm_profiling_info), 2, 0, will_not_throw).
:- pragma termination_info(region_builtin.create_region((builtin.out)), infinite, cannot_loop).
:- pragma termination_info(region_builtin.remove_region((builtin.in)), finite(0, [no]), cannot_loop).
:- pragma termination_info(region_builtin.print_rbmm_profiling_info((builtin.di), (builtin.uo)), infinite, cannot_loop).
