]> gitweb.factorcode.org Git - factor.git/commitdiff
compiler.cfg.instructions: forgot that ##box-displaced-alien needs a GC check; fixes...
authorSlava Pestov <slava@shill.local>
Thu, 27 Aug 2009 09:09:35 +0000 (04:09 -0500)
committerSlava Pestov <slava@shill.local>
Thu, 27 Aug 2009 09:09:35 +0000 (04:09 -0500)
basis/compiler/cfg/instructions/instructions.factor
basis/compiler/tests/codegen.factor

index bd9321429731de1cd4274c6a9ae4cea192cc8112..b98e24253db4db4ce6b536ea0aecf1f3846ce7f6 100644 (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 ;
 
index 5f06fc8d2a617d3782245aadae2b971f0783c57e..d45b4aa1512bea369edefd0c795fc373abe007bb 100644 (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
\ No newline at end of file
+[ 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
\ No newline at end of file