abstract class DynamicTypeCheckExpansion extends ConvertToLowLevelIR
DynamicTypeCheckLOWER_ARRAY_ACCESS| Constructor and Description |
|---|
DynamicTypeCheckExpansion() |
| Modifier and Type | Method and Description |
|---|---|
private static BasicBlock |
advanceBlock(int bcIndex,
BasicBlock curBlock,
IR ir) |
(package private) static Instruction |
arrayStoreCheck(Instruction s,
IR ir,
boolean couldBeNull)
Expand an object array store check into the LIR sequence that
implements it.
|
(package private) static Instruction |
checkcast(Instruction s,
IR ir)
Expand a checkcast instruction into the LIR sequence that implements the
dynamic type check, raising a ClassCastException when the type check
fails.
|
(package private) static Instruction |
checkcastNotNull(Instruction s,
IR ir)
Expand a checkcast instruction into the LIR sequence that implements the
dynamic type check, raising a ClassCastException when the type check
fails.
|
private static Instruction |
convertToBranchingTypeCheck(Instruction s,
IR ir,
Operand RHSobj,
TypeReference LHStype,
Operand RHStib,
RegisterOperand result)
Generate wrapper around branching type check to get a
value producing type check.
|
private static BasicBlock |
fallThroughBB(Instruction s,
IR ir) |
private static Instruction |
generateBranchingTypeCheck(Instruction s,
IR ir,
Operand RHSobj,
TypeReference LHStype,
Operand RHStib,
BasicBlock trueBlock,
BasicBlock falseBlock,
RegisterOperand oldGuard,
BranchProfileOperand falseProb)
Generate a branching dynamic type check.
|
private static Instruction |
generateValueProducingTypeCheck(Instruction s,
IR ir,
Operand RHSobj,
TypeReference LHStype,
Operand RHStib,
RegisterOperand result)
Generate a value-producing dynamic type check.
|
(package private) static Instruction |
instanceOf(Instruction s,
IR ir)
Expand an instanceof instruction into the LIR sequence that implements
the dynamic type check.
|
(package private) static Instruction |
instanceOfNotNull(Instruction s,
IR ir)
Expand an instanceof instruction into the LIR sequence that implements
the dynamic type check.
|
(package private) static Instruction |
mustImplementInterface(Instruction s,
IR ir)
Expand a checkcastInterface instruction into the LIR sequence that
implements the dynamic type check, raising an IncompataibleClassChangeError
if the type check fails.
|
callHelper, convert, doArrayLoad, doArrayStore, expandSysCallTarget, getField, getField, getInstanceMethod, getSpecialMethod, getStatic, getTIB, getTIB, getTIB, insertBinary, InsertGuardedUnary, InsertLoadOffset, InsertLoadOffset, InsertLoadOffset, InsertLoadOffset, InsertLoadOffsetJTOC, InsertLoadOffsetJTOC, InsertUnary, lookup, tableswitchA, AC, AC, CPOS, CR, D, DC, defDoublesAsUse, definedIn, F, FC, getCondMoveOp, getDefaultOperand, getLoadOp, getLoadOp, getMoveOp, getStoreOp, getStoreOp, I, IC, insertInstructionsAfter, L, LC, makeBlockOnEdge, mayBeVolatileFieldLoad, moveInstruction, moveIntoRegister, moveIntoRegister, nonPEIGC, offsetOperand, TG, usedIn, useDoublesAsDefDynamicTypeCheckExpansion()
static Instruction instanceOf(Instruction s, IR ir)
s - an INSTANCEOF or INSTANCEOF_UNRESOLVED instruction to expandir - the enclosing IRstatic Instruction instanceOfNotNull(Instruction s, IR ir)
s - an INSTANCEOF_NOTNULL instruction to expandir - the enclosing IRstatic Instruction checkcast(Instruction s, IR ir)
s - a CHECKCAST or CHECKCAST_UNRESOLVED instruction to expandir - the enclosing IRstatic Instruction checkcastNotNull(Instruction s, IR ir)
s - a CHECKCAST_NOTNULL instruction to expandir - the enclosing IRstatic Instruction mustImplementInterface(Instruction s, IR ir)
s - a MUST_IMPLEMENT_INTERFACE instruction to expandir - the enclosing IRstatic Instruction arrayStoreCheck(Instruction s, IR ir, boolean couldBeNull)
s - an OBJARRAY_STORE_CHECK instruction to expandir - the enclosing IRcouldBeNull - is it possible that the element being stored is null?private static Instruction generateValueProducingTypeCheck(Instruction s, IR ir, Operand RHSobj, TypeReference LHStype, Operand RHStib, RegisterOperand result)
s - The Instruction that is to be replaced by
a value producing type checkir - The IR containing the instruction to be expanded.RHSobj - The RegisterOperand containing the rhs object.LHStype - The RVMType to be tested against.RHStib - The Operand containing the TIB of the rhs.result - The RegisterOperand that the result of dynamic
type check is to be stored in.private static Instruction convertToBranchingTypeCheck(Instruction s, IR ir, Operand RHSobj, TypeReference LHStype, Operand RHStib, RegisterOperand result)
s - The Instruction that is to be replaced by
a value producing type checkir - The IR containing the instruction to be expanded.RHSobj - The RegisterOperand containing the rhs object.LHStype - The TypeReference to be tested against.RHStib - The Operand containing the TIB of the rhs.result - The RegisterOperand that the result of dynamicprivate static Instruction generateBranchingTypeCheck(Instruction s, IR ir, Operand RHSobj, TypeReference LHStype, Operand RHStib, BasicBlock trueBlock, BasicBlock falseBlock, RegisterOperand oldGuard, BranchProfileOperand falseProb)
s - The Instruction that is to be replaced by a
branching type checkir - The IR containing the instruction to be expanded.RHSobj - The RegisterOperand containing the rhs object.LHStype - The TypeReference to be tested against.RHStib - The Operand containing the TIB of the rhs.trueBlock - The BasicBlock to continue at if the typecheck
evaluates to truefalseBlock - The BasicBlock to continue at if the typecheck
evaluates to false.oldGuard - A suitable guard operand (not necessarily related
the instruction that is to be replaced).falseProb - The probability that typecheck will branch to the falseBlockprivate static BasicBlock fallThroughBB(Instruction s, IR ir)
private static BasicBlock advanceBlock(int bcIndex, BasicBlock curBlock, IR ir)