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
diff --git a/runtime/runtime.h b/runtime/runtime.h
index 50c88d3..84c2c87 100644
--- a/runtime/runtime.h
+++ b/runtime/runtime.h
@@ -378,7 +378,9 @@
void UpdateProfilerState(int state);
// Transaction support.
- bool IsActiveTransaction() const;
+ bool IsActiveTransaction() const {
+ return preinitialization_transaction_ != nullptr;
+ }
void EnterTransactionMode(Transaction* transaction);
void ExitTransactionMode();
void RecordWriteField32(mirror::Object* obj, MemberOffset field_offset, uint32_t value,
@@ -544,7 +546,7 @@
bool dump_gc_performance_on_shutdown_;
// Transaction used for pre-initializing classes at compilation time.
- Transaction* preinitialization_transaction;
+ Transaction* preinitialization_transaction_;
NullPointerHandler* null_pointer_handler_;
SuspensionHandler* suspend_handler_;
StackOverflowHandler* stack_overflow_handler_;