summaryrefslogtreecommitdiffstats
path: root/runtime/reflection.cc
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2014-12-02 11:13:19 -0800
committerIan Rogers <irogers@google.com>2014-12-02 11:13:49 -0800
commite94652f1e321b2c8b71acbe5b07d2ebf69fbdb99 (patch)
treeb4c2a4435800222fa740a5ae57fa217b6aed0875 /runtime/reflection.cc
parentf25c2ec6b63e116f24f359a10b59c78768fde67a (diff)
downloadart-e94652f1e321b2c8b71acbe5b07d2ebf69fbdb99.zip
art-e94652f1e321b2c8b71acbe5b07d2ebf69fbdb99.tar.gz
art-e94652f1e321b2c8b71acbe5b07d2ebf69fbdb99.tar.bz2
Remove MethodHelper from the interpreter.
Use ShadowFrame to get the executing method to avoid a handle for the current method. Various associated bits of header file clean-up and removal of an unnecessary use of MethodHelper in CompilerDriver. Change-Id: I3b6f4413701e8fc6b0c58b0041a0dd15472bedaa
Diffstat (limited to 'runtime/reflection.cc')
-rw-r--r--runtime/reflection.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/runtime/reflection.cc b/runtime/reflection.cc
index 44d1bc4..07afcb6 100644
--- a/runtime/reflection.cc
+++ b/runtime/reflection.cc
@@ -528,7 +528,7 @@ JValue InvokeVirtualOrInterfaceWithVarArgs(const ScopedObjectAccessAlreadyRunnab
}
void InvokeWithShadowFrame(Thread* self, ShadowFrame* shadow_frame, uint16_t arg_offset,
- MethodHelper* mh, JValue* result) {
+ JValue* result) {
// We want to make sure that the stack is not within a small distance from the
// protected region in case we are calling into a leaf function whose stack
// check has been elided.
@@ -536,11 +536,12 @@ void InvokeWithShadowFrame(Thread* self, ShadowFrame* shadow_frame, uint16_t arg
ThrowStackOverflowError(self);
return;
}
-
- ArgArray arg_array(mh->GetShorty(), mh->GetShortyLength());
+ uint32_t shorty_len;
+ const char* shorty = shadow_frame->GetMethod()->GetShorty(&shorty_len);
+ ArgArray arg_array(shorty, shorty_len);
arg_array.BuildArgArrayFromFrame(shadow_frame, arg_offset);
shadow_frame->GetMethod()->Invoke(self, arg_array.GetArray(), arg_array.GetNumBytes(), result,
- mh->GetShorty());
+ shorty);
}
jobject InvokeMethod(const ScopedObjectAccessAlreadyRunnable& soa, jobject javaMethod,