From 18699e83c1191453800e4cf1895968a175fd7cc5 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Tue, 4 Aug 2015 14:40:40 -0700 Subject: [PATCH] tools.image-analyzer.gc-info: Deferred words don't have any gc-info. Fix the unit test to account for this. Fixes #1394. --- .../tools/image-analyzer/gc-info/gc-info-tests.factor | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 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 20f31ac2fe..6234c40b1a 100644 --- a/extra/tools/image-analyzer/gc-info/gc-info-tests.factor +++ b/extra/tools/image-analyzer/gc-info/gc-info-tests.factor @@ -37,9 +37,14 @@ QUALIFIED: opencl : word>gc-info-expected ( word -- seq/f ) test-regs first cfg>gc-maps tally-gc-maps ; -: same-gc-info? ( compiler-gc-info gc-info -- ? ) - [ struct-slot-values = ] - [ [ not ] dip return-address-count>> 0 = and ] 2bi or ; +! 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 -- ? ) + 2dup = [ + 2drop t + ] [ + [ struct-slot-values = ] + [ [ not ] dip return-address-count>> 0 = and ] 2bi or + ] if ; : base-pointer-groups-expected ( word -- seq ) test-regs first cfg>gc-maps [ derived-root-offsets { } like ] { } map-as ; -- 2.34.1