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

Unified Diff: test/mjsunit/harmony/regress-generators-resume.js

Issue 2894293003: Save/restore only live registers in the generator suspend/resume. (Closed)
Patch Set: Tweak Created 3 years, 7 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
Index: test/mjsunit/harmony/regress-generators-resume.js
diff --git a/test/mjsunit/harmony/regress-generators-resume.js b/test/mjsunit/harmony/regress-generators-resume.js
new file mode 100644
index 0000000000000000000000000000000000000000..c72ac30b483250fda41c25d11542aeffbcd8303e
--- /dev/null
+++ b/test/mjsunit/harmony/regress-generators-resume.js
@@ -0,0 +1,18 @@
+// Copyright 2017 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* foo() {
+ for (let i = 0; i < 10; i++) {
+ yield 1;
+ }
+ return 0;
+}
+
+g = foo();
+%OptimizeFunctionOnNextCall(foo);
+g.next();
+g.next();
« no previous file with comments | « test/mjsunit/harmony/generators-reduced.js ('k') | test/unittests/interpreter/bytecode-array-builder-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698