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

Issue 13408005: Force context allocation for variables in generator scopes. (Closed)

Created:
7 years, 8 months ago by wingo
Modified:
7 years, 8 months ago
Base URL:
git://github.com/v8/v8.git@master
Visibility:
Public.

Description

Force context allocation for variables in generator scopes. * src/scopes.h (ForceContextAllocation, has_forced_context_allocation): New interface to force context allocation for an entire function's scope. * src/scopes.cc: Unless a new scope is a function scope, if its outer scope has forced context allocation, it should also force context allocation. (MustAllocateInContext): Return true if the scope as a whole has forced context allocation. (CollectStackAndContextLocals): Allow temporaries to be context-allocated. * src/parser.cc (ParseFunctionLiteral): Force context allocation for generator scopes. * src/v8globals.h (VariableMode): Update comment on TEMPORARY. * src/arm/full-codegen-arm.cc (Generate): * src/ia32/full-codegen-ia32.cc (Generate): * src/x64/full-codegen-x64.cc (Generate): Assert that generators have no stack slots. * test/mjsunit/harmony/generators-instantiation.js: New test. BUG=v8:2355 TEST=mjsunit/harmony/generators-instantiation Committed: http://code.google.com/p/v8/source/detail?r=14152

Patch Set 1 #

Total comments: 16

Patch Set 2 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+58 lines, -45 lines) Patch
M src/arm/full-codegen-arm.cc View 1 2 chunks +3 lines, -2 lines 0 comments Download
M src/ia32/full-codegen-ia32.cc View 1 1 chunk +2 lines, -0 lines 0 comments Download
M src/parser.cc View 1 1 chunk +3 lines, -0 lines 0 comments Download
M src/scopes.h View 1 2 chunks +10 lines, -0 lines 0 comments Download
M src/scopes.cc View 1 3 chunks +16 lines, -5 lines 0 comments Download
M src/v8globals.h View 1 1 chunk +2 lines, -2 lines 0 comments Download
M src/x64/full-codegen-x64.cc View 1 1 chunk +2 lines, -0 lines 0 comments Download
A + test/mjsunit/harmony/generators-instantiation.js View 1 1 chunk +20 lines, -36 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
wingo
7 years, 8 months ago (2013-04-03 10:21:02 UTC) #1
Michael Starzinger
https://codereview.chromium.org/13408005/diff/1/src/arm/full-codegen-arm.cc File src/arm/full-codegen-arm.cc (right): https://codereview.chromium.org/13408005/diff/1/src/arm/full-codegen-arm.cc#newcode165 src/arm/full-codegen-arm.cc:165: int locals_count = info->scope()->num_stack_slots(); nit: I know this is ...
7 years, 8 months ago (2013-04-05 11:38:42 UTC) #2
wingo
https://codereview.chromium.org/13408005/diff/1/src/arm/full-codegen-arm.cc File src/arm/full-codegen-arm.cc (right): https://codereview.chromium.org/13408005/diff/1/src/arm/full-codegen-arm.cc#newcode165 src/arm/full-codegen-arm.cc:165: int locals_count = info->scope()->num_stack_slots(); On 2013/04/05 11:38:42, Michael Starzinger ...
7 years, 8 months ago (2013-04-05 12:25:06 UTC) #3
Michael Starzinger
LGTM. I'll land this. https://codereview.chromium.org/13408005/diff/1/src/scopes.cc File src/scopes.cc (right): https://codereview.chromium.org/13408005/diff/1/src/scopes.cc#newcode122 src/scopes.cc:122: if (!is_function_scope() && On 2013/04/05 ...
7 years, 8 months ago (2013-04-05 13:06:56 UTC) #4
Michael Starzinger
7 years, 8 months ago (2013-04-05 13:19:47 UTC) #5
Message was sent while issue was closed.
Committed patchset #2 manually as r14152 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698