mirror of
https://github.com/ProgramSnail/Lama.git
synced 2026-01-03 04:28:19 +00:00
Added tests + fixed bunch of bugs in GC implementation
This commit is contained in:
parent
3826c8dd32
commit
313997496d
9 changed files with 1577 additions and 1534 deletions
|
|
@ -17,7 +17,8 @@ __gc_stack_top: .long 0
|
|||
.extern gc_test_and_copy_root
|
||||
.text
|
||||
|
||||
__gc_init: movl %ebp, __gc_stack_bottom
|
||||
__gc_init:
|
||||
movl %ebp, __gc_stack_bottom
|
||||
addl $4, __gc_stack_bottom
|
||||
call __init
|
||||
ret
|
||||
|
|
@ -60,7 +61,9 @@ __gc_root_scan_stack:
|
|||
pushl %ebx
|
||||
pushl %edx
|
||||
movl __gc_stack_top, %eax
|
||||
jmp next
|
||||
// jmp next
|
||||
cmpl %eax, __gc_stack_bottom
|
||||
jb returnn
|
||||
|
||||
loop:
|
||||
movl (%eax), %ebx
|
||||
|
|
@ -106,7 +109,7 @@ gc_run_t:
|
|||
next:
|
||||
addl $4, %eax
|
||||
cmpl %eax, __gc_stack_bottom
|
||||
jne loop
|
||||
jnb loop
|
||||
returnn:
|
||||
movl $0, %eax
|
||||
popl %edx
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue