Remove ThrowLocation.
Note that this is a cleanup change, and has no functionality change.
The ThrowLocation had no use anymore.
Change-Id: I3d2126af1dc673cec3a0453ff3d56a172663a5f6
diff --git a/runtime/interpreter/interpreter_common.cc b/runtime/interpreter/interpreter_common.cc
index e6e647c..2a9c0d4 100644
--- a/runtime/interpreter/interpreter_common.cc
+++ b/runtime/interpreter/interpreter_common.cc
@@ -23,8 +23,8 @@
namespace art {
namespace interpreter {
-void ThrowNullPointerExceptionFromInterpreter(const ShadowFrame& shadow_frame) {
- ThrowNullPointerExceptionFromDexPC(shadow_frame.GetCurrentLocationForThrow());
+void ThrowNullPointerExceptionFromInterpreter() {
+ ThrowNullPointerExceptionFromDexPC();
}
template<FindFieldType find_type, Primitive::Type field_type, bool do_access_check>
@@ -44,7 +44,7 @@
} else {
obj = shadow_frame.GetVRegReference(inst->VRegB_22c(inst_data));
if (UNLIKELY(obj == nullptr)) {
- ThrowNullPointerExceptionForFieldAccess(shadow_frame.GetCurrentLocationForThrow(), f, true);
+ ThrowNullPointerExceptionForFieldAccess(f, true);
return false;
}
}
@@ -126,7 +126,7 @@
if (UNLIKELY(obj == nullptr)) {
// We lost the reference to the field index so we cannot get a more
// precised exception message.
- ThrowNullPointerExceptionFromDexPC(shadow_frame.GetCurrentLocationForThrow());
+ ThrowNullPointerExceptionFromDexPC();
return false;
}
MemberOffset field_offset(inst->VRegC_22c());
@@ -238,8 +238,7 @@
} else {
obj = shadow_frame.GetVRegReference(inst->VRegB_22c(inst_data));
if (UNLIKELY(obj == nullptr)) {
- ThrowNullPointerExceptionForFieldAccess(shadow_frame.GetCurrentLocationForThrow(),
- f, false);
+ ThrowNullPointerExceptionForFieldAccess(f, false);
return false;
}
}
@@ -289,8 +288,7 @@
if (!reg->VerifierInstanceOf(field_class)) {
// This should never happen.
std::string temp1, temp2, temp3;
- self->ThrowNewExceptionF(self->GetCurrentLocationForThrow(),
- "Ljava/lang/VirtualMachineError;",
+ self->ThrowNewExceptionF("Ljava/lang/VirtualMachineError;",
"Put '%s' that is not instance of field '%s' in '%s'",
reg->GetClass()->GetDescriptor(&temp1),
field_class->GetDescriptor(&temp2),
@@ -346,7 +344,7 @@
if (UNLIKELY(obj == nullptr)) {
// We lost the reference to the field index so we cannot get a more
// precised exception message.
- ThrowNullPointerExceptionFromDexPC(shadow_frame.GetCurrentLocationForThrow());
+ ThrowNullPointerExceptionFromDexPC();
return false;
}
MemberOffset field_offset(inst->VRegC_22c());
@@ -555,8 +553,7 @@
if (!o->VerifierInstanceOf(arg_type)) {
// This should never happen.
std::string temp1, temp2;
- self->ThrowNewExceptionF(self->GetCurrentLocationForThrow(),
- "Ljava/lang/VirtualMachineError;",
+ self->ThrowNewExceptionF("Ljava/lang/VirtualMachineError;",
"Invoking %s with bad arg %d, type '%s' not instance of '%s'",
new_shadow_frame->GetMethod()->GetName(), shorty_pos,
o->GetClass()->GetDescriptor(&temp1),
@@ -658,8 +655,7 @@
ThrowRuntimeException("Bad filled array request for type %s",
PrettyDescriptor(componentClass).c_str());
} else {
- self->ThrowNewExceptionF(shadow_frame.GetCurrentLocationForThrow(),
- "Ljava/lang/InternalError;",
+ self->ThrowNewExceptionF("Ljava/lang/InternalError;",
"Found type %s; filled-new-array not implemented for anything but 'int'",
PrettyDescriptor(componentClass).c_str());
}
@@ -776,8 +772,7 @@
// If it is not an InternalError, wrap it.
std::string type(PrettyTypeOf(self->GetException()));
if (type != "java.lang.InternalError") {
- self->ThrowNewWrappedException(self->GetCurrentLocationForThrow(),
- "Ljava/lang/ClassNotFoundException;",
+ self->ThrowNewWrappedException("Ljava/lang/ClassNotFoundException;",
"ClassNotFoundException");
}
}
@@ -856,7 +851,7 @@
ok = true;
}
} else {
- self->ThrowNewExceptionF(self->GetCurrentLocationForThrow(), "Ljava/lang/InternalError;",
+ self->ThrowNewExceptionF("Ljava/lang/InternalError;",
"Could not find default constructor for '%s'",
PrettyClass(h_klass.Get()).c_str());
}
@@ -865,9 +860,7 @@
std::string error_msg = StringPrintf("Failed in Class.newInstance for '%s' with %s",
PrettyClass(h_klass.Get()).c_str(),
PrettyTypeOf(self->GetException()).c_str());
- self->ThrowNewWrappedException(self->GetCurrentLocationForThrow(),
- "Ljava/lang/InternalError;",
- error_msg.c_str());
+ self->ThrowNewWrappedException("Ljava/lang/InternalError;", error_msg.c_str());
}
} else if (name == "java.lang.reflect.Field java.lang.Class.getDeclaredField(java.lang.String)") {
// Special managed code cut-out to allow field lookup in a un-started runtime that'd fail
@@ -938,7 +931,7 @@
dst->Set(dstPos + i, src->Get(srcPos + i));
}
} else {
- self->ThrowNewExceptionF(self->GetCurrentLocationForThrow(), "Ljava/lang/InternalError;",
+ self->ThrowNewExceptionF("Ljava/lang/InternalError;",
"Unimplemented System.arraycopy for type '%s'",
PrettyDescriptor(ctype).c_str());
}
@@ -1005,8 +998,7 @@
}
if (!ok) {
- self->ThrowNewException(self->GetCurrentLocationForThrow(), "Ljava/lang/InternalError;",
- "Unimplemented ThreadLocal.get");
+ self->ThrowNewException("Ljava/lang/InternalError;", "Unimplemented ThreadLocal.get");
}
} else {
// Not special, continue with regular interpreter execution.