Fix inline GC check
parent
4de33f68cc
commit
3c149fecf0
|
@ -9,7 +9,6 @@
|
|||
- x86: load-allot-ptr doesn't have a stack effect? why?
|
||||
- mov 0x0(%esi),%ecx why?
|
||||
- mac intel: perhaps its not a good idea using ebx as allot-tmp-reg
|
||||
- RNG is broken
|
||||
- %allot-bignum-signed-2 still has issues on ppc
|
||||
- fix %allot-bignum-signed-1/2 on x86
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ USING: arrays generic hashtables inference io kernel math
|
|||
namespaces prettyprint sequences vectors words ;
|
||||
|
||||
! Set this to t so that end-basic-block compiles a GC check
|
||||
SYMBOL: maybe-gc
|
||||
: maybe-gc ( n -- ) \ maybe-gc get push ;
|
||||
|
||||
! Register allocation
|
||||
|
||||
|
@ -136,10 +136,12 @@ SYMBOL: phantom-r
|
|||
|
||||
: end-basic-block ( -- )
|
||||
finalize-contents finalize-heights
|
||||
maybe-gc get [
|
||||
maybe-gc off
|
||||
\ maybe-gc get dup empty? [
|
||||
drop
|
||||
] [
|
||||
delete-all
|
||||
"simple_gc" f %alien-invoke
|
||||
] when ;
|
||||
] if ;
|
||||
|
||||
: used-vregs ( -- seq ) phantoms append [ vreg? ] subset ;
|
||||
|
||||
|
@ -154,13 +156,14 @@ SYMBOL: phantom-r
|
|||
drop ;
|
||||
|
||||
: init-templates ( -- )
|
||||
maybe-gc off
|
||||
V{ } clone \ maybe-gc set
|
||||
<phantom-datastack> phantom-d set
|
||||
<phantom-callstack> phantom-r set
|
||||
compute-free-vregs ;
|
||||
|
||||
: keep-templates ( quot -- )
|
||||
[
|
||||
V{ } clone \ maybe-gc set
|
||||
phantom-d [ clone ] change
|
||||
phantom-r [ clone ] change
|
||||
compute-free-vregs
|
||||
|
|
|
@ -9,7 +9,7 @@ USING: kernel assembler kernel-internals namespaces math ;
|
|||
: %allot ( header size -- )
|
||||
#! Store a pointer to 'size' bytes allocated from the
|
||||
#! nursery in r11.
|
||||
maybe-gc on
|
||||
dup maybe-gc
|
||||
8 align ! align the size
|
||||
12 load-zone-ptr ! nusery -> r12
|
||||
11 12 cell LWZ ! nursery.here -> r11
|
||||
|
|
|
@ -21,7 +21,7 @@ USING: kernel assembler kernel-internals namespaces math ;
|
|||
allot-tmp-reg [] swap tag-header MOV ;
|
||||
|
||||
: %allot ( header size quot -- )
|
||||
maybe-gc on
|
||||
dup maybe-gc
|
||||
swap >r >r
|
||||
allot-tmp-reg PUSH
|
||||
load-allot-ptr
|
||||
|
|
Loading…
Reference in New Issue