Routing offline discussion here:

https://codereview.chromium.org/968263002/diff/120001/src/parser.cc
File src/parser.cc (right):

https://codereview.chromium.org/968263002/diff/120001/src/parser.cc#newcode4166
src/parser.cc:4166: // Unnamed classes should not have scopes (the class
scope will be empty).
On 2015/03/03 15:36:28, arv wrote:
Unnamed classed do not need to have a scope.

Clarification: this comment was b/c some places rely on unnamed classes
not having a scope. The places which rely on that are:

AstGraphBuilder::VisitClassLiteral
AstGraphBuilder::VisitClassLiteralContents
FullCodeGenerator::VisitClassLiteral calling EnterBlockScopeIfNeeded
FullCodeGenerator::VisitClassLiteral deciding whether to
EmitVariableAssignment

https://codereview.chromium.org/968263002/diff/120001/src/scopes.cc
File src/scopes.cc (right):

https://codereview.chromium.org/968263002/diff/120001/src/scopes.cc#newcode1144
src/scopes.cc:1144: found_method_scope = true;
On 2015/03/03 15:36:28, arv wrote:
It is still not clear why this is only matching the class name?

This check only fires when we have resolved the VariableProxy against
*something* and then we reason that the *something* is a class name if
it's declared in the class scope. (The only declaration in that scope
seems to be the class name. (Empirically.))

https://codereview.chromium.org/968263002/diff/120001/test/mjsunit/strong/declaration-after-use.js
File test/mjsunit/strong/declaration-after-use.js (right):

https://codereview.chromium.org/968263002/diff/120001/test/mjsunit/strong/declaration-after-use.js#newcode184
test/mjsunit/strong/declaration-after-use.js:184: class C4 { method() {
C4; method; } }; new C4();
On 2015/03/03 15:36:28, arv wrote:
This should be an error since method is an unresolved identifier.

Concise methods do not add a binding.

This was actually not testing what I thought it was testing: "method"
was unresolved (we didn't return an error b/c we don't do check against
the global object yet) -> removed nonsensemaking tests.

https://codereview.chromium.org/968263002/

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to