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

Unified Diff: src/handles.h

Issue 1926023002: [turbofan] Run everything after representation selection concurrently. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Remove some dead code. Created 4 years, 8 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/simplified-operator.cc ('k') | src/ia32/builtins-ia32.cc » ('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 1f97d6ff7e6d95c76b521baf45938e5f1c5f8243..ab8ed0920a4c637b6c0bc67775c801ee287f2ec1 100644
--- a/src/handles.h
+++ b/src/handles.h
@@ -43,6 +43,10 @@ class HandleBase {
V8_INLINE bool is_null() const { return location_ == nullptr; }
+ // Returns the raw address where this handle is stored. This should only be
+ // used for hashing handles; do not ever try to dereference it.
+ V8_INLINE Address address() const { return bit_cast<Address>(location_); }
+
protected:
// Provides the C++ dereference operator.
V8_INLINE Object* operator*() const {
@@ -132,14 +136,14 @@ class Handle final : public HandleBase {
// Provide function object for location equality comparison.
struct equal_to : public std::binary_function<Handle<T>, Handle<T>, bool> {
V8_INLINE bool operator()(Handle<T> lhs, Handle<T> rhs) const {
- return lhs.location() == rhs.location();
+ return lhs.address() == rhs.address();
}
};
// Provide function object for location hashing.
struct hash : public std::unary_function<Handle<T>, size_t> {
V8_INLINE size_t operator()(Handle<T> const& handle) const {
- return base::hash<void*>()(handle.location());
+ return base::hash<void*>()(handle.address());
}
};
« no previous file with comments | « src/compiler/simplified-operator.cc ('k') | src/ia32/builtins-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698