summaryrefslogtreecommitdiff
path: root/src/interpreter/interpreter.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/interpreter/interpreter.cc')
-rw-r--r--src/interpreter/interpreter.cc12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/interpreter/interpreter.cc b/src/interpreter/interpreter.cc
index a89fb113c3..16e04a5a3f 100644
--- a/src/interpreter/interpreter.cc
+++ b/src/interpreter/interpreter.cc
@@ -420,9 +420,7 @@ static void DoInvoke(Thread* self, ShadowFrame& shadow_frame,
num_regs = code_item->registers_size_;
num_ins = code_item->ins_size_;
} else if (method->IsAbstract()) {
- ThrowLocation throw_location = self->GetCurrentLocationForThrow();
- self->ThrowNewExceptionF(throw_location, "Ljava/lang/AbstractMethodError;",
- "abstract method \"%s\"", PrettyMethod(method).c_str());
+ ThrowAbstractMethodError(method);
return;
} else {
DCHECK(method->IsNative() || method->IsProxyMethod());
@@ -511,9 +509,7 @@ static void DoInvokeVirtualQuick(Thread* self, ShadowFrame& shadow_frame,
num_regs = code_item->registers_size_;
num_ins = code_item->ins_size_;
} else if (method->IsAbstract()) {
- ThrowLocation throw_location = self->GetCurrentLocationForThrow();
- self->ThrowNewExceptionF(throw_location, "Ljava/lang/AbstractMethodError;",
- "abstract method \"%s\"", PrettyMethod(method).c_str());
+ ThrowAbstractMethodError(method);
return;
} else {
DCHECK(method->IsNative() || method->IsProxyMethod());
@@ -2988,9 +2984,7 @@ void EnterInterpreterFromInvoke(Thread* self, AbstractMethod* method, Object* re
num_regs = code_item->registers_size_;
num_ins = code_item->ins_size_;
} else if (method->IsAbstract()) {
- ThrowLocation throw_location = self->GetCurrentLocationForThrow();
- self->ThrowNewExceptionF(throw_location, "Ljava/lang/AbstractMethodError;",
- "abstract method \"%s\"", PrettyMethod(method).c_str());
+ ThrowAbstractMethodError(method);
return;
} else {
DCHECK(method->IsNative());