Index: src/runtime.js |
diff --git a/src/runtime.js b/src/runtime.js |
index c9cf825038a95ab642808b5ea027553e3b514b35..4bc377c5f063aa60924358ac7bbfb9ca45ba8d23 100644 |
--- a/src/runtime.js |
+++ b/src/runtime.js |
@@ -601,6 +601,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 - - - |