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

Issue 6266007: Properly create variables to access outer arguments and function names. (Closed)

Created:
9 years, 11 months ago by antonm
Modified:
9 years, 4 months ago
CC:
v8-dev
Visibility:
Public.

Description

Properly create variables to access outer arguments and function names. Committed: http://code.google.com/p/v8/source/detail?r=6380

Patch Set 1 #

Patch Set 2 : Fix line length #

Total comments: 12

Patch Set 3 : Addressing Kevin's comments #

Patch Set 4 : Rebasing #

Unified diffs Side-by-side diffs Delta from patch set Stats (+117 lines, -11 lines) Patch
M src/scopeinfo.cc View 1 chunk +2 lines, -3 lines 0 comments Download
M src/scopes.cc View 1 2 2 chunks +54 lines, -8 lines 0 comments Download
A test/mjsunit/compiler/regress-serialized-slots.js View 1 2 1 chunk +61 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
antonm
Guys, may you have a look? Alas, I failed to create a repro for function ...
9 years, 11 months ago (2011-01-18 20:42:26 UTC) #1
Kevin Millikin (Chromium)
LGTM after addressing comments below. http://codereview.chromium.org/6266007/diff/2001/src/scopes.cc File src/scopes.cc (right): http://codereview.chromium.org/6266007/diff/2001/src/scopes.cc#newcode161 src/scopes.cc:161: // and thread access ...
9 years, 11 months ago (2011-01-19 07:39:57 UTC) #2
antonm
9 years, 11 months ago (2011-01-19 08:18:18 UTC) #3
Kevin, thanks a lot for comments!

I've submitted the change already not to miss trunk push.  If you have any
additional concerns, please, let me know and I'll address them with a separate
change.

http://codereview.chromium.org/6266007/diff/2001/src/scopes.cc
File src/scopes.cc (right):

http://codereview.chromium.org/6266007/diff/2001/src/scopes.cc#newcode161
src/scopes.cc:161: // and thread access to this scope's parameters via arguments
shadow.
On 2011/01/19 07:39:57, Kevin Millikin wrote:
> Suggested rewording, something like:
> 
> This scope's arguments shadow (if present) is context-allocated if an inner
> scope accesses this one's parameters.  Allocate the arguments_shadow_ variable
> if necessary.

Done.

http://codereview.chromium.org/6266007/diff/2001/src/scopes.cc#newcode261
src/scopes.cc:261: // as it is impllicitly present in any scope.
On 2011/01/19 07:39:57, Kevin Millikin wrote:
> Could you fix the spelling of "implicitly"?

Done.

http://codereview.chromium.org/6266007/diff/2001/src/scopes.cc#newcode269
src/scopes.cc:269: ASSERT(scope_info_->StackSlotIndex(*name) < 0);
On 2011/01/19 07:39:57, Kevin Millikin wrote:
> This assert could be lifted higher (up to the previous assert), couldn't it? 
> The comment should say "assert" not "check".

Done.

http://codereview.chromium.org/6266007/diff/2001/src/scopes.cc#newcode286
src/scopes.cc:286: new Literal(Handle<Object>(Smi::FromInt(index))),
On 2011/01/19 07:39:57, Kevin Millikin wrote:
> Indentation is a bit off here.

Done.

http://codereview.chromium.org/6266007/diff/2001/src/scopes.cc#newcode299
src/scopes.cc:299: variables_.Declare(this, name, mode, true, Variable::NORMAL);
On 2011/01/19 07:39:57, Kevin Millikin wrote:
> Will this be the right mode?

Oops, thanks a lot for spotting this.  Now passing explicit constant.

http://codereview.chromium.org/6266007/diff/2001/test/mjsunit/compiler/regres...
File test/mjsunit/compiler/regress-serialized-slots.js (right):

http://codereview.chromium.org/6266007/diff/2001/test/mjsunit/compiler/regres...
test/mjsunit/compiler/regress-serialized-slots.js:28: function runner(f,
expected) {
On 2011/01/19 07:39:57, Kevin Millikin wrote:
> Test code is complicated enough that it needs a comment saying what it's
> testing.
> 
> Think of the person who finds a test failure (wrong result) here.

Done.

Powered by Google App Engine
This is Rietveld 408576698