diff options
Diffstat (limited to 'runtime/interpreter/interpreter.cc')
-rw-r--r-- | runtime/interpreter/interpreter.cc | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/runtime/interpreter/interpreter.cc b/runtime/interpreter/interpreter.cc index 048c6e4d66..df66061d01 100644 --- a/runtime/interpreter/interpreter.cc +++ b/runtime/interpreter/interpreter.cc @@ -56,7 +56,7 @@ static void InterpreterJni(Thread* self, ScopedObjectAccessUnchecked soa(self); if (method->IsStatic()) { if (shorty == "L") { - typedef jobject (fntype)(JNIEnv*, jclass); + using fntype = jobject(JNIEnv*, jclass); fntype* const fn = reinterpret_cast<fntype*>(method->GetEntryPointFromJni()); ScopedLocalRef<jclass> klass(soa.Env(), soa.AddLocalReference<jclass>(method->GetDeclaringClass())); @@ -67,35 +67,35 @@ static void InterpreterJni(Thread* self, } result->SetL(soa.Decode<mirror::Object>(jresult)); } else if (shorty == "V") { - typedef void (fntype)(JNIEnv*, jclass); + using fntype = void(JNIEnv*, jclass); fntype* const fn = reinterpret_cast<fntype*>(method->GetEntryPointFromJni()); ScopedLocalRef<jclass> klass(soa.Env(), soa.AddLocalReference<jclass>(method->GetDeclaringClass())); ScopedThreadStateChange tsc(self, kNative); fn(soa.Env(), klass.get()); } else if (shorty == "Z") { - typedef jboolean (fntype)(JNIEnv*, jclass); + using fntype = jboolean(JNIEnv*, jclass); fntype* const fn = reinterpret_cast<fntype*>(method->GetEntryPointFromJni()); ScopedLocalRef<jclass> klass(soa.Env(), soa.AddLocalReference<jclass>(method->GetDeclaringClass())); ScopedThreadStateChange tsc(self, kNative); result->SetZ(fn(soa.Env(), klass.get())); } else if (shorty == "BI") { - typedef jbyte (fntype)(JNIEnv*, jclass, jint); + using fntype = jbyte(JNIEnv*, jclass, jint); fntype* const fn = reinterpret_cast<fntype*>(method->GetEntryPointFromJni()); ScopedLocalRef<jclass> klass(soa.Env(), soa.AddLocalReference<jclass>(method->GetDeclaringClass())); ScopedThreadStateChange tsc(self, kNative); result->SetB(fn(soa.Env(), klass.get(), args[0])); } else if (shorty == "II") { - typedef jint (fntype)(JNIEnv*, jclass, jint); + using fntype = jint(JNIEnv*, jclass, jint); fntype* const fn = reinterpret_cast<fntype*>(method->GetEntryPointFromJni()); ScopedLocalRef<jclass> klass(soa.Env(), soa.AddLocalReference<jclass>(method->GetDeclaringClass())); ScopedThreadStateChange tsc(self, kNative); result->SetI(fn(soa.Env(), klass.get(), args[0])); } else if (shorty == "LL") { - typedef jobject (fntype)(JNIEnv*, jclass, jobject); + using fntype = jobject(JNIEnv*, jclass, jobject); fntype* const fn = reinterpret_cast<fntype*>(method->GetEntryPointFromJni()); ScopedLocalRef<jclass> klass(soa.Env(), soa.AddLocalReference<jclass>(method->GetDeclaringClass())); @@ -108,14 +108,14 @@ static void InterpreterJni(Thread* self, } result->SetL(soa.Decode<mirror::Object>(jresult)); } else if (shorty == "IIZ") { - typedef jint (fntype)(JNIEnv*, jclass, jint, jboolean); + using fntype = jint(JNIEnv*, jclass, jint, jboolean); fntype* const fn = reinterpret_cast<fntype*>(method->GetEntryPointFromJni()); ScopedLocalRef<jclass> klass(soa.Env(), soa.AddLocalReference<jclass>(method->GetDeclaringClass())); ScopedThreadStateChange tsc(self, kNative); result->SetI(fn(soa.Env(), klass.get(), args[0], args[1])); } else if (shorty == "ILI") { - typedef jint (fntype)(JNIEnv*, jclass, jobject, jint); + using fntype = jint(JNIEnv*, jclass, jobject, jint); fntype* const fn = reinterpret_cast<fntype*>(const_cast<void*>( method->GetEntryPointFromJni())); ScopedLocalRef<jclass> klass(soa.Env(), @@ -125,7 +125,7 @@ static void InterpreterJni(Thread* self, ScopedThreadStateChange tsc(self, kNative); result->SetI(fn(soa.Env(), klass.get(), arg0.get(), args[1])); } else if (shorty == "SIZ") { - typedef jshort (fntype)(JNIEnv*, jclass, jint, jboolean); + using fntype = jshort(JNIEnv*, jclass, jint, jboolean); fntype* const fn = reinterpret_cast<fntype*>(const_cast<void*>(method->GetEntryPointFromJni())); ScopedLocalRef<jclass> klass(soa.Env(), @@ -133,14 +133,14 @@ static void InterpreterJni(Thread* self, ScopedThreadStateChange tsc(self, kNative); result->SetS(fn(soa.Env(), klass.get(), args[0], args[1])); } else if (shorty == "VIZ") { - typedef void (fntype)(JNIEnv*, jclass, jint, jboolean); + using fntype = void(JNIEnv*, jclass, jint, jboolean); fntype* const fn = reinterpret_cast<fntype*>(method->GetEntryPointFromJni()); ScopedLocalRef<jclass> klass(soa.Env(), soa.AddLocalReference<jclass>(method->GetDeclaringClass())); ScopedThreadStateChange tsc(self, kNative); fn(soa.Env(), klass.get(), args[0], args[1]); } else if (shorty == "ZLL") { - typedef jboolean (fntype)(JNIEnv*, jclass, jobject, jobject); + using fntype = jboolean(JNIEnv*, jclass, jobject, jobject); fntype* const fn = reinterpret_cast<fntype*>(method->GetEntryPointFromJni()); ScopedLocalRef<jclass> klass(soa.Env(), soa.AddLocalReference<jclass>(method->GetDeclaringClass())); @@ -151,7 +151,7 @@ static void InterpreterJni(Thread* self, ScopedThreadStateChange tsc(self, kNative); result->SetZ(fn(soa.Env(), klass.get(), arg0.get(), arg1.get())); } else if (shorty == "ZILL") { - typedef jboolean (fntype)(JNIEnv*, jclass, jint, jobject, jobject); + using fntype = jboolean(JNIEnv*, jclass, jint, jobject, jobject); fntype* const fn = reinterpret_cast<fntype*>(method->GetEntryPointFromJni()); ScopedLocalRef<jclass> klass(soa.Env(), soa.AddLocalReference<jclass>(method->GetDeclaringClass())); @@ -162,7 +162,7 @@ static void InterpreterJni(Thread* self, ScopedThreadStateChange tsc(self, kNative); result->SetZ(fn(soa.Env(), klass.get(), args[0], arg1.get(), arg2.get())); } else if (shorty == "VILII") { - typedef void (fntype)(JNIEnv*, jclass, jint, jobject, jint, jint); + using fntype = void(JNIEnv*, jclass, jint, jobject, jint, jint); fntype* const fn = reinterpret_cast<fntype*>(method->GetEntryPointFromJni()); ScopedLocalRef<jclass> klass(soa.Env(), soa.AddLocalReference<jclass>(method->GetDeclaringClass())); @@ -171,7 +171,7 @@ static void InterpreterJni(Thread* self, ScopedThreadStateChange tsc(self, kNative); fn(soa.Env(), klass.get(), args[0], arg1.get(), args[2], args[3]); } else if (shorty == "VLILII") { - typedef void (fntype)(JNIEnv*, jclass, jobject, jint, jobject, jint, jint); + using fntype = void(JNIEnv*, jclass, jobject, jint, jobject, jint, jint); fntype* const fn = reinterpret_cast<fntype*>(method->GetEntryPointFromJni()); ScopedLocalRef<jclass> klass(soa.Env(), soa.AddLocalReference<jclass>(method->GetDeclaringClass())); @@ -187,7 +187,7 @@ static void InterpreterJni(Thread* self, } } else { if (shorty == "L") { - typedef jobject (fntype)(JNIEnv*, jobject); + using fntype = jobject(JNIEnv*, jobject); fntype* const fn = reinterpret_cast<fntype*>(method->GetEntryPointFromJni()); ScopedLocalRef<jobject> rcvr(soa.Env(), soa.AddLocalReference<jobject>(receiver)); @@ -198,14 +198,14 @@ static void InterpreterJni(Thread* self, } result->SetL(soa.Decode<mirror::Object>(jresult)); } else if (shorty == "V") { - typedef void (fntype)(JNIEnv*, jobject); + using fntype = void(JNIEnv*, jobject); fntype* const fn = reinterpret_cast<fntype*>(method->GetEntryPointFromJni()); ScopedLocalRef<jobject> rcvr(soa.Env(), soa.AddLocalReference<jobject>(receiver)); ScopedThreadStateChange tsc(self, kNative); fn(soa.Env(), rcvr.get()); } else if (shorty == "LL") { - typedef jobject (fntype)(JNIEnv*, jobject, jobject); + using fntype = jobject(JNIEnv*, jobject, jobject); fntype* const fn = reinterpret_cast<fntype*>(method->GetEntryPointFromJni()); ScopedLocalRef<jobject> rcvr(soa.Env(), soa.AddLocalReference<jobject>(receiver)); @@ -219,7 +219,7 @@ static void InterpreterJni(Thread* self, result->SetL(soa.Decode<mirror::Object>(jresult)); ScopedThreadStateChange tsc(self, kNative); } else if (shorty == "III") { - typedef jint (fntype)(JNIEnv*, jobject, jint, jint); + using fntype = jint(JNIEnv*, jobject, jint, jint); fntype* const fn = reinterpret_cast<fntype*>(method->GetEntryPointFromJni()); ScopedLocalRef<jobject> rcvr(soa.Env(), soa.AddLocalReference<jobject>(receiver)); |