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

Unified Diff: src/handles.h

Issue 1198983002: [turbofan] Revive the VectorSlotPair and also put feedback on JSCallFunction. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Try to address compilation error. Created 5 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
« no previous file with comments | « src/compiler/js-operator.cc ('k') | src/handles.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 eb57f0e26089383c9d7fe9f57a8cba5f41a111e2..7a296fe68a16acb2f1d05a076f1c84614bf82970 100644
--- a/src/handles.h
+++ b/src/handles.h
@@ -66,14 +66,32 @@ class MaybeHandle {
bool is_null() const { return location_ == NULL; }
+ template <typename S>
+ bool operator==(MaybeHandle<S> that) const {
+ return this->location_ == that.location_;
+ }
+ template <typename S>
+ bool operator!=(MaybeHandle<S> that) const {
+ return !(*this == that);
+ }
+
+
protected:
T** location_;
// MaybeHandles of different classes are allowed to access each
// other's location_.
template<class S> friend class MaybeHandle;
+ template <typename S>
+ friend size_t hash_value(MaybeHandle<S>);
};
+template <typename S>
+inline size_t hash_value(MaybeHandle<S> maybe_handle) {
+ return bit_cast<size_t>(maybe_handle.location_);
+}
+
+
// ----------------------------------------------------------------------------
// A Handle provides a reference to an object that survives relocation by
// the garbage collector.
« no previous file with comments | « src/compiler/js-operator.cc ('k') | src/handles.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698