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

Issue 722793005: Classes: Implement correct name binding (Closed)

Created:
6 years, 1 month ago by arv (Not doing code reviews)
Modified:
5 years, 10 months ago
CC:
v8-dev
Project:
v8
Visibility:
Public.

Description

Classes: Implement correct name binding Named class declarations and class expression have a const binding for the name that is in TDZ for the extends expression. BUG=v8:3330 LOG=Y R=dslomov@chromium.org, adamk Committed: https://chromium.googlesource.com/v8/v8/+/4fe564d85f08346c1dca35e7e4eef210de604120

Patch Set 1 #

Total comments: 20

Patch Set 2 : git rebase #

Patch Set 3 : Round two #

Total comments: 7

Patch Set 4 : Remove this-> #

Patch Set 5 : git rebase #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+369 lines, -164 lines) Patch
M src/ast.h View 1 2 3 4 4 chunks +13 lines, -4 lines 0 comments Download
M src/ast-numbering.cc View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
M src/full-codegen.h View 1 2 1 chunk +16 lines, -0 lines 0 comments Download
M src/full-codegen.cc View 1 2 3 4 3 chunks +76 lines, -50 lines 0 comments Download
M src/parser.h View 1 2 3 4 3 chunks +12 lines, -6 lines 0 comments Download
M src/parser.cc View 1 2 3 4 4 chunks +94 lines, -9 lines 1 comment Download
M src/preparser.h View 1 2 3 4 6 chunks +17 lines, -89 lines 0 comments Download
M src/preparser.cc View 1 2 2 chunks +49 lines, -0 lines 0 comments Download
M test/mjsunit/harmony/classes.js View 1 chunk +89 lines, -6 lines 0 comments Download

Messages

Total messages: 25 (6 generated)
arv (Not doing code reviews)
PTAL https://codereview.chromium.org/722793005/diff/1/src/parser.cc File src/parser.cc (right): https://codereview.chromium.org/722793005/diff/1/src/parser.cc#newcode3922 src/parser.cc:3922: ClassLiteral* Parser::ParseClassLiteral(const AstRawString* name, I had to split ...
6 years, 1 month ago (2014-11-12 23:15:41 UTC) #1
adamk
Just a style point, I don't yet feel comfortable enough with the parser to offer ...
6 years, 1 month ago (2014-11-13 01:45:44 UTC) #2
Dmitry Lomov (no reviews)
https://codereview.chromium.org/722793005/diff/1/src/ast.h File src/ast.h (right): https://codereview.chromium.org/722793005/diff/1/src/ast.h#newcode2675 src/ast.h:2675: VariableProxy* proxy() const { return proxy_; } Nit: rename ...
6 years, 1 month ago (2014-11-13 11:17:38 UTC) #3
arv (Not doing code reviews)
git rebase
6 years, 1 month ago (2014-11-13 16:59:40 UTC) #4
arv (Not doing code reviews)
Round two
6 years, 1 month ago (2014-11-13 20:45:04 UTC) #5
arv (Not doing code reviews)
Round two
6 years, 1 month ago (2014-11-13 20:46:27 UTC) #6
arv (Not doing code reviews)
Ready for round two. PTAL. https://codereview.chromium.org/722793005/diff/1/src/ast.h File src/ast.h (right): https://codereview.chromium.org/722793005/diff/1/src/ast.h#newcode2675 src/ast.h:2675: VariableProxy* proxy() const { ...
6 years, 1 month ago (2014-11-13 20:47:50 UTC) #8
Dmitry Lomov (no reviews)
looking good, just a couple comments https://codereview.chromium.org/722793005/diff/60001/src/full-codegen.cc File src/full-codegen.cc (right): https://codereview.chromium.org/722793005/diff/60001/src/full-codegen.cc#newcode1581 src/full-codegen.cc:1581: this, lit->scope(), BailoutId::None(), ...
6 years, 1 month ago (2014-11-13 21:10:37 UTC) #9
arv (Not doing code reviews)
Remove this->
6 years, 1 month ago (2014-11-13 21:56:24 UTC) #10
arv (Not doing code reviews)
https://codereview.chromium.org/722793005/diff/60001/src/full-codegen.cc File src/full-codegen.cc (right): https://codereview.chromium.org/722793005/diff/60001/src/full-codegen.cc#newcode1785 src/full-codegen.cc:1785: codegen_->PrepareForBailoutForId(entry_id, NO_REGISTERS); On 2014/11/13 21:10:37, Dmitry Lomov (chromium) wrote: ...
6 years, 1 month ago (2014-11-13 21:56:29 UTC) #11
Dmitry Lomov (no reviews)
lgtm if tests pass. I am still curious about BailoutIds though. On 2014/11/13 21:56:29, arv ...
6 years, 1 month ago (2014-11-14 06:23:06 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/722793005/80001
6 years, 1 month ago (2014-11-14 14:22:54 UTC) #14
commit-bot: I haz the power
Try jobs failed on following builders: v8_mac_rel on tryserver.v8 (http://build.chromium.org/p/tryserver.v8/builders/v8_mac_rel/builds/1321) v8_win64_compile_rel on tryserver.v8 (http://build.chromium.org/p/tryserver.v8/builders/v8_win64_compile_rel/builds/445) v8_win_rel ...
6 years, 1 month ago (2014-11-14 14:24:34 UTC) #16
arv (Not doing code reviews)
git rebase
6 years, 1 month ago (2014-11-14 14:36:47 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/722793005/100001
6 years, 1 month ago (2014-11-14 14:38:00 UTC) #20
commit-bot: I haz the power
Committed patchset #5 (id:100001)
6 years, 1 month ago (2014-11-14 15:05:17 UTC) #21
marja
post-commit comments: https://codereview.chromium.org/722793005/diff/100001/src/parser.cc File src/parser.cc (right): https://codereview.chromium.org/722793005/diff/100001/src/parser.cc#newcode3897 src/parser.cc:3897: ClassLiteral* Parser::ParseClassLiteral(const AstRawString* name, Is there a ...
5 years, 10 months ago (2015-02-10 11:31:49 UTC) #23
arv (Not doing code reviews)
On 2015/02/10 11:31:49, marja wrote: > post-commit comments: > > https://codereview.chromium.org/722793005/diff/100001/src/parser.cc > File src/parser.cc (right): ...
5 years, 10 months ago (2015-02-10 14:32:11 UTC) #24
arv (Not doing code reviews)
5 years, 10 months ago (2015-02-10 17:11:36 UTC) #25
Message was sent while issue was closed.
On 2015/02/10 14:32:11, arv wrote:
> On 2015/02/10 11:31:49, marja wrote:
> > post-commit comments:
> > 
> > https://codereview.chromium.org/722793005/diff/100001/src/parser.cc
> > File src/parser.cc (right):
> > 
> >
>
https://codereview.chromium.org/722793005/diff/100001/src/parser.cc#newcode3897
> > src/parser.cc:3897: ClassLiteral* Parser::ParseClassLiteral(const
> AstRawString*
> > name,
> > Is there a reason why ParseClassLiteral is not in ParserBase, but both in
> Parser
> > and PreParser (so that there are 2 versions of it)? Is something missing in
> the
> > PreParser? Is there some mess in the code that makes it hard?
> > 
> > All other Expression parsing is unified (so, implemented only once, in
> > ParserBase), so this is moving the situation backwards...
> 
> ClassExpression needs to set up an inner name binding, similar to how
> FunctionExpression sets up a binding. The difference between the two is this
> code. Another difference is that Parser creates a DefaultConstructor if
needed.
> 
> It seems like the PreParser might be able to handle that after all. Let me
look
> into it a bit more.

One more thing that is making this less than optimal is that in Parser we use
Expression* like a Maybe type and use NULL as missin. For PreParser we don't
have a way to have these null expressions so we need to use an extra out
parameter.

Powered by Google App Engine
This is Rietveld 408576698