I hear actually loading the next pointer into the right register helps when walking a list.
This commit is contained in:
parent
d601b357ec
commit
eb7807c4fe
@ -820,7 +820,7 @@ let gc_glue
|
|||||||
let skip_jmp_fix = new_fixup "skip jump" in
|
let skip_jmp_fix = new_fixup "skip jump" in
|
||||||
let exit_jmp_fix = new_fixup "exit jump" in
|
let exit_jmp_fix = new_fixup "exit jump" in
|
||||||
|
|
||||||
mov (rc edx) (c task_ptr); (* switch back to rust stack *)
|
mov (rc edx) (c task_ptr); (* switch back to rust stack *)
|
||||||
mov
|
mov
|
||||||
(rc esp)
|
(rc esp)
|
||||||
(c (edx_n Abi.task_field_rust_sp));
|
(c (edx_n Abi.task_field_rust_sp));
|
||||||
@ -830,11 +830,6 @@ let gc_glue
|
|||||||
push (ro eax);
|
push (ro eax);
|
||||||
crawl_stack_calling_glue e Abi.frame_glue_fns_field_mark;
|
crawl_stack_calling_glue e Abi.frame_glue_fns_field_mark;
|
||||||
|
|
||||||
(* For now, stop after marking; sweep is still buggy. *)
|
|
||||||
pop (rc eax);
|
|
||||||
restore_callee_saves e;
|
|
||||||
Il.emit e Il.Ret;
|
|
||||||
|
|
||||||
(* Sweep pass. *)
|
(* Sweep pass. *)
|
||||||
mov (rc edx) (c task_ptr);
|
mov (rc edx) (c task_ptr);
|
||||||
mov (rc edx) (c (edx_n Abi.task_field_gc_alloc_chain));
|
mov (rc edx) (c (edx_n Abi.task_field_gc_alloc_chain));
|
||||||
@ -889,12 +884,16 @@ let gc_glue
|
|||||||
pop (rc eax);
|
pop (rc eax);
|
||||||
|
|
||||||
mark skip_jmp_fix;
|
mark skip_jmp_fix;
|
||||||
mov (rc ecx) (* Advance down chain *)
|
mov (rc edx) (* Advance down chain *)
|
||||||
(c (edx_n Abi.exterior_gc_slot_field_next));
|
(c (edx_n Abi.exterior_gc_slot_field_next));
|
||||||
emit (Il.jmp Il.JMP
|
emit (Il.jmp Il.JMP
|
||||||
(codefix repeat_jmp_fix)); (* loop *)
|
(codefix repeat_jmp_fix)); (* loop *)
|
||||||
mark exit_jmp_fix;
|
mark exit_jmp_fix;
|
||||||
emit Il.Ret;
|
|
||||||
|
(* For now, stop after marking; sweep is still buggy. *)
|
||||||
|
pop (rc eax);
|
||||||
|
restore_callee_saves e;
|
||||||
|
Il.emit e Il.Ret;
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user