public class ReplacingBasicValue
extends org.objectweb.asm.tree.analysis.BasicValue
Contains a set of flags that indicate how the value is used. These are updated throughout the life of the function, via the Analyzer/Interpreter, which simulate execution of the function. After the analysis is complete, the flags indicate how the value/variable was used, and that in turn indicates whether or not we can replace it.
| Modifier and Type | Method and Description |
|---|---|
void |
associate(ReplacingBasicValue other)
Associate this value with another.
|
static ReplacingBasicValue |
create(org.objectweb.asm.Type type,
org.apache.drill.exec.compile.bytecode.ValueHolderIden iden,
int index,
List<ReplacingBasicValue> valueList)
Create a new value representing a holder (boxed value).
|
void |
disableFunctionReturn()
Clear the indication that this value is used as a function return value.
|
void |
dump(StringBuilder sb,
int indentLevel)
Dump the value's members to a StringBuilder.
|
org.apache.drill.exec.compile.bytecode.ValueHolderIden |
getIden()
Return the ValueHolder identity for this value.
|
int |
getIndex()
Get the original local variable slot assigned to this value/holder.
|
boolean |
isAssignedInConditionalBlock()
Indicates whether or not this value is assigned to a variable inside of conditional block.
|
boolean |
isAssignedToMember()
Indicates whether or not this value is assigned to a class member variable.
|
boolean |
isFunctionArgument()
Indicates whether or not this value is used as a function argument.
|
boolean |
isFunctionReturn()
Indicates whether or not this value is used as a function return value.
|
boolean |
isReplaceable()
Indicates whether or not this value is replaceable.
|
boolean |
isThis()
Indicates whether or not this value is a "this" reference.
|
void |
markFunctionReturn()
Mark this value as being used as a function return value.
|
void |
setAssignedInConditionalBlock()
Mark this value as being assigned to a variable inside of conditional block.
|
void |
setAssignedToMember()
Mark this value as being assigned to a class member variable.
|
void |
setFrameSlot(int frameSlot) |
void |
setFunctionArgument()
Mark this value as being used as a function argument.
|
void |
setThis()
Mark this value as a "this" reference.
|
public static ReplacingBasicValue create(org.objectweb.asm.Type type, org.apache.drill.exec.compile.bytecode.ValueHolderIden iden, int index, List<ReplacingBasicValue> valueList)
type - the type of the holderiden - the ValueHolderIden for the holderindex - the original local variable slot assigned to the valuevalueList - TODOpublic void dump(StringBuilder sb, int indentLevel)
For logging and/or debugging.
sb - the StringBuilderindentLevel - the amount of indentation (in spaces) to prepend to each linepublic boolean isReplaceable()
public void setFrameSlot(int frameSlot)
public void associate(ReplacingBasicValue other)
This value and/or the other may each already have their own set of associates.
Once associated, these values will share flag values, and a change to any one of them will be shared with all other members of the association.
other - the other valuepublic void markFunctionReturn()
public void disableFunctionReturn()
public boolean isFunctionReturn()
public void setFunctionArgument()
public boolean isFunctionArgument()
public void setAssignedToMember()
public void setAssignedInConditionalBlock()
public boolean isAssignedToMember()
public boolean isAssignedInConditionalBlock()
public org.apache.drill.exec.compile.bytecode.ValueHolderIden getIden()
public int getIndex()
public void setThis()
public boolean isThis()
Copyright © 2022 The Apache Software Foundation. All rights reserved.