diff options
author | Sebastien Hertz <shertz@google.com> | 2013-09-10 11:44:19 +0200 |
---|---|---|
committer | Sebastien Hertz <shertz@google.com> | 2013-09-30 08:57:33 +0200 |
commit | c61124bdeaae94f977ffc36ac69535e792c226f2 (patch) | |
tree | 41ba8619a6dea88a8c607836db21531b05a3787a /runtime/stack.h | |
parent | 7541c745e00b49983f277d6b6b18bc4c174c7e39 (diff) | |
download | art-c61124bdeaae94f977ffc36ac69535e792c226f2.zip art-c61124bdeaae94f977ffc36ac69535e792c226f2.tar.gz art-c61124bdeaae94f977ffc36ac69535e792c226f2.tar.bz2 |
Cleanup invoke in interpreter.
Some cleanup in invocation stuff:
- Get the number of invoke arguments from instruction (vA) rather than get it
from its code item. This benefits to native invoke since we no longer need to
parse the method's shorty. Also pass the low 16 bits of instructions to avoid
fetching it twice when reading vA.
- Remove "is_static" tests by taking advantage of invoke type template argument
rather than testing method's access flags.
- Ensure Instruction::GetArgs is inlined.
- Check exception when initializing method's class when transitioning from
interpreter to compiled code (artInterpreterToCompiledCodeBridge).
- Move UnstartedRuntimeInvoke function to interpreter_common.cc and make it
static as it's only used by DoInvoke and DoInvokeVirtualQuick functions.
- Avoid duplicating code in ShadowFrame::Create.
Performance remains the same according to benchmarks. Hopefully, this should be
addressed in next CLs, especially by improving new shadow frame initialization.
Bug: 10668955
Change-Id: I514b8f098d0ef3e35921ceb770383aac1a9c7902
Diffstat (limited to 'runtime/stack.h')
-rw-r--r-- | runtime/stack.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/runtime/stack.h b/runtime/stack.h index 2bf3340..700b7f1 100644 --- a/runtime/stack.h +++ b/runtime/stack.h @@ -68,8 +68,7 @@ class ShadowFrame { static ShadowFrame* Create(uint32_t num_vregs, ShadowFrame* link, mirror::ArtMethod* method, uint32_t dex_pc) { uint8_t* memory = new uint8_t[ComputeSize(num_vregs)]; - ShadowFrame* sf = new (memory) ShadowFrame(num_vregs, link, method, dex_pc, true); - return sf; + return Create(num_vregs, link, method, dex_pc, memory); } // Create ShadowFrame for interpreter using provided memory. |