Skip to content

Commit

Permalink
rename function
Browse files Browse the repository at this point in the history
  • Loading branch information
StunxFS committed Jan 21, 2024
1 parent 0bf195f commit 2e3d51b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions lib/core/src/entry_point.ri
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -32,7 +32,7 @@ $if _TESTS_ {
test_runner.run();
}

drop_globals();
destroy_globals();
}
} else {
func main(_argc: int32, _argv: [&][&]uint8, mod_main: func()) {
Expand All @@ -45,6 +45,6 @@ $if _TESTS_ {
runtime_is_started = true;
mod_main();

drop_globals();
destroy_globals();
}
}
4 changes: 2 additions & 2 deletions lib/core/src/process.c.ri
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}
Expand All @@ -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);
}
}
8 changes: 4 additions & 4 deletions rivetc/src/codegen/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 2e3d51b

Please sign in to comment.