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

Issue 7826009: Support declarations of context allocated locals in Crankshaft. (Closed)

Created:
9 years, 3 months ago by fschneider
Modified:
9 years, 3 months ago
CC:
v8-dev
Visibility:
Public.

Description

Support declarations of context allocated locals in Crankshaft. The changes to scopes and parser introduce a VariableProxy wrapping the function-name variable for function literals. It seems the easiest way to get an AST id for the HSimulate after context-slot stores in declarations. Committed: http://code.google.com/p/v8/source/detail?r=9112

Patch Set 1 #

Total comments: 12
Unified diffs Side-by-side diffs Delta from patch set Stats (+85 lines, -42 lines) Patch
M src/arm/full-codegen-arm.cc View 3 chunks +5 lines, -2 lines 0 comments Download
M src/full-codegen.h View 1 chunk +1 line, -1 line 0 comments Download
M src/hydrogen.h View 1 chunk +4 lines, -0 lines 2 comments Download
M src/hydrogen.cc View 2 chunks +46 lines, -18 lines 2 comments Download
M src/ia32/full-codegen-ia32.cc View 3 chunks +5 lines, -2 lines 0 comments Download
M src/parser.cc View 1 chunk +1 line, -1 line 2 comments Download
M src/scopeinfo.cc View 1 chunk +7 lines, -7 lines 4 comments Download
M src/scopes.h View 3 chunks +3 lines, -3 lines 0 comments Download
M src/scopes.cc View 4 chunks +8 lines, -6 lines 2 comments Download
M src/x64/full-codegen-x64.cc View 3 chunks +5 lines, -2 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
fschneider
9 years, 3 months ago (2011-09-01 15:25:42 UTC) #1
Kevin Millikin (Chromium)
LGTM, small comments below. http://codereview.chromium.org/7826009/diff/1/src/hydrogen.cc File src/hydrogen.cc (right): http://codereview.chromium.org/7826009/diff/1/src/hydrogen.cc#newcode5836 src/hydrogen.cc:5836: ASSERT(var->IsStackAllocated()); This ASSERT is trivially ...
9 years, 3 months ago (2011-09-01 15:40:58 UTC) #2
fschneider
9 years, 3 months ago (2011-09-01 16:28:21 UTC) #3
Thanks for the review.

http://codereview.chromium.org/7826009/diff/1/src/hydrogen.cc
File src/hydrogen.cc (right):

http://codereview.chromium.org/7826009/diff/1/src/hydrogen.cc#newcode5836
src/hydrogen.cc:5836: ASSERT(var->IsStackAllocated());
On 2011/09/01 15:40:58, Kevin Millikin wrote:
> This ASSERT is trivially true, because it's in the case for PARAMETER and
LOCAL.

Done.

http://codereview.chromium.org/7826009/diff/1/src/hydrogen.h
File src/hydrogen.h (right):

http://codereview.chromium.org/7826009/diff/1/src/hydrogen.h#newcode782
src/hydrogen.h:782: void EmitDeclaration(VariableProxy* proxy,
On 2011/09/01 15:40:58, Kevin Millikin wrote:
> Don't call this Emit, save that for things that generate assembly code.  I
think
> we've been calling such helpers "HandleDeclaration" in the graph builder.

Done.

http://codereview.chromium.org/7826009/diff/1/src/parser.cc
File src/parser.cc (right):

http://codereview.chromium.org/7826009/diff/1/src/parser.cc#newcode3791
src/parser.cc:3791: Variable* fvar =
top_scope_->DeclareFunctionVar(function_name)->var();
On 2011/09/01 15:40:58, Kevin Millikin wrote:
> You could keep DeclareFunctionVar returning a Variable*, because this is the
> only use and you want the Variable*.  It would save the unsightly ->var().

Done.

http://codereview.chromium.org/7826009/diff/1/src/scopeinfo.cc
File src/scopeinfo.cc (right):

http://codereview.chromium.org/7826009/diff/1/src/scopeinfo.cc#newcode137
src/scopeinfo.cc:137: proxy->var()->AsSlot()->type() == Slot::CONTEXT) {
On 2011/09/01 15:40:58, Kevin Millikin wrote:
> proxy->var()->IsContextSlot()

Done.

http://codereview.chromium.org/7826009/diff/1/src/scopeinfo.cc#newcode138
src/scopeinfo.cc:138: function_name_ = proxy->var()->name();
On 2011/09/01 15:40:58, Kevin Millikin wrote:
> function_name_ = proxy->name();

Done.

http://codereview.chromium.org/7826009/diff/1/src/scopes.cc
File src/scopes.cc (right):

http://codereview.chromium.org/7826009/diff/1/src/scopes.cc#newcode800
src/scopes.cc:800: if (function_ != NULL &&
function_->var()->name().is_identical_to(name)) {
On 2011/09/01 15:40:58, Kevin Millikin wrote:
> function_->name() because the VariableProxy and Variable have the same name.

Done.

Powered by Google App Engine
This is Rietveld 408576698