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