Index: src/runtime.js |
diff --git a/src/runtime.js b/src/runtime.js |
index 4d15d205a495b6623cf399ccd0dd36973cac22c4..30063bd4e9ff8fd167e9c442daa861d83b8a2f01 100644 |
--- a/src/runtime.js |
+++ b/src/runtime.js |
@@ -598,6 +598,15 @@ function SameValue(x, y) { |
return x === y; |
} |
+// ES6, section 7.2.4 |
+function SameValueZero(x, y) { |
+ if (typeof x != typeof y) return false; |
+ if (IS_NUMBER(x)) { |
+ if (NUMBER_IS_NAN(x) && NUMBER_IS_NAN(y)) return true; |
+ } |
+ return x === y; |
+} |
+ |
/* --------------------------------- |
- - - U t i l i t i e s - - - |