public class DefineClassInstr extends Instr implements ResultInstr
| Modifier and Type | Field and Description |
|---|---|
private Operand |
container |
private IRClassBody |
newIRClassBody |
private Variable |
result |
private Operand |
superClass |
EMPTY_OPERANDS| Constructor and Description |
|---|
DefineClassInstr(Variable result,
IRClassBody newIRClassBody,
Operand container,
Operand superClass) |
| Modifier and Type | Method and Description |
|---|---|
Instr |
cloneForInlining(InlinerInfo ii)
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).
|
Operand |
getContainer() |
IRClassBody |
getNewIRClassBody() |
Operand[] |
getOperands() |
Variable |
getResult() |
Operand |
getSuperClass() |
java.lang.Object |
interpret(ThreadContext context,
DynamicScope currDynScope,
IRubyObject self,
java.lang.Object[] temp,
Block block) |
private RubyModule |
newClass(ThreadContext context,
IRubyObject self,
RubyModule classContainer,
DynamicScope currDynScope,
java.lang.Object[] temp) |
void |
simplifyOperands(java.util.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.
|
java.lang.String |
toString() |
void |
updateResult(Variable v) |
void |
visit(IRVisitor visitor) |
canBeDeleted, canRaiseException, cloneForBlockCloning, cloneForInlinedClosure, cloneForInlinedScope, getOperation, getUsedVariables, hasSideEffects, hasUnusedResult, interpretAndGetNewIPC, isDead, markDead, markUnusedResult, renameVars, simplifyAndGetResult, transfersControlprivate IRClassBody newIRClassBody
private Operand container
private Operand superClass
private Variable result
public DefineClassInstr(Variable result, IRClassBody newIRClassBody, Operand container, Operand superClass)
public Operand[] getOperands()
getOperands in class Instrpublic Variable getResult()
getResult in interface ResultInstrpublic void updateResult(Variable v)
updateResult in interface ResultInstrpublic void simplifyOperands(java.util.Map<Operand,Operand> valueMap, boolean force)
InstrsimplifyOperands in class Instrpublic Instr cloneForInlining(InlinerInfo ii)
InstrcloneForInlining in class Instrii - This object manages renaming of variables and labels, handles
args and return values.private RubyModule newClass(ThreadContext context, IRubyObject self, RubyModule classContainer, DynamicScope currDynScope, java.lang.Object[] temp)
public java.lang.Object interpret(ThreadContext context, DynamicScope currDynScope, IRubyObject self, java.lang.Object[] temp, Block block)
public IRClassBody getNewIRClassBody()
public Operand getContainer()
public Operand getSuperClass()