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

Unified Diff: src/handles.h

Issue 12049012: Avoid handle dereference during graph optimization. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 11 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/compiler.cc ('k') | src/handles-inl.h » ('j') | src/handles-inl.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/handles.h
diff --git a/src/handles.h b/src/handles.h
index 684f4ca38e758110b73eb07eabc0b497613bb024..5bd36e72becac7ca5cf4ed650a3b0047d3dcdfb4 100644
--- a/src/handles.h
+++ b/src/handles.h
@@ -65,7 +65,7 @@ class Handle {
// Check if this handle refers to the exact same object as the other handle.
bool is_identical_to(const Handle<T> other) const {
- return operator*() == *other;
+ return *location_ == *other.location();
Jakob Kummerow 2013/01/23 12:09:18 Why "location_" vs "location()"? Let's be consiste
Yang 2013/01/23 13:34:25 Done.
}
// Provides the C++ dereference operator.
@@ -339,6 +339,36 @@ class NoHandleAllocation BASE_EMBEDDED {
#endif
};
+
+class NoHandleDereference BASE_EMBEDDED {
+ public:
+#ifndef DEBUG
+ NoHandleDereference() {}
+ ~NoHandleDereference() {}
+#else
+ inline NoHandleDereference();
+ inline ~NoHandleDereference();
+ private:
+ int old_state_;
Jakob Kummerow 2013/01/23 12:09:18 This is used to store bools, so it should be a boo
Yang 2013/01/23 13:34:25 Done.
+ bool active_;
+#endif
+};
+
+
+class AllowHandleDereference BASE_EMBEDDED {
+ public:
+#ifndef DEBUG
+ AllowHandleDereference() {}
+ ~AllowHandleDereference() {}
+#else
+ inline AllowHandleDereference();
+ inline ~AllowHandleDereference();
+ private:
+ int old_state_;
Jakob Kummerow 2013/01/23 12:09:18 Same here.
Yang 2013/01/23 13:34:25 Done.
+ bool active_;
+#endif
+};
+
} } // namespace v8::internal
#endif // V8_HANDLES_H_
« no previous file with comments | « src/compiler.cc ('k') | src/handles-inl.h » ('j') | src/handles-inl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698