- 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
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
: 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 ;
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
: %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