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

Unified Diff: src/vm-state.h

Issue 6529055: [Isolates] Merge crankshaft (r5922 from bleeding_edge). (Closed)
Patch Set: Win32 port Created 9 years, 10 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/version.cc ('k') | src/vm-state-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/vm-state.h
diff --git a/src/vm-state.h b/src/vm-state.h
index b7ecbf8e58b73be55df7f58db1f786a56f26231f..11fc6d67ef5981e0003ae52e6d52f2bbca41ed2a 100644
--- a/src/vm-state.h
+++ b/src/vm-state.h
@@ -36,39 +36,31 @@ namespace internal {
class VMState BASE_EMBEDDED {
#ifdef ENABLE_VMSTATE_TRACKING
public:
- inline VMState(Isolate* isolate, StateTag state);
+ inline VMState(Isolate* isolate, StateTag tag);
inline ~VMState();
- StateTag state() { return state_; }
- void set_external_callback(Address external_callback) {
- external_callback_ = external_callback;
- }
-
- // Used for debug asserts.
- static bool is_outermost_external() {
- return Isolate::Current()->current_vm_state() == 0;
- }
+ private:
+ Isolate* isolate_;
+ StateTag previous_tag_;
- static StateTag current_state() {
- VMState* state = Isolate::Current()->current_vm_state();
- return state ? state->state() : EXTERNAL;
- }
+#else
+ public:
+ VMState(Isolate* isolate, StateTag state) {}
+#endif
+};
- static Address external_callback() {
- VMState* state = Isolate::Current()->current_vm_state();
- return state ? state->external_callback_ : NULL;
- }
+class ExternalCallbackScope BASE_EMBEDDED {
+#ifdef ENABLE_LOGGING_AND_PROFILING
+ public:
+ inline ExternalCallbackScope(Isolate* isolate, Address callback);
+ inline ~ExternalCallbackScope();
private:
Isolate* isolate_;
- bool disabled_;
- StateTag state_;
- VMState* previous_;
- Address external_callback_;
-
+ Address previous_callback_;
#else
public:
- VMState(Isolate* isolate, StateTag state) {}
+ ExternalCallbackScope(Isolate* isolate, Address callback) {}
#endif
};
« no previous file with comments | « src/version.cc ('k') | src/vm-state-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698