public abstract class Instr
extends java.lang.Object
Constructor and Description |
---|
Instr(Operation operation) |
Instr(Operation operation,
Variable result) |
Modifier and Type | Method and Description |
---|---|
boolean |
canRaiseException() |
abstract Instr |
cloneForInlining(InlinerInfo ii)
Clone the instruction for inlining -- this will rename all variables (including local variables and self!)
and replace RECV_ARG and RETURN instructions to regular copy instructions,
|
abstract Operand[] |
getOperands() |
Operation |
getOperation() |
Variable |
getResult() |
java.util.List<Variable> |
getUsedVariables() |
boolean |
hasSideEffects() |
Label |
interpret(InterpreterContext interp,
IRubyObject self) |
boolean |
isDead() |
void |
markDead() |
Operand |
simplifyAndGetResult(java.util.Map<Operand,Operand> valueMap)
This method takes as input a map of operands to their values, and outputs
the result of this instruction.
|
abstract void |
simplifyOperands(java.util.Map<Operand,Operand> valueMap)
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.
|
java.lang.String |
toString() |
public Instr(Operation operation)
public java.lang.String toString()
toString
in class java.lang.Object
public Variable getResult()
public Operation getOperation()
public boolean hasSideEffects()
public boolean canRaiseException()
public void markDead()
public boolean isDead()
public abstract Operand[] getOperands()
public java.util.List<Variable> getUsedVariables()
public abstract Instr cloneForInlining(InlinerInfo ii)
public abstract void simplifyOperands(java.util.Map<Operand,Operand> valueMap)
public Operand simplifyAndGetResult(java.util.Map<Operand,Operand> valueMap)
valueMap
- Mapping from operands to their simplified valuespublic Label interpret(InterpreterContext interp, IRubyObject self)
Copyright © 2002-2009 JRuby Team. All Rights Reserved.