public final class BaselineCompilerImpl extends BaselineCompiler
| Modifier and Type | Class and Description |
|---|---|
private static class |
BaselineCompilerImpl.UnreachableBytecodeException
Have we encountered a bytecode without valid stack heights?
|
TemplateCompilerFramework.BranchCondition, TemplateCompilerFramework.MachineCode| Modifier and Type | Field and Description |
|---|---|
private Assembler |
asm |
private Offset |
firstLocalOffset |
(package private) static Offset |
FIVE_SLOTS |
(package private) static Offset |
FOUR_SLOTS |
private static Offset |
MINUS_ONE_SLOT |
(package private) static Offset |
NO_SLOT |
(package private) static Offset |
ONE_SLOT |
private int |
parameterWords |
(package private) static Offset |
THREE_SLOTS |
(package private) static Offset |
TWO_SLOTS |
edgeCounterIdx, localTypes, optionsbcodes, biStart, bytecodeMap, compiledMethod, doesCheckStore, isInterruptible, isUninterruptible, isUnpreemptible, klass, lockOffset, method, shouldPrint, stackHeights| Constructor and Description |
|---|
BaselineCompilerImpl(BaselineCompiledMethod cm,
short[] localFixedLocations,
short[] localFloatLocations)
Create a BaselineCompilerImpl object for the compilation of method.
|
| Modifier and Type | Method and Description |
|---|---|
private void |
adjustStack(int size,
boolean mayClobber)
Adjust the value of ESP/RSP
|
private void |
boundsCheckHelper(Offset index,
Offset arrayRef)
Private helper to perform an array bounds check
|
protected void |
emit_aaload()
Emit code to load from a reference array
|
protected void |
emit_aastore()
Emit code to store to a reference array
|
protected void |
emit_aconst_null()
Emit code to load the null constant.
|
protected void |
emit_aload_resolved_getfield(int index,
FieldReference fieldRef)
Emits code to load a reference local variable and then perform a field load
|
protected void |
emit_areturn()
Emit code to implement the areturn bytecode
|
protected void |
emit_arraylength()
Emit code to implement the arraylength bytecode
|
protected void |
emit_astore(int index)
Emit code to store a reference to a local variable
|
protected void |
emit_athrow()
Emit code to implement the athrow bytecode
|
protected void |
emit_baload()
Emit code to load from a byte/boolean array
|
protected void |
emit_bastore()
Emit code to store to a byte/boolean array
|
protected void |
emit_caload()
Emit code to load from a char array
|
protected void |
emit_castore()
Emit code to store to a char array
|
protected void |
emit_checkcast_final(RVMType type)
Emit code to implement the checkcast bytecode
|
protected void |
emit_checkcast_resolvedClass(RVMClass type)
Emit code to implement the checkcast bytecode
|
protected void |
emit_checkcast_resolvedInterface(RVMClass type)
Emit code to implement the checkcast bytecode
|
protected void |
emit_checkcast(TypeReference typeRef)
Emit code to implement the checkcast bytecode
|
protected void |
emit_d2f()
Emit code to implement the d2f bytecode
|
protected void |
emit_d2i()
Emit code to implement the d2i bytecode
|
protected void |
emit_d2l()
Emit code to implement the d2l bytecode
|
protected void |
emit_dadd()
Emit code to implement the dadd bytecode
|
protected void |
emit_daload()
Emit code to load from a double array
|
protected void |
emit_dastore()
Emit code to store to a double array
|
protected void |
emit_dconst_0()
Emit code to load 0.0d
|
protected void |
emit_dconst_1()
Emit code to load 1.0d
|
protected void |
emit_ddiv()
Emit code to implement the ddiv bytecode
|
protected void |
emit_deferred_prologue()
Emit deferred prologue
|
protected void |
emit_DFcmpGL_if(boolean single,
boolean unorderedGT,
int bTarget,
TemplateCompilerFramework.BranchCondition bc)
Emits code to perform an [df]cmp[gl] followed by ifeq
By default, this method emits code for [df]cmp[gl] and then for ifeq.
|
protected void |
emit_dload(int index)
Emit code to load a double local variable
|
protected void |
emit_dmul()
Emit code to implement the dmul bytecode
|
protected void |
emit_dneg()
Emit code to implement the dneg bytecode
|
protected void |
emit_drem()
Emit code to implement the drem bytecode
|
protected void |
emit_dreturn()
Emit code to implement the dreturn bytecode
|
protected void |
emit_dstore(int index)
Emit code to store an double to a local variable
|
protected void |
emit_dsub()
Emit code to implement the dsub bytecode
|
protected void |
emit_dup_x1()
Emit code to implement the dup_x1 bytecode
|
protected void |
emit_dup_x2()
Emit code to implement the dup_x2 bytecode
|
protected void |
emit_dup()
Emit code to implement the dup bytecode
|
protected void |
emit_dup2_x1()
Emit code to implement the dup2_x1 bytecode
|
protected void |
emit_dup2_x2()
Emit code to implement the dup2_x2 bytecode
|
protected void |
emit_dup2()
Emit code to implement the dup2 bytecode
|
protected void |
emit_f2d()
Emit code to implement the f2d bytecode
|
protected void |
emit_f2i()
Emit code to implement the f2i bytecode
|
protected void |
emit_f2l()
Emit code to implement the f2l bytecode
|
protected void |
emit_fadd()
Emit code to implement the fadd bytecode
|
protected void |
emit_faload()
Emit code to load from a float array
|
protected void |
emit_fastore()
Emit code to store to a float array
|
protected void |
emit_fconst_0()
Emit code to load 0.0f
|
protected void |
emit_fconst_1()
Emit code to load 1.0f
|
protected void |
emit_fconst_2()
Emit code to load 2.0f
|
protected void |
emit_fdiv()
Emit code to implement the fdiv bytecode
|
protected void |
emit_fload(int index)
Emit code to local a float local variable
|
protected void |
emit_fmul()
Emit code to implement the fmul bytecode
|
protected void |
emit_fneg()
Emit code to implement the fneg bytecode
|
protected void |
emit_frem()
Emit code to implement the frem bytecode
|
protected void |
emit_freturn()
Emit code to implement the freturn bytecode
|
protected void |
emit_fstore(int index)
Emit code to store a float to a local variable
|
protected void |
emit_fsub()
Emit code to implement the fsub bytecode
|
protected void |
emit_goto(int bTarget)
Emit code to implement the goto and gotow bytecodes
|
protected void |
emit_i2b()
Emit code to implement the i2b bytecode
|
protected void |
emit_i2c()
Emit code to implement the i2c bytecode
|
protected void |
emit_i2d()
Emit code to implement the i2d bytecode
|
protected void |
emit_i2f()
Emit code to implement the i2f bytecode
|
protected void |
emit_i2l()
Emit code to implement the i2l bytecode
|
protected void |
emit_i2s()
Emit code to implement the i2s bytecode
|
protected void |
emit_iadd()
Emit code to implement the iadd bytecode
|
protected void |
emit_iaload()
Emit code to load from an int array
|
protected void |
emit_iand()
Emit code to implement the iand bytecode
|
protected void |
emit_iastore()
Emit code to store to an int array
|
protected void |
emit_iconst(int val)
Emit code to load an int constant.
|
protected void |
emit_idiv()
Emit code to implement the idiv bytecode
|
protected void |
emit_if_acmpeq(int bTarget)
Emit code to implement the if_acmpeq bytecode
|
protected void |
emit_if_acmpne(int bTarget)
Emit code to implement the if_acmpne bytecode
|
protected void |
emit_if_icmp(int bTarget,
TemplateCompilerFramework.BranchCondition bc)
Emits code to implement the if_icmp.. bytecode
|
protected void |
emit_if(int bTarget,
TemplateCompilerFramework.BranchCondition bc)
Emits code to implement the if.. bytecode
|
protected void |
emit_ifnonnull(int bTarget)
Emit code to implement the ifnonnull bytecode
|
protected void |
emit_ifnull(int bTarget)
Emit code to implement the ifnull bytecode
|
protected void |
emit_iinc(int index,
int val)
Emit code to implement the iinc bytecode
|
protected void |
emit_iload_caload(int index)
Emits code to load an int local variable and then load from a character array
|
protected void |
emit_imul()
Emit code to implement the imul bytecode
|
protected void |
emit_ineg()
Emit code to implement the ineg bytecode
|
protected void |
emit_instanceof_final(RVMType type)
Emit code to implement the instanceof bytecode
|
protected void |
emit_instanceof_resolvedClass(RVMClass type)
Emit code to implement the instanceof bytecode
|
protected void |
emit_instanceof_resolvedInterface(RVMClass type)
Emit code to implement the instanceof bytecode
|
protected void |
emit_instanceof(TypeReference typeRef)
Emit code to implement the instanceof bytecode
|
protected void |
emit_invoke_compiledmethod(CompiledMethod cm)
OSR routine to emit code to invoke a compiled method (with known jtoc
offset).
|
protected void |
emit_invokeinterface(MethodReference methodRef)
Emit code to implement the invokeinterface bytecode
|
protected void |
emit_ior()
Emit code to implement the ior bytecode
|
protected void |
emit_irem()
Emit code to implement the irem bytecode
|
protected void |
emit_ireturn()
Emit code to implement the ireturn bytecode
|
protected void |
emit_ishl()
Emit code to implement the ishl bytecode
|
protected void |
emit_ishr()
Emit code to implement the ishr bytecode
|
protected void |
emit_istore(int index)
Emit code to store an int to a local variable
|
protected void |
emit_isub()
Emit code to implement the isub bytecode
|
protected void |
emit_iushr()
Emit code to implement the iushr bytecode
|
protected void |
emit_ixor()
Emit code to implement the ixor bytecode
|
protected void |
emit_jsr(int bTarget)
Emit code to implement the jsr and jsrw bytecode
|
protected void |
emit_l2d()
Emit code to implement the l2d bytecode
|
protected void |
emit_l2f()
Emit code to implement the l2f bytecode
|
protected void |
emit_l2i()
Emit code to implement the l2i bytecode
|
protected void |
emit_ladd()
Emit code to implement the ladd bytecode
|
protected void |
emit_laload()
Emit code to load from a long array
|
protected void |
emit_land()
Emit code to implement the land bytecode
|
protected void |
emit_lastore()
Emit code to store to a long array
|
protected void |
emit_lcmp_if(int bTarget,
TemplateCompilerFramework.BranchCondition bc)
Emits code to perform an lcmp followed by ifeq.
|
protected void |
emit_lconst(int val)
Emit code to load a long constant
|
protected void |
emit_ldc(Offset offset,
byte type)
Emit code to load a 32 bit constant
|
protected void |
emit_ldc2(Offset offset,
byte type)
Emit code to load a 64 bit constant
|
protected void |
emit_ldiv()
Emit code to implement the ldiv bytecode
|
protected void |
emit_lload(int index)
Emit code to load a long local variable
|
protected void |
emit_lmul()
Emit code to implement the lmul bytecode
|
protected void |
emit_lneg()
Emit code to implement the lneg bytecode
|
protected void |
emit_loadretaddrconst(int bcIndex)
Implementation for OSR load return address bytecode
|
protected void |
emit_lookupswitch(int defaultval,
int npairs)
Emit code to implement the lookupswitch bytecode.
|
protected void |
emit_lor()
Emit code to implement the lor bytecode
|
protected void |
emit_lrem()
Emit code to implement the lrem bytecode
|
protected void |
emit_lreturn()
Emit code to implement the lreturn bytecode
|
protected void |
emit_lshl()
Emit code to implement the lshsl bytecode
|
protected void |
emit_lshr()
Emit code to implement the lshr bytecode
|
protected void |
emit_lstore(int index)
Emit code to store a long to a local variable
|
protected void |
emit_lsub()
Emit code to implement the lsub bytecode
|
protected void |
emit_lushr()
Emit code to implement the lushr bytecode
|
protected void |
emit_lxor()
Emit code to implement the lxor bytecode
|
protected boolean |
emit_Magic(MethodReference magicMethod)
Emits the code to implement the spcified magic.
|
protected void |
emit_monitorenter()
Emit code to implement the monitorenter bytecode
|
protected void |
emit_monitorexit()
Emit code to implement the monitorexit bytecode
|
protected void |
emit_multianewarray(TypeReference typeRef,
int dimensions)
Emit code to allocate a multi-dimensional array
|
protected ForwardReference |
emit_pending_goto(int bTarget)
Generate branch for pending goto OSR mechanism
|
protected void |
emit_pop()
Emit code to implement the pop bytecode
|
protected void |
emit_pop2()
Emit code to implement the pop2 bytecode
|
protected void |
emit_prologue()
Emit the prologue for the method
|
protected void |
emit_regular_aload(int index)
Emits code to load a reference local variable
|
protected void |
emit_regular_DFcmpGL(boolean single,
boolean unorderedGT)
Emits code to implement the [df]cmp[gl] bytecodes
|
protected void |
emit_regular_iload(int index)
Emits code to load an int local variable
|
protected void |
emit_regular_lcmp()
Emits code to implement the lcmp bytecode
|
protected void |
emit_resolved_getfield(FieldReference fieldRef)
Emit code to implement a getfield
|
protected void |
emit_resolved_getstatic(FieldReference fieldRef)
Emit code to implement a getstatic
|
protected void |
emit_resolved_invokespecial(MethodReference methodRef,
RVMMethod target)
Emit code to implement a dynamically linked invokespecial
|
protected void |
emit_resolved_invokestatic(MethodReference methodRef)
Emit code to implement invokestatic
|
protected void |
emit_resolved_invokevirtual(MethodReference methodRef)
Emit code to implement invokevirtual
|
protected void |
emit_resolved_new(RVMClass typeRef)
Emit code to allocate a scalar object
|
protected void |
emit_resolved_newarray(RVMArray array)
Emit code to allocate an array
|
protected void |
emit_resolved_putfield(FieldReference fieldRef)
Emit code to implement a putfield
|
protected void |
emit_resolved_putstatic(FieldReference fieldRef)
Emit code to implement a putstatic
|
protected void |
emit_ret(int index)
Emit code to implement the ret bytecode
|
protected void |
emit_return()
Emit code to implement the return bytecode
|
protected void |
emit_saload()
Emit code to load from a short array
|
protected void |
emit_sastore()
Emit code to store to a short array
|
protected void |
emit_swap()
Emit code to implement the swap bytecode
|
protected void |
emit_tableswitch(int defaultval,
int low,
int high)
Emit code to implement the tableswitch bytecode
|
protected void |
emit_threadSwitchTest(int whereFrom)
Emit the code for a threadswitch tests (aka a yieldpoint).
|
protected void |
emit_unresolved_getfield(FieldReference fieldRef)
Emit code to implement a dynamically linked getfield
|
protected void |
emit_unresolved_getstatic(FieldReference fieldRef)
Emit code to implement a dynamically linked getstatic
|
protected void |
emit_unresolved_invokespecial(MethodReference methodRef)
Emit code to implement invokespecial
|
protected void |
emit_unresolved_invokestatic(MethodReference methodRef)
Emit code to implement a dynamically linked invokestatic
|
protected void |
emit_unresolved_invokevirtual(MethodReference methodRef)
Emit code to implement a dynamically linked invokevirtual
|
protected void |
emit_unresolved_new(TypeReference typeRef)
Emit code to dynamically link and allocate a scalar object
|
protected void |
emit_unresolved_newarray(TypeReference tRef)
Emit code to dynamically link the element class and allocate an array
|
protected void |
emit_unresolved_putfield(FieldReference fieldRef)
Emit code to implement a dynamically linked putfield
|
protected void |
emit_unresolved_putstatic(FieldReference fieldRef)
Emit code to implement a dynamically linked putstatic
|
(package private) static void |
emitDynamicLinkingSequence(Assembler asm,
RegisterConstants.GPR reg,
MemberReference ref,
boolean couldBeZero)
Emit dynamic linking sequence placing the offset of the given member in reg
|
private Offset |
fp2spOffset(Offset offset)
Translates a FP offset into an SP offset
assuming ESP is still positioned as it was at the
start of the current bytecode (biStart).
|
(package private) static void |
genBoundsCheck(Assembler asm,
RegisterConstants.GPR indexReg,
RegisterConstants.GPR arrayRefReg)
Generate an array bounds check trapping if the array bound check fails,
otherwise falling through.
|
private void |
genCondBranch(byte cond,
int bTarget)
Emits a conditional branch on the given condition and bytecode target.
|
private void |
genEpilogue(int returnSize,
int bytesPopped)
Generate method epilogue, releasing values from stack and returning
|
private boolean |
genMagic(MethodReference m)
Generate magic method
|
private void |
genMonitorEnter()
Generate instructions to acquire lock on entry to a method
|
private void |
genMonitorExit()
Generate instructions to release lock on exit from a method
|
private static void |
genNullCheck(Assembler asm,
RegisterConstants.GPR objRefReg)
Generate an explicit null check (compare to zero).
|
private void |
genParameterCopy(Offset srcOffset)
Stores parameters into local space of the callee's stackframe.
|
(package private) static void |
genParameterRegisterLoad(Assembler asm,
int params)
Copy parameters from operand stack into registers.
|
protected void |
genParameterRegisterLoad(MethodReference method,
boolean hasThisParam)
Copy parameters from operand stack into registers.
|
private void |
genPrologue() |
private void |
genResultRegisterUnload(MethodReference m)
Pushes return value of method from register to operand stack.
|
private void |
genThreadSwitchTest(int whereFrom) |
protected AbstractAssembler |
getAssembler() |
static short |
getEmptyStackOffset(NormalMethod m) |
private static Offset |
getFirstLocalOffset(NormalMethod method)
This is misnamed.
|
static short |
getFloatLocalLocation(int index,
short[] localloc,
NormalMethod m) |
static short |
getGeneralLocalLocation(int index,
short[] localloc,
NormalMethod m) |
byte |
getLastFixedStackRegister() |
byte |
getLastFloatStackRegister() |
private static Offset |
getStartLocalOffset(NormalMethod method) |
private void |
incEdgeCounter(RegisterConstants.GPR scratch,
RegisterConstants.GPR idx,
int counterIdx)
Generate code to increment edge counter
|
protected void |
initializeCompiler() |
private Offset |
localOffset(int local) |
static int |
locationToOffset(short location) |
private byte |
mapCondition(TemplateCompilerFramework.BranchCondition bc) |
static short |
offsetToLocation(int offset) |
static short |
offsetToLocation(Offset offset) |
private void |
primitiveArrayStoreHelper(int size)
Generates a primitive array store for the given size.
|
private static void |
stackMoveHelper(Assembler asm,
RegisterConstants.GPR dest,
Offset off)
Move a value from the stack into a register using the shortest encoding and
the appropriate width for 32/64
|
private void |
stackMoveHelper(RegisterConstants.GPR dest,
Offset off)
Move a value from the stack into a register using the shortest encoding and
the appropriate width for 32/64
|
protected void |
starting_bytecode()
Nothing to do on IA32.
|
checkForActualCall, compile, compile, emit_aload, emit_DFcmpGL, emit_iload, emit_lcmp, fullyBootedVM, generateBaselineCompilerSubsystemReport, getCompilerName, getEdgeCounterIndex, getEdgeCounterOffset, initOptions, processCommandLineArgcheckTarget, ending_bytecode, forbiddenBytecode, forbiddenBytecode, genCode, printEndHeader, printMethodMessage, printStartHeader, stackHeightForEmptyBasicBlockprivate final int parameterWords
private Offset firstLocalOffset
static final Offset THREE_SLOTS
static final Offset FOUR_SLOTS
static final Offset FIVE_SLOTS
private static final Offset MINUS_ONE_SLOT
public BaselineCompilerImpl(BaselineCompiledMethod cm, short[] localFixedLocations, short[] localFloatLocations)
cm - the method that will be associated with this compilationlocalFixedLocations - unused on IA32localFloatLocations - unused on IA32protected AbstractAssembler getAssembler()
getAssembler in class TemplateCompilerFrameworkprotected void initializeCompiler()
initializeCompiler in class BaselineCompilerpublic byte getLastFixedStackRegister()
getLastFixedStackRegister in class BaselineCompilerpublic byte getLastFloatStackRegister()
getLastFloatStackRegister in class BaselineCompilerpublic static short getGeneralLocalLocation(int index, short[] localloc, NormalMethod m)
public static short getFloatLocalLocation(int index, short[] localloc, NormalMethod m)
public static int locationToOffset(short location)
public static short offsetToLocation(Offset offset)
public static short offsetToLocation(int offset)
public static short getEmptyStackOffset(NormalMethod m)
private static Offset getFirstLocalOffset(NormalMethod method)
method - the method in questionprivate static Offset getStartLocalOffset(NormalMethod method)
private void adjustStack(int size, boolean mayClobber)
size - amount to change ESP/RSP bymayClobber - can the value in S0 or memory be destroyed?
(i.e. can we use a destructive short push/pop opcode)private void stackMoveHelper(RegisterConstants.GPR dest, Offset off)
dest - register to load intooff - offset on stackprivate static void stackMoveHelper(Assembler asm, RegisterConstants.GPR dest, Offset off)
asm - the assembler instancedest - register to load intooff - offset on stackprotected void starting_bytecode()
starting_bytecode in class TemplateCompilerFrameworkprotected void emit_prologue()
TemplateCompilerFrameworkemit_prologue in class TemplateCompilerFrameworkprotected void emit_threadSwitchTest(int whereFrom)
TemplateCompilerFrameworkemit_threadSwitchTest in class TemplateCompilerFrameworkwhereFrom - is this thread switch from a PROLOGUE, BACKEDGE, or EPILOGUE?protected boolean emit_Magic(MethodReference magicMethod)
TemplateCompilerFrameworkemit_Magic in class TemplateCompilerFrameworkmagicMethod - desired magictrue if code was emittedprotected void emit_aconst_null()
TemplateCompilerFrameworkemit_aconst_null in class TemplateCompilerFrameworkprotected void emit_iconst(int val)
TemplateCompilerFrameworkemit_iconst in class TemplateCompilerFrameworkval - the int constant to loadprotected void emit_lconst(int val)
TemplateCompilerFrameworkemit_lconst in class TemplateCompilerFrameworkval - the lower 32 bits of long constant (upper32 are 0).protected void emit_fconst_0()
TemplateCompilerFrameworkemit_fconst_0 in class TemplateCompilerFrameworkprotected void emit_fconst_1()
TemplateCompilerFrameworkemit_fconst_1 in class TemplateCompilerFrameworkprotected void emit_fconst_2()
TemplateCompilerFrameworkemit_fconst_2 in class TemplateCompilerFrameworkprotected void emit_dconst_0()
TemplateCompilerFrameworkemit_dconst_0 in class TemplateCompilerFrameworkprotected void emit_dconst_1()
TemplateCompilerFrameworkemit_dconst_1 in class TemplateCompilerFrameworkprotected void emit_ldc(Offset offset, byte type)
TemplateCompilerFrameworkemit_ldc in class TemplateCompilerFrameworkoffset - JTOC offset of the constanttype - the type of the constantprotected void emit_ldc2(Offset offset, byte type)
TemplateCompilerFrameworkemit_ldc2 in class TemplateCompilerFrameworkoffset - JTOC offset of the constanttype - the type of the constantprotected void emit_regular_iload(int index)
BaselineCompileremit_regular_iload in class BaselineCompilerindex - the local index to loadprotected void emit_fload(int index)
TemplateCompilerFrameworkemit_fload in class TemplateCompilerFrameworkindex - the local index to loadprotected void emit_regular_aload(int index)
BaselineCompileremit_regular_aload in class BaselineCompilerindex - the local index to loadprotected void emit_lload(int index)
TemplateCompilerFrameworkemit_lload in class TemplateCompilerFrameworkindex - the local index to loadprotected void emit_dload(int index)
TemplateCompilerFrameworkemit_dload in class TemplateCompilerFrameworkindex - the local index to loadprotected void emit_istore(int index)
TemplateCompilerFrameworkemit_istore in class TemplateCompilerFrameworkindex - the local index to loadprotected void emit_fstore(int index)
TemplateCompilerFrameworkemit_fstore in class TemplateCompilerFrameworkindex - the local index to loadprotected void emit_astore(int index)
TemplateCompilerFrameworkemit_astore in class TemplateCompilerFrameworkindex - the local index to loadprotected void emit_lstore(int index)
TemplateCompilerFrameworkemit_lstore in class TemplateCompilerFrameworkindex - the local index to loadprotected void emit_dstore(int index)
TemplateCompilerFrameworkemit_dstore in class TemplateCompilerFrameworkindex - the local index to loadprotected void emit_iaload()
TemplateCompilerFrameworkemit_iaload in class TemplateCompilerFrameworkprotected void emit_faload()
TemplateCompilerFrameworkemit_faload in class TemplateCompilerFrameworkprotected void emit_aaload()
TemplateCompilerFrameworkemit_aaload in class TemplateCompilerFrameworkprotected void emit_caload()
TemplateCompilerFrameworkemit_caload in class TemplateCompilerFrameworkprotected void emit_iload_caload(int index)
emit_iload_caload in class BaselineCompilerindex - the local index to loadprotected void emit_saload()
TemplateCompilerFrameworkemit_saload in class TemplateCompilerFrameworkprotected void emit_baload()
TemplateCompilerFrameworkemit_baload in class TemplateCompilerFrameworkprotected void emit_laload()
TemplateCompilerFrameworkemit_laload in class TemplateCompilerFrameworkprotected void emit_daload()
TemplateCompilerFrameworkemit_daload in class TemplateCompilerFrameworkprivate void primitiveArrayStoreHelper(int size)
size - in bytes of the array store to generateprivate void boundsCheckHelper(Offset index, Offset arrayRef)
index - offset from current SP to the array indexarrayRef - offset from current SP to the array referenceprotected void emit_iastore()
TemplateCompilerFrameworkemit_iastore in class TemplateCompilerFrameworkprotected void emit_fastore()
TemplateCompilerFrameworkemit_fastore in class TemplateCompilerFrameworkprotected void emit_aastore()
TemplateCompilerFrameworkemit_aastore in class TemplateCompilerFrameworkprotected void emit_castore()
TemplateCompilerFrameworkemit_castore in class TemplateCompilerFrameworkprotected void emit_sastore()
TemplateCompilerFrameworkemit_sastore in class TemplateCompilerFrameworkprotected void emit_bastore()
TemplateCompilerFrameworkemit_bastore in class TemplateCompilerFrameworkprotected void emit_lastore()
TemplateCompilerFrameworkemit_lastore in class TemplateCompilerFrameworkprotected void emit_dastore()
TemplateCompilerFrameworkemit_dastore in class TemplateCompilerFrameworkprotected void emit_pop()
TemplateCompilerFrameworkemit_pop in class TemplateCompilerFrameworkprotected void emit_pop2()
TemplateCompilerFrameworkemit_pop2 in class TemplateCompilerFrameworkprotected void emit_dup()
TemplateCompilerFrameworkemit_dup in class TemplateCompilerFrameworkprotected void emit_dup_x1()
TemplateCompilerFrameworkemit_dup_x1 in class TemplateCompilerFrameworkprotected void emit_dup_x2()
TemplateCompilerFrameworkemit_dup_x2 in class TemplateCompilerFrameworkprotected void emit_dup2()
TemplateCompilerFrameworkemit_dup2 in class TemplateCompilerFrameworkprotected void emit_dup2_x1()
TemplateCompilerFrameworkemit_dup2_x1 in class TemplateCompilerFrameworkprotected void emit_dup2_x2()
TemplateCompilerFrameworkemit_dup2_x2 in class TemplateCompilerFrameworkprotected void emit_swap()
TemplateCompilerFrameworkemit_swap in class TemplateCompilerFrameworkprotected void emit_iadd()
TemplateCompilerFrameworkemit_iadd in class TemplateCompilerFrameworkprotected void emit_isub()
TemplateCompilerFrameworkemit_isub in class TemplateCompilerFrameworkprotected void emit_imul()
TemplateCompilerFrameworkemit_imul in class TemplateCompilerFrameworkprotected void emit_idiv()
TemplateCompilerFrameworkemit_idiv in class TemplateCompilerFrameworkprotected void emit_irem()
TemplateCompilerFrameworkemit_irem in class TemplateCompilerFrameworkprotected void emit_ineg()
TemplateCompilerFrameworkemit_ineg in class TemplateCompilerFrameworkprotected void emit_ishl()
TemplateCompilerFrameworkemit_ishl in class TemplateCompilerFrameworkprotected void emit_ishr()
TemplateCompilerFrameworkemit_ishr in class TemplateCompilerFrameworkprotected void emit_iushr()
TemplateCompilerFrameworkemit_iushr in class TemplateCompilerFrameworkprotected void emit_iand()
TemplateCompilerFrameworkemit_iand in class TemplateCompilerFrameworkprotected void emit_ior()
TemplateCompilerFrameworkemit_ior in class TemplateCompilerFrameworkprotected void emit_ixor()
TemplateCompilerFrameworkemit_ixor in class TemplateCompilerFrameworkprotected void emit_iinc(int index, int val)
TemplateCompilerFrameworkemit_iinc in class TemplateCompilerFrameworkindex - index of localval - value to increment it byprotected void emit_ladd()
TemplateCompilerFrameworkemit_ladd in class TemplateCompilerFrameworkprotected void emit_lsub()
TemplateCompilerFrameworkemit_lsub in class TemplateCompilerFrameworkprotected void emit_lmul()
TemplateCompilerFrameworkemit_lmul in class TemplateCompilerFrameworkprotected void emit_ldiv()
TemplateCompilerFrameworkemit_ldiv in class TemplateCompilerFrameworkprotected void emit_lrem()
TemplateCompilerFrameworkemit_lrem in class TemplateCompilerFrameworkprotected void emit_lneg()
TemplateCompilerFrameworkemit_lneg in class TemplateCompilerFrameworkprotected void emit_lshl()
TemplateCompilerFrameworkemit_lshl in class TemplateCompilerFrameworkprotected void emit_lshr()
TemplateCompilerFrameworkemit_lshr in class TemplateCompilerFrameworkprotected void emit_lushr()
TemplateCompilerFrameworkemit_lushr in class TemplateCompilerFrameworkprotected void emit_land()
TemplateCompilerFrameworkemit_land in class TemplateCompilerFrameworkprotected void emit_lor()
TemplateCompilerFrameworkemit_lor in class TemplateCompilerFrameworkprotected void emit_lxor()
emit_lxor in class TemplateCompilerFrameworkprotected void emit_fadd()
TemplateCompilerFrameworkemit_fadd in class TemplateCompilerFrameworkprotected void emit_fsub()
TemplateCompilerFrameworkemit_fsub in class TemplateCompilerFrameworkprotected void emit_fmul()
TemplateCompilerFrameworkemit_fmul in class TemplateCompilerFrameworkprotected void emit_fdiv()
emit_fdiv in class TemplateCompilerFrameworkprotected void emit_frem()
TemplateCompilerFrameworkemit_frem in class TemplateCompilerFrameworkprotected void emit_fneg()
TemplateCompilerFrameworkemit_fneg in class TemplateCompilerFrameworkprotected void emit_dadd()
TemplateCompilerFrameworkemit_dadd in class TemplateCompilerFrameworkprotected void emit_dsub()
TemplateCompilerFrameworkemit_dsub in class TemplateCompilerFrameworkprotected void emit_dmul()
TemplateCompilerFrameworkemit_dmul in class TemplateCompilerFrameworkprotected void emit_ddiv()
TemplateCompilerFrameworkemit_ddiv in class TemplateCompilerFrameworkprotected void emit_drem()
TemplateCompilerFrameworkemit_drem in class TemplateCompilerFrameworkprotected void emit_dneg()
TemplateCompilerFrameworkemit_dneg in class TemplateCompilerFrameworkprotected void emit_i2l()
TemplateCompilerFrameworkemit_i2l in class TemplateCompilerFrameworkprotected void emit_l2i()
TemplateCompilerFrameworkemit_l2i in class TemplateCompilerFrameworkprotected void emit_i2f()
TemplateCompilerFrameworkemit_i2f in class TemplateCompilerFrameworkprotected void emit_i2d()
TemplateCompilerFrameworkemit_i2d in class TemplateCompilerFrameworkprotected void emit_l2f()
TemplateCompilerFrameworkemit_l2f in class TemplateCompilerFrameworkprotected void emit_l2d()
TemplateCompilerFrameworkemit_l2d in class TemplateCompilerFrameworkprotected void emit_f2d()
TemplateCompilerFrameworkemit_f2d in class TemplateCompilerFrameworkprotected void emit_d2f()
TemplateCompilerFrameworkemit_d2f in class TemplateCompilerFrameworkprotected void emit_f2i()
TemplateCompilerFrameworkemit_f2i in class TemplateCompilerFrameworkprotected void emit_f2l()
TemplateCompilerFrameworkemit_f2l in class TemplateCompilerFrameworkprotected void emit_d2i()
TemplateCompilerFrameworkemit_d2i in class TemplateCompilerFrameworkprotected void emit_d2l()
TemplateCompilerFrameworkemit_d2l in class TemplateCompilerFrameworkprotected void emit_i2b()
TemplateCompilerFrameworkemit_i2b in class TemplateCompilerFrameworkprotected void emit_i2c()
TemplateCompilerFrameworkemit_i2c in class TemplateCompilerFrameworkprotected void emit_i2s()
TemplateCompilerFrameworkemit_i2s in class TemplateCompilerFrameworkprotected void emit_regular_lcmp()
BaselineCompileremit_regular_lcmp in class BaselineCompilerprotected void emit_regular_DFcmpGL(boolean single, boolean unorderedGT)
BaselineCompileremit_regular_DFcmpGL in class BaselineCompilersingle - true for float [f], false for double [d]unorderedGT - true for [g], false for [l]private byte mapCondition(TemplateCompilerFramework.BranchCondition bc)
bc - the branch conditionprotected void emit_lcmp_if(int bTarget, TemplateCompilerFramework.BranchCondition bc)
BaselineCompilerBy default, this method emits code for lcmp and then for ifeq. Subclasses that want to implement bytecode merging for this pattern must override this method.
emit_lcmp_if in class BaselineCompilerbTarget - target bytecode of the branchbc - branch conditionprotected void emit_DFcmpGL_if(boolean single, boolean unorderedGT, int bTarget, TemplateCompilerFramework.BranchCondition bc)
BaselineCompilerBy default, this method emits code for [df]cmp[gl] and then for ifeq. Subclasses that want to implement bytecode merging for this pattern must override this method.
emit_DFcmpGL_if in class BaselineCompilersingle - true for float [f], false for double [d]unorderedGT - true for [g], false for [l]bTarget - target bytecode of the branchbc - branch conditionprotected void emit_if(int bTarget, TemplateCompilerFramework.BranchCondition bc)
TemplateCompilerFrameworkemit_if in class TemplateCompilerFrameworkbTarget - target bytecode of the branchbc - branch conditionprotected void emit_if_icmp(int bTarget, TemplateCompilerFramework.BranchCondition bc)
TemplateCompilerFrameworkemit_if_icmp in class TemplateCompilerFrameworkbTarget - target bytecode of the branchbc - branch conditionprotected void emit_if_acmpeq(int bTarget)
TemplateCompilerFrameworkemit_if_acmpeq in class TemplateCompilerFrameworkbTarget - target bytecode of the branchprotected void emit_if_acmpne(int bTarget)
TemplateCompilerFrameworkemit_if_acmpne in class TemplateCompilerFrameworkbTarget - target bytecode of the branchprotected void emit_ifnull(int bTarget)
TemplateCompilerFrameworkemit_ifnull in class TemplateCompilerFrameworkbTarget - target bytecode of the branchprotected void emit_ifnonnull(int bTarget)
TemplateCompilerFrameworkemit_ifnonnull in class TemplateCompilerFrameworkbTarget - target bytecode of the branchprotected void emit_goto(int bTarget)
TemplateCompilerFrameworkemit_goto in class TemplateCompilerFrameworkbTarget - target bytecode of the branchprotected void emit_jsr(int bTarget)
TemplateCompilerFrameworkemit_jsr in class TemplateCompilerFrameworkbTarget - target bytecode of the jsrprotected void emit_ret(int index)
TemplateCompilerFrameworkemit_ret in class TemplateCompilerFrameworkindex - local variable containing the return addressprotected void emit_tableswitch(int defaultval, int low, int high)
TemplateCompilerFrameworkemit_tableswitch in class TemplateCompilerFrameworkdefaultval - bcIndex of the default targetlow - low value of switchhigh - high value of switchprotected void emit_lookupswitch(int defaultval, int npairs)
emit_lookupswitch in class TemplateCompilerFrameworkdefaultval - bcIndex of the default targetnpairs - number of pairs in the lookup switchprotected void emit_ireturn()
TemplateCompilerFrameworkemit_ireturn in class TemplateCompilerFrameworkprotected void emit_lreturn()
TemplateCompilerFrameworkemit_lreturn in class TemplateCompilerFrameworkprotected void emit_freturn()
TemplateCompilerFrameworkemit_freturn in class TemplateCompilerFrameworkprotected void emit_dreturn()
TemplateCompilerFrameworkemit_dreturn in class TemplateCompilerFrameworkprotected void emit_areturn()
TemplateCompilerFrameworkemit_areturn in class TemplateCompilerFrameworkprotected void emit_return()
TemplateCompilerFrameworkemit_return in class TemplateCompilerFrameworkprotected void emit_unresolved_getstatic(FieldReference fieldRef)
TemplateCompilerFrameworkemit_unresolved_getstatic in class TemplateCompilerFrameworkfieldRef - the referenced fieldprotected void emit_resolved_getstatic(FieldReference fieldRef)
TemplateCompilerFrameworkemit_resolved_getstatic in class TemplateCompilerFrameworkfieldRef - the referenced fieldprotected void emit_unresolved_putstatic(FieldReference fieldRef)
TemplateCompilerFrameworkemit_unresolved_putstatic in class TemplateCompilerFrameworkfieldRef - the referenced fieldprotected void emit_resolved_putstatic(FieldReference fieldRef)
TemplateCompilerFrameworkemit_resolved_putstatic in class TemplateCompilerFrameworkfieldRef - the referenced fieldprotected void emit_unresolved_getfield(FieldReference fieldRef)
TemplateCompilerFrameworkemit_unresolved_getfield in class TemplateCompilerFrameworkfieldRef - the referenced fieldprotected void emit_resolved_getfield(FieldReference fieldRef)
TemplateCompilerFrameworkemit_resolved_getfield in class TemplateCompilerFrameworkfieldRef - the referenced fieldprotected void emit_aload_resolved_getfield(int index, FieldReference fieldRef)
emit_aload_resolved_getfield in class BaselineCompilerindex - the local index to loadfieldRef - the referenced fieldprotected void emit_unresolved_putfield(FieldReference fieldRef)
TemplateCompilerFrameworkemit_unresolved_putfield in class TemplateCompilerFrameworkfieldRef - the referenced fieldprotected void emit_resolved_putfield(FieldReference fieldRef)
TemplateCompilerFrameworkemit_resolved_putfield in class TemplateCompilerFrameworkfieldRef - the referenced fieldprotected void emit_unresolved_invokevirtual(MethodReference methodRef)
TemplateCompilerFrameworkemit_unresolved_invokevirtual in class TemplateCompilerFrameworkmethodRef - the referenced methodprotected void emit_resolved_invokevirtual(MethodReference methodRef)
TemplateCompilerFrameworkemit_resolved_invokevirtual in class TemplateCompilerFrameworkmethodRef - the referenced methodprotected void emit_resolved_invokespecial(MethodReference methodRef, RVMMethod target)
TemplateCompilerFrameworkemit_resolved_invokespecial in class TemplateCompilerFrameworkmethodRef - the referenced methodtarget - the method to invokeprotected void emit_unresolved_invokespecial(MethodReference methodRef)
TemplateCompilerFrameworkemit_unresolved_invokespecial in class TemplateCompilerFrameworkmethodRef - the referenced methodprotected void emit_unresolved_invokestatic(MethodReference methodRef)
TemplateCompilerFrameworkemit_unresolved_invokestatic in class TemplateCompilerFrameworkmethodRef - the referenced methodprotected void emit_resolved_invokestatic(MethodReference methodRef)
TemplateCompilerFrameworkemit_resolved_invokestatic in class TemplateCompilerFrameworkmethodRef - the referenced methodprotected void emit_invokeinterface(MethodReference methodRef)
TemplateCompilerFrameworkemit_invokeinterface in class TemplateCompilerFrameworkmethodRef - the referenced methodprotected void emit_resolved_new(RVMClass typeRef)
TemplateCompilerFrameworkemit_resolved_new in class TemplateCompilerFrameworktypeRef - The RVMClass to instantiateprotected void emit_unresolved_new(TypeReference typeRef)
TemplateCompilerFrameworkemit_unresolved_new in class TemplateCompilerFrameworktypeRef - TypeReference to dynamically link & instantiateprotected void emit_resolved_newarray(RVMArray array)
TemplateCompilerFrameworkemit_resolved_newarray in class TemplateCompilerFrameworkarray - the RVMArray to instantiateprotected void emit_unresolved_newarray(TypeReference tRef)
TemplateCompilerFrameworkemit_unresolved_newarray in class TemplateCompilerFrameworktRef - typeReference to dynamically link & instantiateprotected void emit_multianewarray(TypeReference typeRef, int dimensions)
TemplateCompilerFrameworkemit_multianewarray in class TemplateCompilerFrameworktypeRef - typeReference to dynamically link & instantiatedimensions - the number of dimensionsprotected void emit_arraylength()
TemplateCompilerFrameworkemit_arraylength in class TemplateCompilerFrameworkprotected void emit_athrow()
TemplateCompilerFrameworkemit_athrow in class TemplateCompilerFrameworkprotected void emit_checkcast(TypeReference typeRef)
TemplateCompilerFrameworkemit_checkcast in class TemplateCompilerFrameworktypeRef - the LHS typeprotected void emit_checkcast_resolvedInterface(RVMClass type)
TemplateCompilerFrameworkemit_checkcast_resolvedInterface in class TemplateCompilerFrameworktype - the LHS typeprotected void emit_checkcast_resolvedClass(RVMClass type)
TemplateCompilerFrameworkemit_checkcast_resolvedClass in class TemplateCompilerFrameworktype - the LHS typeprotected void emit_checkcast_final(RVMType type)
TemplateCompilerFrameworkemit_checkcast_final in class TemplateCompilerFrameworktype - the LHS typeprotected void emit_instanceof(TypeReference typeRef)
TemplateCompilerFrameworkemit_instanceof in class TemplateCompilerFrameworktypeRef - the LHS typeprotected void emit_instanceof_resolvedInterface(RVMClass type)
TemplateCompilerFrameworkemit_instanceof_resolvedInterface in class TemplateCompilerFrameworktype - the LHS typeprotected void emit_instanceof_resolvedClass(RVMClass type)
TemplateCompilerFrameworkemit_instanceof_resolvedClass in class TemplateCompilerFrameworktype - the LHS typeprotected void emit_instanceof_final(RVMType type)
TemplateCompilerFrameworkemit_instanceof_final in class TemplateCompilerFrameworktype - the LHS typeprotected void emit_monitorenter()
TemplateCompilerFrameworkemit_monitorenter in class TemplateCompilerFrameworkprotected void emit_monitorexit()
TemplateCompilerFrameworkemit_monitorexit in class TemplateCompilerFrameworkprivate void genPrologue()
protected void emit_deferred_prologue()
emit_deferred_prologue in class TemplateCompilerFrameworkprivate void genEpilogue(int returnSize, int bytesPopped)
returnSize - the size in bytes of the returned valuebytesPopped - number of paramter bytes already releasedprivate void genMonitorEnter()
private void genMonitorExit()
private static void genNullCheck(Assembler asm, RegisterConstants.GPR objRefReg)
asm - the assembler to generate intoobjRefReg - the register containing the referencestatic void genBoundsCheck(Assembler asm, RegisterConstants.GPR indexReg, RegisterConstants.GPR arrayRefReg)
asm - the assembler to generate intoindexReg - the register containing the indexarrayRefReg - the register containing the array referenceprivate void genCondBranch(byte cond, int bTarget)
cond - condition bytebTarget - target bytecode indexprivate void incEdgeCounter(RegisterConstants.GPR scratch, RegisterConstants.GPR idx, int counterIdx)
scratch - register to use as scratchidx - optional register holding index value or nullcounterIdx - index in to counters arraystatic void genParameterRegisterLoad(Assembler asm, int params)
asm - assembler to use for generationparams - number of parameter words (including "this" if any).protected void genParameterRegisterLoad(MethodReference method, boolean hasThisParam)
method - is the method to be called.hasThisParam - is the method virtual?private void genParameterCopy(Offset srcOffset)
Assumption: although some parameters may be passed in registers, space for all parameters is laid out in order on the caller's stackframe.
srcOffset - offset from frame pointer of first parameter in caller's stackframe.private void genResultRegisterUnload(MethodReference m)
m - the method whose return value is to be pushedprivate void genThreadSwitchTest(int whereFrom)
whereFrom - is this thread switch from a PROLOGUE, BACKEDGE, or EPILOGUE?private boolean genMagic(MethodReference m)
m - method to generateprivate Offset localOffset(int local) throws BaselineCompilerImpl.UnreachableBytecodeException
local - index of localBaselineCompilerImpl.UnreachableBytecodeException - when the stack heights information for
the current bytecode is invalid. This can only happen when the bytecode is
unreachable.private Offset fp2spOffset(Offset offset)
offset - the FP offsetstatic void emitDynamicLinkingSequence(Assembler asm, RegisterConstants.GPR reg, MemberReference ref, boolean couldBeZero)
asm - assembler to generate code intoreg - register to hold offset to methodref - method reference to be resolvedcouldBeZero - could the value in the offsets table require resolvingprotected void emit_invoke_compiledmethod(CompiledMethod cm)
I have not thought about GCMaps for invoke_compiledmethod.
TODO: Figure out what the above GCMaps comment means and fix it!
emit_invoke_compiledmethod in class TemplateCompilerFrameworkprotected void emit_loadretaddrconst(int bcIndex)
emit_loadretaddrconst in class TemplateCompilerFrameworkprotected ForwardReference emit_pending_goto(int bTarget)
emit_pending_goto in class TemplateCompilerFrameworkbTarget - is optional, it emits a JUMP instruction, but the caller
is responsible for patching the target address by calling the resolve method
of the returned forward reference.