diff options
| author | Graydon Hoare <[email protected]> | 2010-06-25 15:43:55 -0700 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2010-06-25 15:43:55 -0700 |
| commit | 67d1f0a9aafaa7dcd63b86032127ab660e630c46 (patch) | |
| tree | c563f52cefc275b0e9d4fd56fdb74d224cd70df7 /src/boot/me | |
| parent | Return at end of GC glue. (diff) | |
| download | rust-67d1f0a9aafaa7dcd63b86032127ab660e630c46.tar.xz rust-67d1f0a9aafaa7dcd63b86032127ab660e630c46.zip | |
Emit gc glue and rearrange crate glue offsets slightly to have a regular order.
Diffstat (limited to 'src/boot/me')
| -rw-r--r-- | src/boot/me/semant.ml | 4 | ||||
| -rw-r--r-- | src/boot/me/trans.ml | 9 |
2 files changed, 11 insertions, 2 deletions
diff --git a/src/boot/me/semant.ml b/src/boot/me/semant.ml index b2ce7b79..41e6a55a 100644 --- a/src/boot/me/semant.ml +++ b/src/boot/me/semant.ml @@ -30,6 +30,7 @@ type glue = | GLUE_write of Ast.ty | GLUE_read of Ast.ty | GLUE_unwind + | GLUE_gc | GLUE_get_next_pc | GLUE_mark_frame of node_id (* node is the frame *) | GLUE_drop_frame of node_id (* node is the frame *) @@ -135,6 +136,7 @@ type ctxt = ctxt_spill_fixups: (node_id,fixup) Hashtbl.t; ctxt_abi: Abi.abi; ctxt_activate_fixup: fixup; + ctxt_gc_fixup: fixup; ctxt_yield_fixup: fixup; ctxt_unwind_fixup: fixup; ctxt_exit_task_fixup: fixup; @@ -218,6 +220,7 @@ let new_ctxt sess abi crate = ctxt_activate_fixup = new_fixup "activate glue"; ctxt_yield_fixup = new_fixup "yield glue"; ctxt_unwind_fixup = new_fixup "unwind glue"; + ctxt_gc_fixup = new_fixup "gc glue"; ctxt_exit_task_fixup = new_fixup "exit-task glue"; ctxt_debug_aranges_fixup = new_fixup "debug_aranges section"; @@ -1989,6 +1992,7 @@ let glue_str (cx:ctxt) (g:glue) : string = | GLUE_write ty -> "glue$write$" ^ (ty_str ty) | GLUE_read ty -> "glue$read$" ^ (ty_str ty) | GLUE_unwind -> "glue$unwind" + | GLUE_gc -> "glue$gc" | GLUE_get_next_pc -> "glue$get_next_pc" | GLUE_mark_frame i -> "glue$mark_frame$" ^ (item_str cx i) | GLUE_drop_frame i -> "glue$drop_frame$" ^ (item_str cx i) diff --git a/src/boot/me/trans.ml b/src/boot/me/trans.ml index af9a849b..a00f0b25 100644 --- a/src/boot/me/trans.ml +++ b/src/boot/me/trans.ml @@ -4891,9 +4891,10 @@ let trans_visitor Asm.WORD (word_ty_mach, Asm.M_SZ cx.ctxt_debug_info_fixup); crate_rel_word cx.ctxt_activate_fixup; - crate_rel_word cx.ctxt_exit_task_fixup; - crate_rel_word cx.ctxt_unwind_fixup; crate_rel_word cx.ctxt_yield_fixup; + crate_rel_word cx.ctxt_unwind_fixup; + crate_rel_word cx.ctxt_gc_fixup; + crate_rel_word cx.ctxt_exit_task_fixup; tab_sz cx.ctxt_required_rust_sym_num; tab_sz cx.ctxt_required_c_sym_num; @@ -4915,6 +4916,10 @@ let trans_visitor (fun e -> abi.Abi.abi_unwind e nabi_rust (upcall_fixup "upcall_exit")); + emit_aux_global_glue cx GLUE_gc + cx.ctxt_gc_fixup + abi.Abi.abi_gc; + ignore (get_exit_task_glue ()); begin |