|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jikesrvm.compilers.opt.ir.IRTools
org.jikesrvm.compilers.opt.hir2lir.ConvertToLowLevelIR
org.jikesrvm.compilers.opt.hir2lir.DynamicTypeCheckExpansion
abstract class DynamicTypeCheckExpansion
Expansion of Dynamic Type Checking operations.
DynamicTypeCheck| Field Summary |
|---|
| Fields inherited from class org.jikesrvm.compilers.opt.hir2lir.ConvertToLowLevelIR |
|---|
LOWER_ARRAY_ACCESS |
| Constructor Summary | |
|---|---|
DynamicTypeCheckExpansion()
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class org.jikesrvm.compilers.opt.hir2lir.ConvertToLowLevelIR |
|---|
callHelper, convert, doArrayLoad, doArrayStore, expandSysCallTarget, getField, getField, getInstanceMethod, getSpecialMethod, getStatic, getTIB, getTIB, getTIB, insertBinary, InsertGuardedUnary, InsertLoadOffset, InsertLoadOffset, InsertLoadOffset, InsertLoadOffset, InsertLoadOffsetJTOC, InsertLoadOffsetJTOC, InsertUnary, lookup, tableswitch |
| Methods inherited from class org.jikesrvm.compilers.opt.ir.IRTools |
|---|
A, 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, TG, usedIn, useDoublesAsDef |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
DynamicTypeCheckExpansion()
| Method Detail |
|---|
static Instruction instanceOf(Instruction s,
IR ir)
s - an INSTANCEOF or INSTANCEOF_UNRESOLVED instruction to expandir - the enclosing IR
static Instruction instanceOfNotNull(Instruction s,
IR ir)
s - an INSTANCEOF_NOTNULL instruction to expandir - the enclosing IR
static Instruction checkcast(Instruction s,
IR ir)
s - a CHECKCAST or CHECKCAST_UNRESOLVED instruction to expandir - the enclosing IR
static Instruction checkcastNotNull(Instruction s,
IR ir)
s - a CHECKCAST_NOTNULL instruction to expandir - the enclosing IR
static Instruction mustImplementInterface(Instruction s,
IR ir)
s - a MUST_IMPLEMENT_INTERFACE instruction to expandir - the enclosing IR
static 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 dynamic
private 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.falseProb - The probability that typecheck will branch to the falseBlock
private static BasicBlock fallThroughBB(Instruction s,
IR ir)
private static BasicBlock advanceBlock(int bcIndex,
BasicBlock curBlock,
IR ir)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||