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

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: 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..5737d52367ed52615288e643e38b63a5d7ef75e3 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;
@@ -9104,6 +9108,9 @@ class Oddball: public HeapObject {
DECLARE_CAST(Oddball)
Michael Starzinger 2015/09/15 11:52:56 nit: Move the caster down so that the dispatched b
Benedikt Meurer 2015/09/15 11:54:10 Done.
+ // ES6 section 7.1.3 ToNumber for Boolean, Null, Undefined.
+ MUST_USE_RESULT static inline Handle<Object> ToNumber(Handle<Oddball> input);
+
// Dispatched behavior.
DECLARE_VERIFIER(Oddball)
« 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