Fix escape analysis bug reported by Doug
parent
b62630b5ac
commit
dedbd14945
|
@ -322,3 +322,9 @@ C: <ro-box> ro-box
|
|||
[ 0 ] [
|
||||
[ { null } declare [ 1 ] [ 2 ] if ] count-unboxed-allocations
|
||||
] unit-test
|
||||
|
||||
! Doug found a regression
|
||||
|
||||
TUPLE: empty-tuple ;
|
||||
|
||||
[ ] [ [ empty-tuple boa layout-of ] count-unboxed-allocations drop ] unit-test
|
|
@ -49,14 +49,10 @@ M: #push escape-analysis*
|
|||
|
||||
: slot-offset ( #call -- n/f )
|
||||
dup in-d>>
|
||||
[ first node-value-info class>> ]
|
||||
[ second node-value-info literal>> ] 2bi
|
||||
dup fixnum? [
|
||||
{
|
||||
{ [ over tuple class<= ] [ 2 - ] }
|
||||
{ [ over complex class<= ] [ 1 - ] }
|
||||
[ drop f ]
|
||||
} cond nip
|
||||
[ second node-value-info literal>> ]
|
||||
[ first node-value-info class>> ] 2bi
|
||||
2dup [ fixnum? ] [ tuple class<= ] bi* and [
|
||||
over 2 >= [ drop 2 - ] [ 2drop f ] if
|
||||
] [ 2drop f ] if ;
|
||||
|
||||
: record-slot-call ( #call -- )
|
||||
|
|
Loading…
Reference in New Issue