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

Unified Diff: src/parsing/rewriter.cc

Issue 2936813002: Move closing of generators upon final return to the generator-resume builtin. (Closed)
Patch Set: Add TODO Created 3 years, 6 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: src/parsing/rewriter.cc
diff --git a/src/parsing/rewriter.cc b/src/parsing/rewriter.cc
index 00eb29550a47e0b392463e71cd1ebe2ee616f515..cc2b528d4d516060f6e96cbef79db6ed8fa2c261 100644
--- a/src/parsing/rewriter.cc
+++ b/src/parsing/rewriter.cc
@@ -386,14 +386,6 @@ bool Rewriter::Rewrite(ParseInfo* info, Isolate* isolate) {
int pos = kNoSourcePosition;
Expression* result_value =
processor.factory()->NewVariableProxy(result, pos);
- if (scope->is_module_scope()) {
- auto args = new (info->zone()) ZoneList<Expression*>(2, info->zone());
- args->Add(result_value, info->zone());
- args->Add(processor.factory()->NewBooleanLiteral(true, pos),
- info->zone());
- result_value = processor.factory()->NewCallRuntime(
- Runtime::kInlineCreateIterResultObject, args, pos);
- }
Statement* result_statement =
processor.factory()->NewReturnStatement(result_value, pos);
body->Add(result_statement, info->zone());
« no previous file with comments | « src/interpreter/bytecode-generator.cc ('k') | test/cctest/interpreter/bytecode_expectations/ForOfLoop.golden » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698