diff options
-rw-r--r-- | libdex/InstrUtils.c | 2 | ||||
-rw-r--r-- | opcode-gen/bytecode.txt | 7 | ||||
-rw-r--r-- | vm/compiler/Frontend.c | 11 | ||||
-rw-r--r-- | vm/compiler/InlineTransformation.c | 4 | ||||
-rw-r--r-- | vm/interp/Jit.c | 2 |
5 files changed, 9 insertions, 17 deletions
diff --git a/libdex/InstrUtils.c b/libdex/InstrUtils.c index 9c2b48f72..c194bc3b4 100644 --- a/libdex/InstrUtils.c +++ b/libdex/InstrUtils.c @@ -297,7 +297,7 @@ static InstructionFlags gOpcodeFlagsTable[kNumDalvikInstructions] = { kInstrCanThrow, kInstrCanContinue|kInstrCanThrow, kInstrCanContinue|kInstrCanThrow, - kInstrCanContinue|kInstrCanThrow|kInstrInvoke, + kInstrCanContinue, kInstrCanReturn, kInstrCanContinue|kInstrCanThrow, kInstrCanContinue|kInstrCanThrow, diff --git a/opcode-gen/bytecode.txt b/opcode-gen/bytecode.txt index b24e6119a..773a1f7fe 100644 --- a/opcode-gen/bytecode.txt +++ b/opcode-gen/bytecode.txt @@ -74,7 +74,10 @@ format 3rms # switch -- is a switch # throw -- might throw an exception # return -- is a return from method -# invoke -- is a method invoke +# invoke -- is a method invoke; this is only used for true +# method invokes and notably *not* vm-implemented +# execute-inline nor the nop-equivalent +# invoke-direct-empty # Regular opcodes (with a couple holes) op 00 nop 10x n none continue @@ -316,7 +319,7 @@ op ec ^breakpoint 00x n unknown optimized op ed ^throw-verification-error 20bc n varies optimized|throw op ee +execute-inline 35mi n inline-method optimized|continue|throw op ef +execute-inline/range 3rmi n inline-method optimized|continue|throw -op f0 +invoke-direct-empty 35c n method-ref optimized|continue|throw|invoke +op f0 +invoke-direct-empty 35c n method-ref optimized|continue op f1 +return-void-barrier 10x n none optimized|return op f2 +iget-quick 22cs y field-offset optimized|continue|throw op f3 +iget-wide-quick 22cs y field-offset optimized|continue|throw diff --git a/vm/compiler/Frontend.c b/vm/compiler/Frontend.c index 4e5a88212..c2ee4964a 100644 --- a/vm/compiler/Frontend.c +++ b/vm/compiler/Frontend.c @@ -208,8 +208,7 @@ static int analyzeInlineTarget(DecodedInstruction *dalvikInsn, int attributes, int flags = dexGetInstrFlags(dalvikInsn->opCode); int dalvikOpCode = dalvikInsn->opCode; - if ((flags & kInstrInvoke) && - (dalvikOpCode != OP_INVOKE_DIRECT_EMPTY)) { + if (flags & kInstrInvoke) { attributes &= ~METHOD_IS_LEAF; } @@ -572,8 +571,7 @@ bool dvmCompileTrace(JitTraceDescription *desc, int numMaxInsts, int flags = dexGetInstrFlags(insn->dalvikInsn.opCode); - if ((flags & kInstrInvoke) && - (insn->dalvikInsn.opCode != OP_INVOKE_DIRECT_EMPTY)) { + if (flags & kInstrInvoke) { assert(numInsts == 1); CallsiteInfo *callsiteInfo = dvmCompilerNew(sizeof(CallsiteInfo), true); @@ -673,13 +671,10 @@ bool dvmCompileTrace(JitTraceDescription *desc, int numMaxInsts, * currently only due to trace length constraint. In this case we need * to generate an explicit branch at the end of the block to jump to * the chaining cell. - * - * NOTE: INVOKE_DIRECT_EMPTY is actually not an invoke but a nop */ curBB->needFallThroughBranch = ((flags & (kInstrCanBranch | kInstrCanSwitch | kInstrCanReturn | - kInstrInvoke)) == 0) || - (lastInsn->dalvikInsn.opCode == OP_INVOKE_DIRECT_EMPTY); + kInstrInvoke)) == 0); /* Only form a loop if JIT_OPT_NO_LOOP is not set */ if (curBB->taken == NULL && diff --git a/vm/compiler/InlineTransformation.c b/vm/compiler/InlineTransformation.c index 92488b16c..243d16bce 100644 --- a/vm/compiler/InlineTransformation.c +++ b/vm/compiler/InlineTransformation.c @@ -302,10 +302,6 @@ void dvmCompilerInlineMIR(CompilationUnit *cUnit) if ((flags & kInstrInvoke) == 0) continue; - /* Not a real invoke - continue */ - if (opCode == OP_INVOKE_DIRECT_EMPTY) - continue; - /* * If the invoke itself is selected for single stepping, don't bother * to inline it. diff --git a/vm/interp/Jit.c b/vm/interp/Jit.c index 151e66f12..cd5bfbdcd 100644 --- a/vm/interp/Jit.c +++ b/vm/interp/Jit.c @@ -784,8 +784,6 @@ int dvmCheckJit(const u2* pc, Thread* self, InterpState* interpState, } if (!dexIsGoto(flags) && - /* don't end trace on INVOKE_DIRECT_EMPTY */ - (decInsn.opCode != OP_INVOKE_DIRECT_EMPTY) && ((flags & (kInstrCanBranch | kInstrCanSwitch | kInstrCanReturn | |