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

Issue 1215423002: Fix ScopeInfo::StackSlotIndex to skip over non-locals (Closed)

Created:
5 years, 5 months ago by adamk
Modified:
5 years, 5 months ago
Reviewers:
rossberg
CC:
v8-dev, Jakob Kummerow
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Fix ScopeInfo::StackSlotIndex to skip over non-locals Block scoping can cause lexical variables in inner scopes to be allocated stack slots in their outer declaration scope. Neither of the callers of this method expected such variables to be returned, so it has been changed to only search the portion of the stack slots that correspond to locals. Also renamed the method to match the new behavior. This method only has two callers, one a DCHECK in scopes.cc and the other the accessor for Function.arguments. I have been unable to reproduce the former case (though the old code definitely wasn't correct, from inspection). For the latter, it's not currently exercisable, given that Function.arguments does not exist in strict mode and V8 does not yet implement block scoping in sloppy mode. BUG=v8:4259 LOG=n

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+8 lines, -8 lines) Patch
M src/accessors.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M src/objects.h View 1 chunk +3 lines, -3 lines 0 comments Download
M src/scopeinfo.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M src/scopes.cc View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 6 (2 generated)
adamk
5 years, 5 months ago (2015-07-01 22:23:09 UTC) #2
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1215423002/1
5 years, 5 months ago (2015-07-01 22:23:27 UTC) #4
adamk
Ignore this for now, I realize it's not yet correct.
5 years, 5 months ago (2015-07-01 22:27:36 UTC) #5
adamk
5 years, 5 months ago (2015-07-01 23:09:06 UTC) #6
Sorry for the noise, closing.

Powered by Google App Engine
This is Rietveld 408576698