Vocabulary
compiler.cfg.builder

Inputs
blocka basic-block
worda word
heighta number


Outputs
block'a basic-block


Word description
Emits a call to the given word to the cfg being constructed. "height" is the number of items being added to or removed from the data stack.

Side effects of the word is that it modifies the "basic-block" and height-state variables.

Examples
In this example, a call to a dummy word is emitted which pushes three items onto the stack.
USING: compiler.cfg.builder compiler.cfg.builder.blocks compiler.cfg.stacks kernel make prettyprint ; begin-stack-analysis <basic-block> set-basic-block \ dummy 3 [ emit-call ] { } make drop height-state basic-block [ get . ] bi@ { { 3 0 } { 0 0 } } T{ basic-block { id 1903165 } { successors V{ T{ basic-block { id 1903166 } { instructions V{ T{ ##call { word dummy } } T{ ##branch } } } { successors V{ T{ basic-block { id 1903167 } } } } { kill-block? t } } } }
}


See also
call-height

Definition