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

Unified Diff: src/objects.h

Issue 1337993005: [runtime] Replace the EQUALS builtin with proper Object::Equals. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address Michi's nit. Created 5 years, 3 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/mips64/code-stubs-mips64.cc ('k') | src/objects.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index 9797f0427139b6f1cd0010bba6f01611fd159c6b..9e773c036265bffde6d27c446160bf98ebfc3413 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -1048,7 +1048,7 @@ class Object {
INLINE(bool IsFiller() const);
// Extract the number.
- inline double Number();
+ inline double Number() const;
INLINE(bool IsNaN() const);
INLINE(bool IsMinusZero() const);
bool ToInt32(int32_t* value);
@@ -1083,6 +1083,9 @@ class Object {
bool BooleanValue(); // ECMA-262 9.2.
+ // ES6 section 7.2.12 Abstract Equality Comparison
+ MUST_USE_RESULT static Maybe<bool> Equals(Handle<Object> x, Handle<Object> y);
+
// ES6 section 7.2.13 Strict Equality Comparison
bool StrictEquals(Object* that);
@@ -1657,6 +1660,7 @@ class Simd128Value : public HeapObject {
// Equality operations.
inline bool Equals(Simd128Value* that);
+ static inline bool Equals(Handle<Simd128Value> one, Handle<Simd128Value> two);
// Checks that another instance is bit-wise equal.
bool BitwiseEquals(const Simd128Value* other) const;
@@ -9102,6 +9106,9 @@ class Oddball: public HeapObject {
inline byte kind() const;
inline void set_kind(byte kind);
+ // ES6 section 7.1.3 ToNumber for Boolean, Null, Undefined.
+ MUST_USE_RESULT static inline Handle<Object> ToNumber(Handle<Oddball> input);
+
DECLARE_CAST(Oddball)
// Dispatched behavior.
« no previous file with comments | « src/mips64/code-stubs-mips64.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698