Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(302)

Unified Diff: src/vm-state.h

Issue 3828016: Make state stack thread local. When using Lockers the state stacks of... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/top.cc ('k') | src/vm-state.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {}
« no previous file with comments | « src/top.cc ('k') | src/vm-state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698