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

Unified Diff: src/vm-state.h

Issue 2840018: [Isolates] Moved more compilation-related globals (builtins, runtime, &c.)... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/isolates/
Patch Set: rebase Created 10 years, 6 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
« src/runtime.h ('K') | « 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 4955)
+++ src/vm-state.h (working copy)
@@ -28,6 +28,8 @@
#ifndef V8_VM_STATE_H_
#define V8_VM_STATE_H_
+#include "isolate.h"
+
namespace v8 {
namespace internal {
@@ -44,15 +46,17 @@
// Used for debug asserts.
static bool is_outermost_external() {
- return current_state_ == NULL;
+ return Isolate::Current()->vm_state() == NULL;
}
static StateTag current_state() {
- return current_state_ ? current_state_->state() : EXTERNAL;
+ VMState* state = Isolate::Current()->vm_state();
+ return state ? state->state() : EXTERNAL;
}
static Address external_callback() {
- return current_state_ ? current_state_->external_callback_ : NULL;
+ VMState* state = Isolate::Current()->vm_state();
+ return state ? state->external_callback_ : NULL;
}
private:
@@ -60,9 +64,7 @@
StateTag state_;
VMState* previous_;
Address external_callback_;
-
- // A stack of VM states.
- static VMState* current_state_;
+ Isolate* isolate_;
#else
public:
explicit VMState(StateTag state) {}
« src/runtime.h ('K') | « src/top.cc ('k') | src/vm-state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698