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

Unified Diff: test/mjsunit/regress/regress-592341.js

Issue 1776013002: [turbofan] Fix deoptimization stack layout for fast literal comparisons. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address review comments Created 4 years, 9 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/compiler/ast-graph-builder.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/regress/regress-592341.js
diff --git a/test/mjsunit/regress/regress-592341.js b/test/mjsunit/regress/regress-592341.js
new file mode 100644
index 0000000000000000000000000000000000000000..2fa475294f9d2e2a31f5ff90f2d34c2e8be016af
--- /dev/null
+++ b/test/mjsunit/regress/regress-592341.js
@@ -0,0 +1,36 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+function id(a) {
+ return a;
+}
+
+(function LiteralCompareNullDeopt() {
+ function f() {
+ return id(null == %DeoptimizeNow());
+ }
+
+ %OptimizeFunctionOnNextCall(f);
+ assertTrue(f());
+})();
+
+(function LiteralCompareUndefinedDeopt() {
+ function f() {
+ return id(undefined == %DeoptimizeNow());
+ }
+
+ %OptimizeFunctionOnNextCall(f);
+ assertTrue(f());
+})();
+
+(function LiteralCompareTypeofDeopt() {
+ function f() {
+ return id("undefined" == typeof(%DeoptimizeNow()));
+ }
+
+ %OptimizeFunctionOnNextCall(f);
+ assertTrue(f());
+})();
« no previous file with comments | « src/compiler/ast-graph-builder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698