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

Unified Diff: src/parsing/parser.cc

Issue 1883443003: [generators] Simplify %CreateJSGeneratorObject (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add back initialization of continuation, just to be on the safe side. Created 4 years, 8 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 | « no previous file | src/runtime/runtime.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/parser.cc
diff --git a/src/parsing/parser.cc b/src/parsing/parser.cc
index 8310ad948c543de2cfa10689062e10e1a1106496..3751acba6bd4be2c24628625f2fd5c29765c2b53 100644
--- a/src/parsing/parser.cc
+++ b/src/parsing/parser.cc
@@ -4470,9 +4470,13 @@ ZoneList<Statement*>* Parser::ParseEagerFunctionBody(
{
ZoneList<Expression*>* arguments =
- new (zone()) ZoneList<Expression*>(0, zone());
+ new (zone()) ZoneList<Expression*>(2, zone());
+ arguments->Add(factory()->NewThisFunction(pos), zone());
+ arguments->Add(
+ ThisExpression(scope_, factory(), RelocInfo::kNoPosition), zone());
CallRuntime* allocation = factory()->NewCallRuntime(
Runtime::kCreateJSGeneratorObject, arguments, pos);
+
VariableProxy* init_proxy = factory()->NewVariableProxy(
function_state_->generator_object_variable());
Assignment* assignment = factory()->NewAssignment(
« no previous file with comments | « no previous file | src/runtime/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698