Index: src/vm-state.h |
=================================================================== |
--- src/vm-state.h (revision 5653) |
+++ src/vm-state.h (working copy) |
@@ -28,6 +28,8 @@ |
#ifndef V8_VM_STATE_H_ |
#define V8_VM_STATE_H_ |
+#include "top.h" |
+ |
namespace v8 { |
namespace internal { |
@@ -44,16 +46,16 @@ |
// Used for debug asserts. |
static bool is_outermost_external() { |
- return current_state_ == 0; |
+ return Top::current_vm_state() == 0; |
} |
static StateTag current_state() { |
- VMState* state = reinterpret_cast<VMState*>(current_state_); |
+ VMState* state = Top::current_vm_state(); |
return state ? state->state() : EXTERNAL; |
} |
static Address external_callback() { |
- VMState* state = reinterpret_cast<VMState*>(current_state_); |
+ VMState* state = Top::current_vm_state(); |
return state ? state->external_callback_ : NULL; |
} |
@@ -63,8 +65,6 @@ |
VMState* previous_; |
Address external_callback_; |
- // A stack of VM states. |
- static AtomicWord current_state_; |
#else |
public: |
explicit VMState(StateTag state) {} |