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

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

Issue 880533002: [turbofan] Simplify reduction if IfTrue and IfFalse and fix bugs. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 11 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 | « test/cctest/compiler/test-control-reducer.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-451958.js
diff --git a/test/mjsunit/regress/regress-451958.js b/test/mjsunit/regress/regress-451958.js
new file mode 100644
index 0000000000000000000000000000000000000000..33695f2b3e24cf781486150587205a4ca5d73d10
--- /dev/null
+++ b/test/mjsunit/regress/regress-451958.js
@@ -0,0 +1,31 @@
+// Copyright 2015 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 k() { throw "e"; }
+var a = true;
+var a = false;
+function foo(a) {
+ var i, j;
+ if (a) {
+ for (i = 0; i < 1; j++) ;
+ for (i = 0; i < 1; k()) ;
+ for (i = 0; i < 1; i++) ;
+ }
+}
+%OptimizeFunctionOnNextCall(foo);
+foo();
+
+function bar() {
+var __v_45;
+ for (__v_45 = 0; __v_45 < 64; __v_63++) {
+ }
+ for (__v_45 = 0; __v_45 < 128; __v_36++) {
+ }
+ for (__v_45 = 128; __v_45 < 256; __v_45++) {
+ }
+}
+%OptimizeFunctionOnNextCall(bar);
+assertThrows(bar);
« no previous file with comments | « test/cctest/compiler/test-control-reducer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698