Package gnu.expr
Class ConditionalTarget
java.lang.Object
gnu.expr.Target
gnu.expr.ConditionalTarget
This is the Target of a boolean expression, in a conditional context.
If the expression evaluates to true, transfer to the ifTrue label;
if false, transfer to the ifFalse label.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Method
boolean
True if the ifTrue label comes before the ifFalse label.Fields inherited from class gnu.expr.Target
Ignore, pushObject
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
compileFromStack
(Compilation comp, Type stackType) final void
emitGotoFirstBranch
(CodeAttr code) Goto whichever of IfTrue or ifFalse is specified by trueBranchComesFirst.getType()
-
Field Details
-
ifTrue
-
ifFalse
-
isTrueMethod
-
trueBranchComesFirst
public boolean trueBranchComesFirstTrue 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.
-
-
Constructor Details
-
ConditionalTarget
- Parameters:
ifTrue
- label to jump to if this evaluates to trueifFalse
- label to jump to if truelanguage
- specifies what values are true
-
-
Method Details
-
getType
-
compileFromStack
- Specified by:
compileFromStack
in classTarget
-
emitGotoFirstBranch
Goto whichever of IfTrue or ifFalse is specified by trueBranchComesFirst. Normally, the goto should get optimized away as a no-op.
-