test that array slots in structs optimize down

db4
Joe Groff 2009-08-26 21:50:12 -05:00
parent 08867f3576
commit 64990eb23d
1 changed files with 9 additions and 2 deletions

View File

@ -5,7 +5,7 @@ destructors io.encodings.utf8 io.pathnames io.streams.string
kernel libc literals math multiline namespaces prettyprint
prettyprint.config see sequences specialized-arrays.ushort
system tools.test compiler.tree.debugger struct-arrays
classes.tuple.private ;
classes.tuple.private specialized-arrays.direct.int ;
IN: classes.struct.tests
<<
@ -181,7 +181,7 @@ STRUCT: struct-test-array-slots
] unit-test
STRUCT: struct-test-optimization
{ x int } { y int } ;
{ x int[3] } { y int } ;
[ t ] [ [ struct-test-optimization memory>struct y>> ] { memory>struct y>> } inlined? ] unit-test
[ t ] [
@ -189,4 +189,11 @@ STRUCT: struct-test-optimization
{ <tuple> <tuple-boa> memory>struct y>> } inlined?
] unit-test
[ t ] [ [ struct-test-optimization memory>struct y>> ] { memory>struct y>> } inlined? ] unit-test
[ t ] [
[ struct-test-optimization memory>struct x>> second ]
{ memory>struct x>> <direct-int-array> <tuple> <tuple-boa> } inlined?
] unit-test
[ f ] [ [ memory>struct y>> ] { memory>struct y>> } inlined? ] unit-test