Changeset 191030 in webkit for trunk/Source/JavaScriptCore/ChangeLog
- Timestamp:
- Oct 13, 2015, 8:56:53 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r191016 r191030 1 2015-10-13 Yusuke Suzuki <[email protected]> 2 3 [ES6] Class expression should have lexical environment that has itself as an imutable binding 4 https://bugs.webkit.org/show_bug.cgi?id=150089 5 6 Reviewed by Geoffrey Garen. 7 8 According to ES6 spec, class expression has its own lexical environment that holds itself 9 as an immutable binding[1] (section 14.5.14 step 2, 3, 4, 23) 10 11 As a result, even if the binding declared in the outer scope is overridden, methods inside 12 class expression can refer its class by the class name. 13 14 [1]: http://ecma-international.org/ecma-262/6.0/#sec-runtime-semantics-classdefinitionevaluation 15 16 * bytecompiler/NodesCodegen.cpp: 17 (JSC::ClassExprNode::emitBytecode): 18 * parser/ASTBuilder.h: 19 (JSC::ASTBuilder::createClassExpr): 20 * parser/NodeConstructors.h: 21 (JSC::ClassExprNode::ClassExprNode): 22 * parser/Nodes.h: 23 * parser/Parser.cpp: 24 (JSC::Parser<LexerType>::parseClass): 25 * parser/SyntaxChecker.h: 26 (JSC::SyntaxChecker::createClassExpr): 27 * tests/es6.yaml: 28 * tests/stress/class-expression-generates-environment.js: Added. 29 (shouldBe): 30 (shouldThrow): 31 (prototype.method): 32 (staticMethod): 33 (A.prototype.method): 34 (A.staticMethod): 35 (A): 36 * tests/stress/class-expression-should-be-tdz-in-heritage.js: Added. 37 (shouldThrow): 38 (shouldThrow.A): 39 1 40 2015-10-13 Saam barati <[email protected]> 2 41
Note:
See TracChangeset
for help on using the changeset viewer.