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

Unified Diff: src/parsing/parser.cc

Issue 1806293002: [generators] Add some explanation on forcing context allocation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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/full-codegen/x87/full-codegen-x87.cc ('k') | no next file » | 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 d7d8162205ac5f8edf8e3a0f9bd16dc67cb39b0d..d1dc4944b8d5c2c88e90237a42e7fffb231f4b0e 100644
--- a/src/parsing/parser.cc
+++ b/src/parsing/parser.cc
@@ -4103,7 +4103,8 @@ FunctionLiteral* Parser::ParseFunctionLiteral(
if (is_generator) {
// For generators, allocating variables in contexts is currently a win
// because it minimizes the work needed to suspend and resume an
- // activation.
+ // activation. The machine code produced for generators (by full-codegen)
+ // relies on this forced context allocation, but not in an essential way.
Michael Starzinger 2016/03/17 12:48:00 nit: The "[...], but not in an essential way" part
scope_->ForceContextAllocation();
// Calling a generator returns a generator object. That object is stored
« no previous file with comments | « src/full-codegen/x87/full-codegen-x87.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698