gnu.expr
Class ConditionalTarget
public class ConditionalTarget
This is the Target of a boolean expression, in a conditional context.
If the expression evaluates to, transfer to the ifTrue label;
if false, tranfer to the ifFalse label.
ifFalse
public Label ifFalse
ifTrue
public Label ifTrue
trueBranchComesFirst
public boolean trueBranchComesFirst
True if the ifTrue label comes before the ifFalse label.
This is used in the hope we can optimize away a branch followed by
its target.
ConditionalTarget
public ConditionalTarget(Label ifTrue,
Label ifFalse,
Language language)
ifTrue
- label to jump to if this evaluates to trueifFalse
- label to jump to if truelanguage
- specifies what values are true
emitGotoFirstBranch
public final void emitGotoFirstBranch(CodeAttr code)
Goto whichever of IfTrue or ifFalse is specified by trueBranchComesFirst.
Normally, the goto should get optimized away as a no-op.