Source/JavaScriptCore:
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 6 Mar 2015 01:16:25 +0000 (01:16 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 6 Mar 2015 01:16:25 +0000 (01:16 +0000)
commitd2a0c8e0368b375b3846d0c11273c43d14bf91ea
tree5ada3e59b27bbc65b4a7eb318966f9f02a5d572a
parent8e22de4969195a39f7c8785cf434f8dffbe2d74d
Source/JavaScriptCore:
ES6: Object Literal Extensions - Shorthand Properties (Identifiers)
https://bugs.webkit.org/show_bug.cgi?id=142353

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-03-05
Reviewed by Geoffrey Garen.

* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseProperty):
Parsing an identifier property followed by a comma or end brace treat
as a shorthand property and create a property that has the same
property name as the identifier name and value of a variable with that
identifier. Otherwise, fall through to getter/setter parsing.

LayoutTests:
Web Inspector: Follow-up fixes to ObjectTreeBaseTreeElement
https://bugs.webkit.org/show_bug.cgi?id=142367

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-03-05
Reviewed by Geoffrey Garen.

* js/object-literal-shorthand-construction-expected.txt: Added.
* js/object-literal-shorthand-construction.html: Added.
* js/script-tests/object-literal-shorthand-construction.js: Added.
(equivalent):
(testShorthandConstructionEquivalent):
(testShorthandConstructionNotEquivalent):
Tests specifically for new literal construction with shorthands.

* sputnik/Conformance/12_Statement/12.1_Block/S12.1_A4_T1-expected.txt:
* sputnik/Conformance/12_Statement/12.1_Block/S12.1_A4_T2-expected.txt:
* sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.4_The_for_in_Statement/S12.6.4_A15-expected.txt:
These tests use object literal shorthand construction syntax and expected
failures. The tests now fail differently, so just rebase their results.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@181121 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/js/object-literal-shorthand-construction-expected.txt [new file with mode: 0644]
LayoutTests/js/object-literal-shorthand-construction.html [new file with mode: 0644]
LayoutTests/js/script-tests/object-literal-shorthand-construction.js [new file with mode: 0644]
LayoutTests/sputnik/Conformance/12_Statement/12.1_Block/S12.1_A4_T1-expected.txt
LayoutTests/sputnik/Conformance/12_Statement/12.1_Block/S12.1_A4_T2-expected.txt
LayoutTests/sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.4_The_for_in_Statement/S12.6.4_A15-expected.txt
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/parser/Parser.cpp