language: fix naming scheme for some SYNTAX: words.
parent
a10475bec0
commit
ba4f81c5e6
|
@ -42,12 +42,12 @@ HELP: run-dataflow-analysis
|
|||
|
||||
PRIVATE>
|
||||
|
||||
HELP: forward-analysis:
|
||||
{ $syntax "forward-analysis: word" }
|
||||
HELP: \ FORWARD-ANALYSIS:
|
||||
{ $syntax "FORWARD-ANALYSIS: word" }
|
||||
{ $values { "word" "name of the compiler pass" } }
|
||||
{ $description "Syntax word for defining a forward analysis compiler pass." } ;
|
||||
|
||||
HELP: backward-analysis:
|
||||
{ $syntax "backward-analysis: word" }
|
||||
HELP: \ BACKWARD-ANALYSIS:
|
||||
{ $syntax "BACKWARD-ANALYSIS: word" }
|
||||
{ $values { "word" "name of the compiler pass" } }
|
||||
{ $description "Syntax word for defining a backward analysis compiler pass." } ;
|
||||
|
|
|
@ -133,8 +133,8 @@ FUNCTOR>
|
|||
|
||||
PRIVATE>
|
||||
|
||||
SYNTAX: forward-analysis:
|
||||
SYNTAX: \ FORWARD-ANALYSIS:
|
||||
scan-token [ define-analysis ] [ define-forward-analysis ] bi ;
|
||||
|
||||
SYNTAX: backward-analysis:
|
||||
SYNTAX: \ BACKWARD-ANALYSIS:
|
||||
scan-token [ define-analysis ] [ define-backward-analysis ] bi ;
|
||||
|
|
|
@ -43,7 +43,7 @@ IN: compiler.cfg.graphviz
|
|||
|
||||
: add-cfg-edges ( graph bb -- graph' )
|
||||
dup successors>> [
|
||||
[ number>> ] bi@ ->
|
||||
[ number>> ] bi@ -->
|
||||
] with each ;
|
||||
|
||||
: cfgviz ( cfg -- graph )
|
||||
|
|
|
@ -17,7 +17,7 @@ IN: compiler.cfg.gvn.avail
|
|||
! This doesn't propagate across "kill blocks". Not sure if
|
||||
! that's right, though I may as well assume as much.
|
||||
|
||||
forward-analysis: avail
|
||||
FORWARD-ANALYSIS: avail
|
||||
|
||||
M: avail transfer-set drop defined assoc-union ;
|
||||
|
||||
|
|
|
@ -15,29 +15,29 @@ IN: compiler.cfg.stacks.global
|
|||
: transfer-peeked-locs ( set bb -- set' )
|
||||
[ replace-set diff ] [ peek-set union ] bi ;
|
||||
|
||||
backward-analysis: anticip
|
||||
BACKWARD-ANALYSIS: anticip
|
||||
|
||||
M: anticip transfer-set drop transfer-peeked-locs ;
|
||||
M: anticip join-sets 2drop refine ;
|
||||
|
||||
backward-analysis: live
|
||||
BACKWARD-ANALYSIS: live
|
||||
|
||||
M: live transfer-set drop transfer-peeked-locs ;
|
||||
M: live join-sets 2drop combine ;
|
||||
|
||||
forward-analysis: avail
|
||||
FORWARD-ANALYSIS: avail
|
||||
|
||||
M: avail transfer-set
|
||||
drop [ peek-set ] [ replace-set ] bi union union ;
|
||||
M: avail join-sets 2drop refine ;
|
||||
|
||||
forward-analysis: pending
|
||||
FORWARD-ANALYSIS: pending
|
||||
|
||||
M: pending transfer-set
|
||||
drop replace-set union ;
|
||||
M: pending join-sets 2drop refine ;
|
||||
|
||||
backward-analysis: dead
|
||||
BACKWARD-ANALYSIS: dead
|
||||
|
||||
M: dead transfer-set
|
||||
drop [ kill-set ] [ replace-set ] bi union union ;
|
||||
|
|
|
@ -77,7 +77,7 @@ M: ##peek visit-insn ( state insn -- state )
|
|||
M: insn visit-insn ( state insn -- state' )
|
||||
drop ;
|
||||
|
||||
forward-analysis: padding
|
||||
FORWARD-ANALYSIS: padding
|
||||
|
||||
SYMBOL: stack-record
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ TUPLE: a-monster < monster ;
|
|||
TUPLE: b-monster < monster ;
|
||||
|
||||
COMPILE<
|
||||
slot-constructor: a-monster
|
||||
SLOT-CONSTRUCTOR: a-monster
|
||||
COMPILE>
|
||||
|
||||
: <a-monster> ( name hp max-hp -- obj )
|
||||
|
|
|
@ -59,6 +59,6 @@ SYNTAX: \ CONSTRUCTOR:
|
|||
: scan-full-input-effect ( -- effect )
|
||||
"(" expect scan-rest-input-effect ;
|
||||
|
||||
SYNTAX: \ slot-constructor:
|
||||
SYNTAX: \ SLOT-CONSTRUCTOR:
|
||||
scan-new-word [ name>> "(" append create-reset ] keep
|
||||
$[ scan-rest-input-effect in>> _ $[ _ _ slots>boa ] append! ] define-syntax ;
|
||||
|
|
Loading…
Reference in New Issue