compiler.cfg.debugger: fix fake-representations so that low-level-ir tests can pass on x86
parent
0df8aadce2
commit
8d55616d34
|
@ -1,15 +1,16 @@
|
||||||
! Copyright (C) 2008, 2009 Slava Pestov.
|
! Copyright (C) 2008, 2009 Slava Pestov.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: kernel words sequences quotations namespaces io vectors
|
USING: kernel words sequences quotations namespaces io vectors
|
||||||
classes.tuple accessors prettyprint prettyprint.config assocs
|
arrays hashtables classes.tuple accessors prettyprint
|
||||||
prettyprint.backend prettyprint.custom prettyprint.sections
|
prettyprint.config assocs prettyprint.backend prettyprint.custom
|
||||||
parser compiler.tree.builder compiler.tree.optimizer
|
prettyprint.sections parser compiler.tree.builder
|
||||||
cpu.architecture compiler.cfg.builder compiler.cfg.linearization
|
compiler.tree.optimizer cpu.architecture compiler.cfg.builder
|
||||||
compiler.cfg.registers compiler.cfg.stack-frame
|
compiler.cfg.linearization compiler.cfg.registers
|
||||||
compiler.cfg.linear-scan compiler.cfg.two-operand
|
compiler.cfg.stack-frame compiler.cfg.linear-scan
|
||||||
compiler.cfg.optimizer compiler.cfg.instructions
|
compiler.cfg.two-operand compiler.cfg.optimizer
|
||||||
compiler.cfg.utilities compiler.cfg.def-use
|
compiler.cfg.instructions compiler.cfg.utilities
|
||||||
compiler.cfg.rpo compiler.cfg.mr compiler.cfg ;
|
compiler.cfg.def-use compiler.cfg.rpo compiler.cfg.mr
|
||||||
|
compiler.cfg.representations.preferred compiler.cfg ;
|
||||||
IN: compiler.cfg.debugger
|
IN: compiler.cfg.debugger
|
||||||
|
|
||||||
GENERIC: test-cfg ( quot -- cfgs )
|
GENERIC: test-cfg ( quot -- cfgs )
|
||||||
|
@ -73,8 +74,9 @@ M: rs-loc pprint* \ R pprint-loc ;
|
||||||
|
|
||||||
: fake-representations ( cfg -- )
|
: fake-representations ( cfg -- )
|
||||||
post-order [
|
post-order [
|
||||||
instructions>>
|
instructions>> [
|
||||||
[ [ temp-vregs ] [ defs-vreg ] bi [ suffix ] when* ]
|
[ [ temp-vregs ] [ temp-vreg-reps ] bi zip ]
|
||||||
map concat
|
[ [ defs-vreg ] [ defs-vreg-rep ] bi 2dup and [ 2array ] [ 2drop f ] if ]
|
||||||
] map concat
|
bi [ suffix ] when*
|
||||||
[ int-rep ] H{ } map>assoc representations set ;
|
] map concat
|
||||||
|
] map concat >hashtable representations set ;
|
Loading…
Reference in New Issue