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

Unified Diff: src/x64/full-codegen-x64.cc

Issue 13542002: Calling a generator function returns a generator object (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: Fix whitespace; more tests Created 7 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/runtime.cc ('k') | test/mjsunit/harmony/generators-iteration.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/full-codegen-x64.cc
diff --git a/src/x64/full-codegen-x64.cc b/src/x64/full-codegen-x64.cc
index fa550a5b7bc8829e905072e7cad4eb77c65c97c7..013cd60802451f14fe9f0956d2c0632ec4e2c937 100644
--- a/src/x64/full-codegen-x64.cc
+++ b/src/x64/full-codegen-x64.cc
@@ -284,6 +284,14 @@ void FullCodeGenerator::Generate() {
__ bind(&ok);
}
+ if (function()->is_generator()) {
wingo 2013/04/03 16:36:24 How to communicate this iterator object from its a
+ Comment cmnt(masm_, "[ Generator Iterator");
+ __ push(Operand(rbp, JavaScriptFrameConstants::kFunctionOffset));
+ __ CallRuntime(Runtime::kCreateJSGeneratorIterator, 1);
+ // TODO(wingo): Suspend the generator.
+ EmitReturnSequence();
+ }
+
{ Comment cmnt(masm_, "[ Body");
ASSERT(loop_depth() == 0);
VisitStatements(function()->body());
« no previous file with comments | « src/runtime.cc ('k') | test/mjsunit/harmony/generators-iteration.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698