Index: src/objects.h |
diff --git a/src/objects.h b/src/objects.h |
index 910c25200ee3ec808f632a107078702138ea5d76..80848f882bd5e38dd185a4d6d4f9bf0a474f4a67 100644 |
--- a/src/objects.h |
+++ b/src/objects.h |
@@ -1511,6 +1511,12 @@ class Object { |
// to implement the Harmony "egal" function. |
bool SameValue(Object* other); |
+ // Checks whether this object has the same value as the given one. |
+ // +0 and -0 are treated equal. Everything else is the same as SameValue. |
+ // This function is implemented according to ES6, section 7.2.4 and is used |
+ // by ES6 Map and Set. |
+ bool SameValueZero(Object* other); |
+ |
// Tries to convert an object to an array index. Returns true and sets |
// the output parameter if it succeeds. |
inline bool ToArrayIndex(uint32_t* index); |
@@ -4142,7 +4148,7 @@ class ObjectHashTable: public HashTable<ObjectHashTable, |
// insertion order. There are Map and Set interfaces (OrderedHashMap |
// and OrderedHashTable, below). It is meant to be used by JSMap/JSSet. |
// |
-// Only Object* keys are supported, with Object::SameValue() used as the |
+// Only Object* keys are supported, with Object::SameValueZero() used as the |
// equality operator and Object::GetHash() for the hash function. |
// |
// Based on the "Deterministic Hash Table" as described by Jason Orendorff at |