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