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/entrypoints/quick/quick_field_entrypoints.cc b/runtime/entrypoints/quick/quick_field_entrypoints.cc
index 7326fcf..22bf939 100644
--- a/runtime/entrypoints/quick/quick_field_entrypoints.cc
+++ b/runtime/entrypoints/quick/quick_field_entrypoints.cc
@@ -155,8 +155,7 @@
                                                          sizeof(int8_t));
   if (LIKELY(field != nullptr)) {
     if (UNLIKELY(obj == nullptr)) {
-      ThrowLocation throw_location = self->GetCurrentLocationForThrow();
-      ThrowNullPointerExceptionForFieldAccess(throw_location, field, true);
+      ThrowNullPointerExceptionForFieldAccess(field, true);
     } else {
       return field->GetByte(obj);
     }
@@ -177,8 +176,7 @@
                                                          sizeof(int8_t));
   if (LIKELY(field != nullptr)) {
     if (UNLIKELY(obj == nullptr)) {
-      ThrowLocation throw_location = self->GetCurrentLocationForThrow();
-      ThrowNullPointerExceptionForFieldAccess(throw_location, field, true);
+      ThrowNullPointerExceptionForFieldAccess(field, true);
     } else {
       return field->GetBoolean(obj);
     }
@@ -198,8 +196,7 @@
                                                          sizeof(int16_t));
   if (LIKELY(field != nullptr)) {
     if (UNLIKELY(obj == nullptr)) {
-      ThrowLocation throw_location = self->GetCurrentLocationForThrow();
-      ThrowNullPointerExceptionForFieldAccess(throw_location, field, true);
+      ThrowNullPointerExceptionForFieldAccess(field, true);
     } else {
       return field->GetShort(obj);
     }
@@ -220,8 +217,7 @@
                                                          sizeof(int16_t));
   if (LIKELY(field != nullptr)) {
     if (UNLIKELY(obj == nullptr)) {
-      ThrowLocation throw_location = self->GetCurrentLocationForThrow();
-      ThrowNullPointerExceptionForFieldAccess(throw_location, field, true);
+      ThrowNullPointerExceptionForFieldAccess(field, true);
     } else {
       return field->GetChar(obj);
     }
@@ -242,8 +238,7 @@
                                                          sizeof(int32_t));
   if (LIKELY(field != nullptr)) {
     if (UNLIKELY(obj == nullptr)) {
-      ThrowLocation throw_location = self->GetCurrentLocationForThrow();
-      ThrowNullPointerExceptionForFieldAccess(throw_location, field, true);
+      ThrowNullPointerExceptionForFieldAccess(field, true);
     } else {
       return field->Get32(obj);
     }
@@ -264,8 +259,7 @@
                                                          sizeof(int64_t));
   if (LIKELY(field != nullptr)) {
     if (UNLIKELY(obj == nullptr)) {
-      ThrowLocation throw_location = self->GetCurrentLocationForThrow();
-      ThrowNullPointerExceptionForFieldAccess(throw_location, field, true);
+      ThrowNullPointerExceptionForFieldAccess(field, true);
     } else {
       return field->Get64(obj);
     }
@@ -287,8 +281,7 @@
                                                       sizeof(mirror::HeapReference<mirror::Object>));
   if (LIKELY(field != nullptr)) {
     if (UNLIKELY(obj == nullptr)) {
-      ThrowLocation throw_location = self->GetCurrentLocationForThrow();
-      ThrowNullPointerExceptionForFieldAccess(throw_location, field, true);
+      ThrowNullPointerExceptionForFieldAccess(field, true);
     } else {
       return field->GetObj(obj);
     }
@@ -448,8 +441,7 @@
   }
   if (LIKELY(field != nullptr)) {
     if (UNLIKELY(obj == nullptr)) {
-      ThrowLocation throw_location = self->GetCurrentLocationForThrow();
-      ThrowNullPointerExceptionForFieldAccess(throw_location, field, false);
+      ThrowNullPointerExceptionForFieldAccess(field, false);
     } else {
       Primitive::Type type = field->GetTypeAsPrimitiveType();
       // Compiled code can't use transactional mode.
@@ -489,8 +481,7 @@
   }
   if (LIKELY(field != nullptr)) {
     if (UNLIKELY(obj == nullptr)) {
-      ThrowLocation throw_location = self->GetCurrentLocationForThrow();
-      ThrowNullPointerExceptionForFieldAccess(throw_location, field, false);
+      ThrowNullPointerExceptionForFieldAccess(field, false);
     } else {
       Primitive::Type type = field->GetTypeAsPrimitiveType();
       // Compiled code can't use transactional mode.
@@ -525,8 +516,7 @@
   }
   if (LIKELY(field != nullptr)) {
     if (UNLIKELY(obj == nullptr)) {
-      ThrowLocation throw_location = self->GetCurrentLocationForThrow();
-      ThrowNullPointerExceptionForFieldAccess(throw_location, field, false);
+      ThrowNullPointerExceptionForFieldAccess(field, false);
     } else {
       // Compiled code can't use transactional mode.
       field->Set32<false>(obj, new_value);
@@ -551,8 +541,7 @@
                                                           sizeof(int64_t));
   if (LIKELY(field != nullptr)) {
     if (UNLIKELY(obj == nullptr)) {
-      ThrowLocation throw_location = self->GetCurrentLocationForThrow();
-      ThrowNullPointerExceptionForFieldAccess(throw_location, field, false);
+      ThrowNullPointerExceptionForFieldAccess(field, false);
     } else {
       // Compiled code can't use transactional mode.
       field->Set64<false>(obj, new_value);
@@ -578,8 +567,7 @@
                                                        sizeof(mirror::HeapReference<mirror::Object>));
   if (LIKELY(field != nullptr)) {
     if (UNLIKELY(obj == nullptr)) {
-      ThrowLocation throw_location = self->GetCurrentLocationForThrow();
-      ThrowNullPointerExceptionForFieldAccess(throw_location, field, false);
+      ThrowNullPointerExceptionForFieldAccess(field, false);
     } else {
       // Compiled code can't use transactional mode.
       field->SetObj<false>(obj, new_value);
diff --git a/runtime/entrypoints/quick/quick_lock_entrypoints.cc b/runtime/entrypoints/quick/quick_lock_entrypoints.cc
index 8ceac97..4423c08 100644
--- a/runtime/entrypoints/quick/quick_lock_entrypoints.cc
+++ b/runtime/entrypoints/quick/quick_lock_entrypoints.cc
@@ -25,9 +25,7 @@
     NO_THREAD_SAFETY_ANALYSIS /* EXCLUSIVE_LOCK_FUNCTION(Monitor::monitor_lock_) */ {
   ScopedQuickEntrypointChecks sqec(self);
   if (UNLIKELY(obj == nullptr)) {
-    ThrowLocation throw_location(self->GetCurrentLocationForThrow());
-    ThrowNullPointerException(&throw_location,
-                              "Null reference used for synchronization (monitor-enter)");
+    ThrowNullPointerException("Null reference used for synchronization (monitor-enter)");
     return -1;  // Failure.
   } else {
     if (kIsDebugBuild) {
@@ -47,9 +45,7 @@
     NO_THREAD_SAFETY_ANALYSIS /* UNLOCK_FUNCTION(Monitor::monitor_lock_) */ {
   ScopedQuickEntrypointChecks sqec(self);
   if (UNLIKELY(obj == nullptr)) {
-    ThrowLocation throw_location(self->GetCurrentLocationForThrow());
-    ThrowNullPointerException(&throw_location,
-                              "Null reference used for synchronization (monitor-exit)");
+    ThrowNullPointerException("Null reference used for synchronization (monitor-exit)");
     return -1;  // Failure.
   } else {
     // MonitorExit may throw exception.
diff --git a/runtime/entrypoints/quick/quick_throw_entrypoints.cc b/runtime/entrypoints/quick/quick_throw_entrypoints.cc
index 127f9e0..70317bb 100644
--- a/runtime/entrypoints/quick/quick_throw_entrypoints.cc
+++ b/runtime/entrypoints/quick/quick_throw_entrypoints.cc
@@ -42,9 +42,7 @@
    */
   ScopedQuickEntrypointChecks sqec(self);
   if (exception == nullptr) {
-    ThrowLocation throw_location = self->GetCurrentLocationForThrow();
-    self->ThrowNewException(throw_location, "Ljava/lang/NullPointerException;",
-                            "throw with null exception");
+    self->ThrowNewException("Ljava/lang/NullPointerException;", "throw with null exception");
   } else {
     self->SetException(exception);
   }
@@ -56,8 +54,7 @@
     SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
   ScopedQuickEntrypointChecks sqec(self);
   self->NoteSignalBeingHandled();
-  ThrowLocation throw_location = self->GetCurrentLocationForThrow();
-  ThrowNullPointerExceptionFromDexPC(throw_location);
+  ThrowNullPointerExceptionFromDexPC();
   self->NoteSignalHandlerDone();
   self->QuickDeliverException();
 }