From 64990eb23de1c190ba36a540a3a3e3df1860e3cf Mon Sep 17 00:00:00 2001 From: Joe Groff <arcata@gmail.com> Date: Wed, 26 Aug 2009 21:50:12 -0500 Subject: [PATCH] test that array slots in structs optimize down --- basis/classes/struct/struct-tests.factor | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/basis/classes/struct/struct-tests.factor b/basis/classes/struct/struct-tests.factor index cc781225e6..f19d71974f 100644 --- a/basis/classes/struct/struct-tests.factor +++ b/basis/classes/struct/struct-tests.factor @@ -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