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 MethodbooleanTrue 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 TypeMethodDescriptionvoidcompileFromStack(Compilation comp, Type stackType) final voidemitGotoFirstBranch(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:
compileFromStackin classTarget
-
emitGotoFirstBranch
Goto whichever of IfTrue or ifFalse is specified by trueBranchComesFirst. Normally, the goto should get optimized away as a no-op.
-