ES6: Object Literal Extensions - Methods
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 6 Mar 2015 22:31:28 +0000 (22:31 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 6 Mar 2015 22:31:28 +0000 (22:31 +0000)
commit1cf7940df0dd4a71a426999cd4ff51a2531c1c5a
treef0c391bfd209cb895d443593bbacfb73fb253968
parent6a8fe54a51a6df64e987184cba4dc8447c3c9335
ES6: Object Literal Extensions - Methods
https://bugs.webkit.org/show_bug.cgi?id=142390

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

Source/JavaScriptCore:

Support method syntax in object literals.

* parser/Parser.h:
* parser/Parser.cpp:
(JSC::stringForFunctionMode):
(JSC::Parser<LexerType>::parseProperty):
Methods are allowed for identifier, string, and numeric names,
and computed property names.

(JSC::Parser<LexerType>::parsePropertyMethod):
Helper for parsing a property method.

LayoutTests:

* js/object-literal-computed-methods-expected.txt: Added.
* js/object-literal-computed-methods.html: Added.
* js/object-literal-methods-expected.txt: Added.
* js/object-literal-methods.html: Added.
* js/script-tests/object-literal-computed-methods.js: Added.
* js/script-tests/object-literal-methods.js: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@181183 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/js/object-literal-computed-methods-expected.txt [new file with mode: 0644]
LayoutTests/js/object-literal-computed-methods.html [new file with mode: 0644]
LayoutTests/js/object-literal-methods-expected.txt [new file with mode: 0644]
LayoutTests/js/object-literal-methods.html [new file with mode: 0644]
LayoutTests/js/script-tests/object-literal-computed-methods.js [new file with mode: 0644]
LayoutTests/js/script-tests/object-literal-methods.js [new file with mode: 0644]
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/parser/Parser.cpp
Source/JavaScriptCore/parser/Parser.h