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

Issue 1413903002: Always give class literals a block scope (Closed)

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

Description

Always give class literals a block scope Class methods always have the class scope on their scope chain in order to implement strong mode checks. Previously, that scope wasn't attached to the ClassLiteral for anonymous classes (since the scope contained no bindings). This patch simply puts that same scope on the ClassLiteral, anonymous or not, which simplifies other code that needs to reason about the scope of a class and its methods. Committed: https://crrev.com/cf13dda1ba25e8293ea143f33c6c5f6233a39c86 Cr-Commit-Position: refs/heads/master@{#31371}

Patch Set 1 #

Patch Set 2 : TurboFan cleanup #

Unified diffs Side-by-side diffs Delta from patch set Stats (+11 lines, -20 lines) Patch
M src/compiler/ast-graph-builder.cc View 1 2 chunks +8 lines, -14 lines 0 comments Download
M src/full-codegen/full-codegen.cc View 1 chunk +1 line, -2 lines 0 comments Download
M src/parser.cc View 1 chunk +2 lines, -4 lines 0 comments Download

Messages

Total messages: 11 (3 generated)
adamk
5 years, 2 months ago (2015-10-19 09:47:37 UTC) #2
adamk
The code that makes use of this empty scope is in Scope::ClassVariableForMethod(): https://code.google.com/p/chromium/codesearch#chromium/src/v8/src/scopes.cc&l=1290
5 years, 2 months ago (2015-10-19 09:50:44 UTC) #3
Michael Starzinger
LGTM.
5 years, 2 months ago (2015-10-19 10:40:41 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1413903002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1413903002/20001
5 years, 2 months ago (2015-10-19 10:45:06 UTC) #7
commit-bot: I haz the power
Committed patchset #2 (id:20001)
5 years, 2 months ago (2015-10-19 11:38:17 UTC) #8
commit-bot: I haz the power
Patchset 2 (id:??) landed as https://crrev.com/cf13dda1ba25e8293ea143f33c6c5f6233a39c86 Cr-Commit-Position: refs/heads/master@{#31371}
5 years, 2 months ago (2015-10-19 11:38:40 UTC) #9
Michael Achenbach
A revert of this CL (patchset #2 id:20001) has been created in https://codereview.chromium.org/1416583002/ by machenbach@chromium.org. ...
5 years, 2 months ago (2015-10-19 12:16:47 UTC) #10
adamk
5 years, 2 months ago (2015-10-19 13:45:07 UTC) #11
Message was sent while issue was closed.
Sorry for the breakage, this was re-uploaded with a fix in
https://codereview.chromium.org/1418433002/

Powered by Google App Engine
This is Rietveld 408576698