compiler.cfg.instructions: rename ##allocation to allocation-insn,
because it's nicer if all instruction unions have the -insn suffix and the ## prefix is reserved for tuplesdb4
parent
0babf4558f
commit
81c7659360
|
@ -171,7 +171,7 @@ M: insn analyze-aliases ;
|
||||||
M: vreg-insn analyze-aliases
|
M: vreg-insn analyze-aliases
|
||||||
def-acs ;
|
def-acs ;
|
||||||
|
|
||||||
M: ##allocation analyze-aliases
|
M: allocation-insn analyze-aliases
|
||||||
#! A freshly allocated object is distinct from any other
|
#! A freshly allocated object is distinct from any other
|
||||||
#! object.
|
#! object.
|
||||||
dup dst>> set-new-ac ;
|
dup dst>> set-new-ac ;
|
||||||
|
|
|
@ -11,7 +11,7 @@ IN: compiler.cfg.gc-checks
|
||||||
|
|
||||||
: insert-gc-check? ( bb -- ? )
|
: insert-gc-check? ( bb -- ? )
|
||||||
dup kill-block?>>
|
dup kill-block?>>
|
||||||
[ drop f ] [ instructions>> [ ##allocation? ] any? ] if ;
|
[ drop f ] [ instructions>> [ allocation-insn? ] any? ] if ;
|
||||||
|
|
||||||
: blocks-with-gc ( cfg -- bbs )
|
: blocks-with-gc ( cfg -- bbs )
|
||||||
post-order [ insert-gc-check? ] filter ;
|
post-order [ insert-gc-check? ] filter ;
|
||||||
|
@ -25,7 +25,7 @@ GENERIC# gc-check-offsets* 1 ( call-index seen-allocation? insn n -- call-index
|
||||||
M: ##callback-inputs gc-check-offsets* gc-check-here ;
|
M: ##callback-inputs gc-check-offsets* gc-check-here ;
|
||||||
M: ##phi gc-check-offsets* gc-check-here ;
|
M: ##phi gc-check-offsets* gc-check-here ;
|
||||||
M: gc-map-insn gc-check-offsets* gc-check-here ;
|
M: gc-map-insn gc-check-offsets* gc-check-here ;
|
||||||
M: ##allocation gc-check-offsets* 3drop t ;
|
M: allocation-insn gc-check-offsets* 3drop t ;
|
||||||
M: insn gc-check-offsets* 2drop ;
|
M: insn gc-check-offsets* 2drop ;
|
||||||
|
|
||||||
: gc-check-offsets ( insns -- seq )
|
: gc-check-offsets ( insns -- seq )
|
||||||
|
@ -53,7 +53,7 @@ M: ##box-alien allocation-size* drop 5 cells ;
|
||||||
M: ##box-displaced-alien allocation-size* drop 5 cells ;
|
M: ##box-displaced-alien allocation-size* drop 5 cells ;
|
||||||
|
|
||||||
: allocation-size ( insns -- n )
|
: allocation-size ( insns -- n )
|
||||||
[ ##allocation? ] filter
|
[ allocation-insn? ] filter
|
||||||
[ allocation-size* data-alignment get align ] map-sum ;
|
[ allocation-size* data-alignment get align ] map-sum ;
|
||||||
|
|
||||||
: add-gc-checks ( insns-seq -- )
|
: add-gc-checks ( insns-seq -- )
|
||||||
|
|
|
@ -260,6 +260,9 @@ HELP: ##write-barrier
|
||||||
HELP: alien-call-insn
|
HELP: alien-call-insn
|
||||||
{ $class-description "Union class of all alien call instructions." } ;
|
{ $class-description "Union class of all alien call instructions." } ;
|
||||||
|
|
||||||
|
HELP: allocation-insn
|
||||||
|
{ $class-description "Union class of all instructions that allocate memory." } ;
|
||||||
|
|
||||||
HELP: def-is-use-insn
|
HELP: def-is-use-insn
|
||||||
{ $class-description "Union class of instructions that have complex expansions and require that the output registers are not equal to any of the input registers." } ;
|
{ $class-description "Union class of instructions that have complex expansions and require that the output registers are not equal to any of the input registers." } ;
|
||||||
|
|
||||||
|
@ -336,7 +339,6 @@ $nl
|
||||||
##box-long-long
|
##box-long-long
|
||||||
##callback-inputs
|
##callback-inputs
|
||||||
##callback-outputs
|
##callback-outputs
|
||||||
##local-allot
|
|
||||||
##unbox
|
##unbox
|
||||||
##unbox-alien
|
##unbox-alien
|
||||||
##unbox-any-c-ptr
|
##unbox-any-c-ptr
|
||||||
|
@ -348,6 +350,8 @@ $nl
|
||||||
##allot
|
##allot
|
||||||
##call-gc
|
##call-gc
|
||||||
##check-nursery-branch
|
##check-nursery-branch
|
||||||
|
##local-allot
|
||||||
|
allocation-insn
|
||||||
gc-map
|
gc-map
|
||||||
gc-map-insn
|
gc-map-insn
|
||||||
<gc-map>
|
<gc-map>
|
||||||
|
|
|
@ -813,10 +813,10 @@ VREG-INSN: ##reload
|
||||||
def: dst
|
def: dst
|
||||||
literal: rep src ;
|
literal: rep src ;
|
||||||
|
|
||||||
UNION: ##allocation
|
UNION: allocation-insn
|
||||||
##allot
|
##allot
|
||||||
##box-alien
|
##box-alien
|
||||||
##box-displaced-alien ;
|
##box-displaced-alien ;
|
||||||
|
|
||||||
UNION: conditional-branch-insn
|
UNION: conditional-branch-insn
|
||||||
##compare-branch
|
##compare-branch
|
||||||
|
|
Loading…
Reference in New Issue