Remove kExceptionPending flag from thread and codegen.
Code just checks if exception_ is NULL instead. Compiled code simply
clears the exception_ field for MOVE_EXCEPTION instead of calling a
helper.
Change-Id: Iefaa780f66c327c3d20598bd71d3c14d7a9c8119
diff --git a/src/thread.h b/src/thread.h
index 352da27..76aea75 100644
--- a/src/thread.h
+++ b/src/thread.h
@@ -102,8 +102,7 @@
kSuspendRequest = 1, // If set implies that suspend_count_ > 0 and the Thread should enter the
// safepoint handler.
kCheckpointRequest = 2, // Request that the thread do some checkpoint work and then continue.
- kExceptionPending = 4, // If set implies that exception_ != NULL.
- kEnterInterpreter = 8, // Instruct managed code it should enter the interpreter.
+ kEnterInterpreter = 4, // Instruct managed code it should enter the interpreter.
};
class PACKED(4) Thread {
@@ -301,9 +300,7 @@
bool IsStillStarting() const;
bool IsExceptionPending() const {
- bool result = ReadFlag(kExceptionPending);
- DCHECK_EQ(result, exception_ != NULL);
- return result;
+ return exception_ != NULL;
}
Throwable* GetException() const SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
@@ -316,14 +313,10 @@
CHECK(new_exception != NULL);
// TODO: DCHECK(!IsExceptionPending());
exception_ = new_exception;
- AtomicSetFlag(kExceptionPending);
- DCHECK(IsExceptionPending());
}
void ClearException() {
exception_ = NULL;
- AtomicClearFlag(kExceptionPending);
- DCHECK(!IsExceptionPending());
}
void DeliverException(Throwable* exception) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {