| Modifier and Type | Field and Description |
|---|---|
| private static final ClassValue | dumpableFields
A ClassValue wrapping an array of dumpable Field references for a given Instr type. |
| private static final Field[] | |
| public static final Operand[] | |
| private boolean | |
| private final transient Operation |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | |
| public boolean | |
| public abstract Instr | Returns: a new instruction that can be used in the target scope.This object manages renaming of variables and labels, handles
args and return values. info)Clone the instruction for use in an inlining context (either when a scope is inlined into another scope, or when a block has to be cloned because its associated call belongs to an inlined scope). |
| public Operand[] | |
| public boolean | Returns: true if it modified the scope or set any flags.Does this instruction do anything the scope is interested in? |
| public Field[] | |
| public void | |
| public abstract Operand[] | |
| public Operation | |
| public List | |
| public boolean | |
| public Object | interpret(ThreadContext context, StaticScope currScope, DynamicScope currDynScope, IRubyObject self, Object[] temp)
|
| public int | interpretAndGetNewIPC(ThreadContext context, DynamicScope currDynScope, StaticScope currScope, IRubyObject self, Object[] temp, int ipc)
|
| public boolean | |
| public boolean | |
| public void | |
| public void | |
| public abstract void | |
| public Instr | |
| protected void | simplifyOperands(Map<Operand, Operand> valueMap, boolean force)
This method takes as input a map of operands to their values, and outputs If the value map provides a value for any of the instruction's operands this method is expected to replace the original operands with the simplified values. |
| public Operand | Returns: simplified result / output of this instructionwhere this instr exists scope, Map<Operand, Operand> Mapping from operands to their simplified values valueMap)This method takes as input a map of operands to their values, and outputs the result of this instruction. |
| private StringBuilder | |
| public String | Returns: a StringOverrides java. Instructions are meant to be in a machine-readable format so offline tooling can parse the debugging output. |
| public String[] | |
| public boolean | |
| public void |
| dumpableFields | back to summary |
|---|---|
| private static final ClassValue<Field[]> dumpableFields A ClassValue wrapping an array of dumpable Field references for a given Instr type. | |
| EMPTY_FIELD_ARRAY | back to summary |
|---|---|
| private static final Field[] EMPTY_FIELD_ARRAY | |
| EMPTY_OPERANDS | back to summary |
|---|---|
| public static final Operand[] EMPTY_OPERANDS | |
| isDead | back to summary |
|---|---|
| private boolean isDead | |
| operation | back to summary |
|---|---|
| private final transient Operation operation | |
| Instr | back to summary |
|---|---|
| public Instr(Operation operation) | |
| canBeDeletedFromScope | back to summary |
|---|---|
| public boolean canBeDeletedFromScope(FullInterpreterContext fic) | |
| canRaiseException | back to summary |
|---|---|
| public boolean canRaiseException() | |
| clone | back to summary |
|---|---|
| public abstract Instr clone(CloneInfo info) Clone the instruction for use in an inlining context (either when a scope is inlined into another scope, or when a block has to be cloned because its associated call belongs to an inlined scope). This might renaming variables and labels to eliminate naming conflicts. The implementation might vary on the cloning mode. | |
| cloneOperands | back to summary |
|---|---|
| public Operand[] cloneOperands(CloneInfo info) | |
| computeScopeFlags | back to summary |
|---|---|
| public boolean computeScopeFlags(IRScope scope, EnumSet<IRFlags> flags) Does this instruction do anything the scope is interested in?
| |
| dumpableFields | back to summary |
|---|---|
| public Field[] dumpableFields() | |
| encode | back to summary |
|---|---|
| public void encode(IRWriterEncoder e) | |
| getOperands | back to summary |
|---|---|
| public abstract Operand[] getOperands() | |
| getOperation | back to summary |
|---|---|
public Operation getOperation()
| |
| getUsedVariables | back to summary |
|---|---|
| public List | |
| hasSideEffects | back to summary |
|---|---|
| public boolean hasSideEffects() | |
| interpret | back to summary |
|---|---|
public Object interpret(ThreadContext context, StaticScope currScope, DynamicScope currDynScope, IRubyObject self, Object[] temp)
| |
| interpretAndGetNewIPC | back to summary |
|---|---|
public int interpretAndGetNewIPC(ThreadContext context, DynamicScope currDynScope, StaticScope currScope, IRubyObject self, Object[] temp, int ipc)
| |
| isDead | back to summary |
|---|---|
public boolean isDead()
| |
| isDeletable | back to summary |
|---|---|
| public boolean isDeletable() Can this instruction be deleted? LVA will preserve instructions based on whether operands (variables) are living but even if there are no living variables then the instruction itself may not be able to be removed during DCE for other reasons (like if it unconditionally has a side-effect) | |
| markDead | back to summary |
|---|---|
| public void markDead() | |
| renameVars | back to summary |
|---|---|
| public void renameVars(Map<Operand, Operand> renameMap) | |
| setOperand | back to summary |
|---|---|
| public abstract void setOperand(int i, Operand operand) | |
| simplifyInstr | back to summary |
|---|---|
| public Instr simplifyInstr(IRManager manager) | |
| simplifyOperands | back to summary |
|---|---|
| protected void simplifyOperands(Map<Operand, Operand> valueMap, boolean force) This method takes as input a map of operands to their values, and outputs If the value map provides a value for any of the instruction's operands this method is expected to replace the original operands with the simplified values. It is not required that it do so -- code correctness is not compromised by failure to simplify | |
| simplifyOperands | back to summary |
|---|---|
| public Operand simplifyOperands(IRScope scope, Map<Operand, Operand> valueMap) This method takes as input a map of operands to their values, and outputs the result of this instruction. If the value map provides a value for any of the instruction's operands the expectation is that the operand will be replaced with the simplified value. It is not required that it do so -- code correctness is not compromised by failure to simplify. | |
| toArgList | back to summary |
|---|---|
| private StringBuilder toArgList(StringBuilder buf, Object[] args) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Instructions are meant to be in a machine-readable format so offline tooling can parse the debugging output. The format is: (result_op '=')? instr '(' (operand ',' )* operand? ';' (extra_arg ',')* extra_arg? ')' extra_arg can either be plain value or in a key: value format. | |
| toStringNonOperandArgs | back to summary |
|---|---|
| public String[] toStringNonOperandArgs() | |
| transfersControl | back to summary |
|---|---|
| public boolean transfersControl() | |
| visit | back to summary |
|---|---|
| public void visit(IRVisitor visitor) | |