From 0f68d4c0511876f9bcce168ed2409e64237eab2c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bj=C3=B6rn=20Lindqvist?= Date: Sat, 15 Aug 2015 06:06:01 +0200 Subject: [PATCH] tools.image-analyzer.gc-info.tests: fix word>gc-info-expected word, fixes #1436 --- .../tools/image-analyzer/gc-info/gc-info-tests.factor | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/extra/tools/image-analyzer/gc-info/gc-info-tests.factor b/extra/tools/image-analyzer/gc-info/gc-info-tests.factor index 6234c40b1a..e28b55f3fc 100644 --- a/extra/tools/image-analyzer/gc-info/gc-info-tests.factor +++ b/extra/tools/image-analyzer/gc-info/gc-info-tests.factor @@ -1,5 +1,5 @@ USING: accessors alien.c-types alien.syntax arrays assocs bit-arrays -classes.struct combinators combinators.short-circuit compiler +classes.struct combinators combinators.short-circuit compiler compiler.cfg compiler.cfg.debugger compiler.cfg.instructions compiler.cfg.linearization compiler.cfg.stack-frame compiler.codegen.gc-maps compiler.units fry generic grouping io io.encodings.binary io.streams.byte-array kernel math namespaces @@ -10,6 +10,7 @@ IN: tools.image-analyzer.gc-info.tests QUALIFIED: cpu.x86.features.private QUALIFIED: crypto.aes.utils QUALIFIED: effects +QUALIFIED: gtk-samples.opengl QUALIFIED: opencl : normal? ( word -- ? ) @@ -35,7 +36,7 @@ QUALIFIED: opencl ! Like word>gc-info but uses the compiler : word>gc-info-expected ( word -- seq/f ) - test-regs first cfg>gc-maps tally-gc-maps ; + test-regs first [ cfg set ] [ cfg>gc-maps tally-gc-maps ] bi ; ! Handle f f as input. Deferred words don't have any gc-info. See #1394. : same-gc-info? ( compiler-gc-info/f gc-info/f -- ? ) @@ -127,6 +128,12 @@ FUNCTION: void LLVMDisposeTypeHandle ( LLVMTypeHandleRef TypeHandle ) [ word>gc-info-expected ] [ word>gc-info ] bi same-gc-info? ] unit-test +! #1436 +{ t } [ + \ gtk-samples.opengl:opengl-main + [ word>gc-info-expected ] [ word>gc-info ] bi same-gc-info? +] unit-test + ! Ensure deterministic gc map generation. : recompile-word>gc-info ( word -- gc-info ) [ 1array compile ] keep word>gc-info ; -- 2.34.1