diff --git a/lib/core/src/entry_point.ri b/lib/core/src/entry_point.ri index bd3df583f..f3d86aeae 100644 --- a/lib/core/src/entry_point.ri +++ b/lib/core/src/entry_point.ri @@ -7,7 +7,7 @@ extern (Rivet) { func init_string_lits(); func init_globals(); - func drop_globals(); + func destroy_globals(); } func init_args(_argc: uint, _argv: [&][&]uint8) { @@ -32,7 +32,7 @@ $if _TESTS_ { test_runner.run(); } - drop_globals(); + destroy_globals(); } } else { func main(_argc: int32, _argv: [&][&]uint8, mod_main: func()) { @@ -45,6 +45,6 @@ $if _TESTS_ { runtime_is_started = true; mod_main(); - drop_globals(); + destroy_globals(); } } diff --git a/lib/core/src/process.c.ri b/lib/core/src/process.c.ri index 7c41d6e45..5f2fd7693 100644 --- a/lib/core/src/process.c.ri +++ b/lib/core/src/process.c.ri @@ -61,7 +61,7 @@ pub func process_panic(s: string := "", args: ...^Stringable) -> never { /// which typically means that the shell prints "Aborted". pub func process_abort() -> never { unsafe { - drop_globals(); + destroy_globals(); libc.abort(); } } @@ -73,7 +73,7 @@ pub func process_abort() -> never { /// OS and will be available for consumption by another process. pub func process_exit(code: int32 := 0) -> never { unsafe { - drop_globals(); + destroy_globals(); libc.exit(code); } } diff --git a/rivetc/src/codegen/__init__.py b/rivetc/src/codegen/__init__.py index ba16a26b0..350f8ef42 100644 --- a/rivetc/src/codegen/__init__.py +++ b/rivetc/src/codegen/__init__.py @@ -58,23 +58,23 @@ def gen_source_files(self, source_files): ir.GlobalVar(False, False, ir.DYN_ARRAY_T, "_R4core4ARGS") ) - # generate 'init_string_lits_fn' function + # generate 'init_string_lits' function self.init_string_lits_fn = ir.FuncDecl( False, ast.Attributes(), False, "_R4core16init_string_litsF", [], False, ir.VOID_T, False ) self.out_rir.decls.append(self.init_string_lits_fn) - # generate '_R4core12init_globalsF' function + # generate 'init_globals' function self.init_global_vars_fn = ir.FuncDecl( False, ast.Attributes(), False, "_R4core12init_globalsF", [], False, ir.VOID_T, False ) self.out_rir.decls.append(self.init_global_vars_fn) - # generate '_R12drop_globalsZ' function + # generate 'destroy_globals' function g_fn = ir.FuncDecl( - False, ast.Attributes(), False, "_R4core12drop_globalsF", [], False, + False, ast.Attributes(), False, "_R4core15destroy_globalsF", [], False, ir.VOID_T, False ) self.out_rir.decls.append(g_fn)