We need to end the basic block after the ##prologue in the dispatch branch so that the GC check can go after the prologue

db4
sheeple 2008-11-10 02:58:05 -06:00
parent f53e9c654c
commit 5b7d40d9b4
2 changed files with 12 additions and 0 deletions

View File

@ -171,6 +171,7 @@ M: #if emit-node
[
V{ } clone node-stack set
##prologue
begin-basic-block
emit-nodes
basic-block get [
##epilogue

View File

@ -219,3 +219,14 @@ TUPLE: my-tuple ;
: bad-value-bug ( a -- b ) [ 3 ] [ 3 ] if f <array> ;
[ { f f f } ] [ t bad-value-bug ] unit-test
! PowerPC regression
TUPLE: id obj ;
: (gc-check-bug) ( a b -- c )
{ [ id boa ] [ id boa ] } dispatch ;
: gc-check-bug ( -- )
10000000 [ "hi" 0 (gc-check-bug) drop ] times ;
[ ] [ gc-check-bug ] unit-test