compiler.cfg.instructions: forgot that ##box-displaced-alien needs a GC check; fixes segfault in benchmark.mandel

db4
Slava Pestov 2009-08-27 04:09:35 -05:00
parent f808f43ffb
commit 8f19f14c1f
2 changed files with 13 additions and 2 deletions

View File

@ -153,7 +153,12 @@ INSN: ##set-alien-double < ##alien-setter ;
! Memory allocation
INSN: ##allot < ##flushable size class temp ;
UNION: ##allocation ##allot ##box-float ##box-alien ##integer>bignum ;
UNION: ##allocation
##allot
##box-float
##box-alien
##box-displaced-alien
##integer>bignum ;
INSN: ##write-barrier < ##effect card# table ;

View File

@ -401,4 +401,10 @@ cell 4 = [
dup [ [ 1 fixnum+fast ] dip ] [ [ drop 1 ] dip ] if ;
[ 2 t ] [ 0 t global-dcn-bug-1 ] unit-test
[ 1 f ] [ 0 f global-dcn-bug-1 ] unit-test
[ 1 f ] [ 0 f global-dcn-bug-1 ] unit-test
! Forgot a GC check
: missing-gc-check-1 ( a -- b ) { fixnum } declare <alien> ;
: missing-gc-check-2 ( -- ) 10000000 [ missing-gc-check-1 drop ] each-integer ;
[ ] [ missing-gc-check-2 ] unit-test