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

Unified Diff: src/js/runtime.js

Issue 1680783002: [intrinsics] Kill the %_IsMinusZero intrinsic. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 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/full-codegen/x87/full-codegen-x87.cc ('k') | src/js/typedarray.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/js/runtime.js
diff --git a/src/js/runtime.js b/src/js/runtime.js
index 0a73fc40cceb0cca172a7e4b3b69bd970e808fbb..eeb887aff4cba2c110cfbe1eddf246e0a1f48db1 100644
--- a/src/js/runtime.js
+++ b/src/js/runtime.js
@@ -43,11 +43,11 @@ utils.ImportFromExperimental(function(from) {
// ES5, section 9.12
function SameValue(x, y) {
- if (typeof x != typeof y) return false;
+ if (typeof x !== typeof y) return false;
if (IS_NUMBER(x)) {
if (NUMBER_IS_NAN(x) && NUMBER_IS_NAN(y)) return true;
// x is +0 and y is -0 or vice versa.
- if (x === 0 && y === 0 && %_IsMinusZero(x) != %_IsMinusZero(y)) {
+ if (x === 0 && y === 0 && 1/x !== 1/y) {
return false;
}
}
@@ -58,7 +58,7 @@ function SameValue(x, y) {
// ES6, section 7.2.4
function SameValueZero(x, y) {
- if (typeof x != typeof y) return false;
+ if (typeof x !== typeof y) return false;
if (IS_NUMBER(x)) {
if (NUMBER_IS_NAN(x) && NUMBER_IS_NAN(y)) return true;
}
« no previous file with comments | « src/full-codegen/x87/full-codegen-x87.cc ('k') | src/js/typedarray.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698