compiler.cfg.checker: new check-rpo word
parent
a08bbde2e7
commit
e0841fa695
|
@ -18,7 +18,8 @@ ERROR: last-insn-not-a-jump insn ;
|
||||||
[ ##dispatch-label? ]
|
[ ##dispatch-label? ]
|
||||||
} 1|| [ drop ] [ last-insn-not-a-jump ] if ;
|
} 1|| [ drop ] [ last-insn-not-a-jump ] if ;
|
||||||
|
|
||||||
|
: check-rpo ( rpo -- )
|
||||||
|
[ instructions>> check-basic-block ] each ;
|
||||||
|
|
||||||
: check-cfg ( cfg -- )
|
: check-cfg ( cfg -- )
|
||||||
entry>> reverse-post-order [
|
entry>> reverse-post-order check-rpo ;
|
||||||
instructions>> check-basic-block
|
|
||||||
] each ;
|
|
Loading…
Reference in New Issue