I hear actually loading the next pointer into the right register helps when walking a list.

This commit is contained in:
Graydon Hoare 2010-06-25 17:31:08 -07:00
parent d601b357ec
commit eb7807c4fe

View File

@ -830,11 +830,6 @@ let gc_glue
push (ro eax);
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. *)
mov (rc edx) (c task_ptr);
mov (rc edx) (c (edx_n Abi.task_field_gc_alloc_chain));
@ -889,12 +884,16 @@ let gc_glue
pop (rc eax);
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));
emit (Il.jmp Il.JMP
(codefix repeat_jmp_fix)); (* loop *)
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;
;;