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

Unified Diff: src/handles.h

Issue 12832002: Parallel recompilation: fewer handle dereferences and tighter checks. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comments Created 7 years, 9 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/flags.cc ('k') | src/handles-inl.h » ('j') | no next file with comments »
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 b0b271c5c634c14b8911d66f508a35f6e4fb94a6..3e408b73f234e06353f6a9186d339b68258d8c84 100644
--- a/src/handles.h
+++ b/src/handles.h
@@ -64,9 +64,7 @@ class Handle {
INLINE(T* operator ->() const) { return operator*(); }
// Check if this handle refers to the exact same object as the other handle.
- bool is_identical_to(const Handle<T> other) const {
- return *location_ == *other.location_;
- }
+ INLINE(bool is_identical_to(const Handle<T> other) const);
// Provides the C++ dereference operator.
INLINE(T* operator*() const);
@@ -341,29 +339,15 @@ class NoHandleAllocation BASE_EMBEDDED {
};
-class NoHandleDereference BASE_EMBEDDED {
- public:
-#ifndef DEBUG
- explicit NoHandleDereference(Isolate* isolate) {}
- ~NoHandleDereference() {}
-#else
- explicit inline NoHandleDereference(Isolate* isolate);
- inline ~NoHandleDereference();
- private:
- Isolate* isolate_;
- bool old_state_;
-#endif
-};
-
-
-class AllowHandleDereference BASE_EMBEDDED {
+class HandleDereferenceGuard BASE_EMBEDDED {
public:
+ enum State { ALLOW, DISALLOW };
#ifndef DEBUG
- explicit AllowHandleDereference(Isolate* isolate) {}
- ~AllowHandleDereference() {}
+ HandleDereferenceGuard(Isolate* isolate, State state) { }
+ ~HandleDereferenceGuard() { }
#else
- explicit inline AllowHandleDereference(Isolate* isolate);
- inline ~AllowHandleDereference();
+ inline HandleDereferenceGuard(Isolate* isolate, State state);
+ inline ~HandleDereferenceGuard();
private:
Isolate* isolate_;
bool old_state_;
« no previous file with comments | « src/flags.cc ('k') | src/handles-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698