test that struct-arrays and struct construction optimize down
parent
4bf4cacc4b
commit
ecd0bdbd58
|
@ -4,7 +4,8 @@ alien.structs.fields alien.syntax ascii classes.struct combinators
|
|||
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 combinators.short-circuit ;
|
||||
system tools.test compiler.tree.debugger struct-arrays
|
||||
classes.tuple.private ;
|
||||
IN: classes.struct.tests
|
||||
|
||||
<<
|
||||
|
@ -178,3 +179,14 @@ STRUCT: struct-test-array-slots
|
|||
[ y>> [ 8 3 ] dip set-nth ]
|
||||
[ y>> ushort-array{ 2 3 5 8 11 13 } sequence= ] bi
|
||||
] unit-test
|
||||
|
||||
STRUCT: struct-test-optimization
|
||||
{ x int } { y int } ;
|
||||
|
||||
[ t ] [ [ struct-test-optimization memory>struct y>> ] { memory>struct y>> } inlined? ] unit-test
|
||||
[ t ] [
|
||||
[ 3 struct-test-optimization <direct-struct-array> third y>> ]
|
||||
{ <tuple> <tuple-boa> memory>struct y>> } inlined?
|
||||
] unit-test
|
||||
|
||||
[ f ] [ [ memory>struct y>> ] { memory>struct y>> } inlined? ] unit-test
|
||||
|
|
Loading…
Reference in New Issue