Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/test/mjsunit/compiler/abstract-equal-undetectable.js')
-rw-r--r--deps/v8/test/mjsunit/compiler/abstract-equal-undetectable.js31
1 files changed, 27 insertions, 4 deletions
diff --git a/deps/v8/test/mjsunit/compiler/abstract-equal-undetectable.js b/deps/v8/test/mjsunit/compiler/abstract-equal-undetectable.js
index ad866aa7bed..6c3d0ff8623 100644
--- a/deps/v8/test/mjsunit/compiler/abstract-equal-undetectable.js
+++ b/deps/v8/test/mjsunit/compiler/abstract-equal-undetectable.js
@@ -91,10 +91,6 @@ const undetectable = %GetUndetectable();
%OptimizeFunctionOnNextCall(foo);
assertTrue(foo(b));
assertFalse(foo(a));
-
- // TurboFan doesn't need to bake in feedback, since it sees the undetectable.
- assertFalse(foo(1));
- assertOptimized(foo);
})();
// Unknown undetectable on one side strict equality with receiver.
@@ -124,3 +120,30 @@ const undetectable = %GetUndetectable();
assertFalse(foo(1));
assertUnoptimized(foo);
})();
+
+// Unknown undetectable on both sides.
+(function() {
+ const a = undetectable;
+
+ function foo(a, b) { return a == b; }
+
+ %PrepareFunctionForOptimization(foo);
+ assertTrue(foo(a, a));
+ assertTrue(foo(a, undefined));
+ assertTrue(foo(undefined, a));
+ assertFalse(foo(a, %GetUndetectable()));
+ assertFalse(foo(%GetUndetectable(), a));
+ assertFalse(foo(%GetUndetectable(), %GetUndetectable()));
+ %OptimizeFunctionOnNextCall(foo);
+ assertTrue(foo(a, a));
+ assertTrue(foo(a, undefined));
+ assertTrue(foo(undefined, a));
+ assertFalse(foo(a, %GetUndetectable()));
+ assertFalse(foo(%GetUndetectable(), a));
+ assertFalse(foo(%GetUndetectable(), %GetUndetectable()));
+ assertOptimized(foo);
+
+ // TurboFan bakes in feedback on the inputs.
+ assertFalse(foo(1));
+ assertUnoptimized(foo);
+})();