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

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

Issue 2200733002: [interpreter] Elide OSR polling from fake loops. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Recement. Created 4 years, 5 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/interpreter/bytecode_expectations/RemoveRedundantLdar.golden ('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-5252.js
diff --git a/test/mjsunit/regress/regress-5252.js b/test/mjsunit/regress/regress-5252.js
new file mode 100644
index 0000000000000000000000000000000000000000..682d3193eacbb49a721d0e8761f81d9c3549867c
--- /dev/null
+++ b/test/mjsunit/regress/regress-5252.js
@@ -0,0 +1,31 @@
+// 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 --ignition --ignition-osr --turbo-from-bytecode
+
+(function TestNonLoopyLoop() {
+ function f() {
+ do {
+ %OptimizeOsr();
+ return 23;
+ } while(false)
+ }
+ assertEquals(23, f());
+ assertEquals(23, f());
+})();
+
+(function TestNonLoopyGenerator() {
+ function* g() {
+ do {
+ %OptimizeOsr();
+ yield 23;
+ yield 42;
+ } while(false)
+ return 999;
+ }
+ var gen = g();
+ assertEquals({ value:23, done:false }, gen.next());
+ assertEquals({ value:42, done:false }, gen.next());
+ assertEquals({ value:999, done:true }, gen.next());
+})();
« no previous file with comments | « test/cctest/interpreter/bytecode_expectations/RemoveRedundantLdar.golden ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698