diff options
author | Sebastien Hertz <shertz@google.com> | 2014-02-21 15:46:30 +0100 |
---|---|---|
committer | Sebastien Hertz <shertz@google.com> | 2014-04-02 09:21:12 +0200 |
commit | ee1d79a603c77c0667b27c075a983579d5c51f7e (patch) | |
tree | 7b23516402105319ab4736cd179a1de9101eeb46 /runtime/interpreter/interpreter.cc | |
parent | 78bd9b2198f0ccc48036c1517b2d9a9023157dfb (diff) | |
download | art-ee1d79a603c77c0667b27c075a983579d5c51f7e.zip art-ee1d79a603c77c0667b27c075a983579d5c51f7e.tar.gz art-ee1d79a603c77c0667b27c075a983579d5c51f7e.tar.bz2 |
Cleanup transaction support
Updates Thread::CreateInternalStackTrace to support both transactional and
non-transactional modes using template.
Generalizes non-transactional mode for invariant fields (which are set only
once).
Removes ArrayLog::VisitRoots as we never create Array logs of ObjectArray. As
ObjectArray elements are set using Object::SetFieldObject, they are already
recorded in the object logs: the object is the array itself and the offset
corresponds to the element index in this array. And also checks we never log
ObjectArray in array logs.
Fixes location of thrown exception when calling native method during class
initialization.
Change-Id: Idbc368d3b8292b85ff40bc8a7c559e085477bf89
Diffstat (limited to 'runtime/interpreter/interpreter.cc')
-rw-r--r-- | runtime/interpreter/interpreter.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/interpreter/interpreter.cc b/runtime/interpreter/interpreter.cc index abe7fe1..1bf0078 100644 --- a/runtime/interpreter/interpreter.cc +++ b/runtime/interpreter/interpreter.cc @@ -68,7 +68,7 @@ static void UnstartedRuntimeJni(Thread* self, ArtMethod* method, result->SetL(Array::CreateMultiArray(self, sirt_class, sirt_dimensions)); } else if (name == "java.lang.Object java.lang.Throwable.nativeFillInStackTrace()") { ScopedObjectAccessUnchecked soa(self); - result->SetL(soa.Decode<Object*>(self->CreateInternalStackTrace(soa))); + result->SetL(soa.Decode<Object*>(self->CreateInternalStackTrace<true>(soa))); } else if (name == "int java.lang.System.identityHashCode(java.lang.Object)") { mirror::Object* obj = reinterpret_cast<Object*>(args[0]); result->SetI((obj != nullptr) ? obj->IdentityHashCode() : 0); @@ -96,7 +96,7 @@ static void UnstartedRuntimeJni(Thread* self, ArtMethod* method, result->SetI(Primitive::ComponentSize(primitive_type)); } else { // Throw an exception so we can abort the transaction and undo every change. - ThrowLocation throw_location; + ThrowLocation throw_location = self->GetCurrentLocationForThrow(); self->ThrowNewExceptionF(throw_location, "Ljava/lang/InternalError;", "Attempt to invoke native method in non-started runtime: %s", name.c_str()); |