Bug 140760 - Add a build flag for ES6 class syntax
Summary: Add a build flag for ES6 class syntax
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Ryosuke Niwa
URL:
Keywords:
Depends on:
Blocks: 140491
  Show dependency treegraph
 
Reported: 2015-01-21 21:10 PST by Ryosuke Niwa
Modified: 2015-01-22 15:12 PST (History)
7 users (show)

See Also:


Attachments
Adds a build flag (34.54 KB, patch)
2015-01-21 21:39 PST, Ryosuke Niwa
no flags Details | Formatted Diff | Diff
Fixed the build failure (34.74 KB, patch)
2015-01-21 21:50 PST, Ryosuke Niwa
msaboff: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ryosuke Niwa 2015-01-21 21:10:04 PST
Add a build flag to enable ES6 class syntax.

Also recognize keywords used in ES6 class syntax when this build flag is turned on.
Comment 1 Ryosuke Niwa 2015-01-21 21:39:00 PST
Created attachment 245120 [details]
Adds a build flag
Comment 2 WebKit Commit Bot 2015-01-21 21:40:38 PST
Attachment 245120 [details] did not pass style-queue:


ERROR: Source/JavaScriptCore/parser/Keywords.table:13:  Line contains tab character.  [whitespace/tab] [5]
ERROR: Source/JavaScriptCore/parser/Keywords.table:16:  Line contains tab character.  [whitespace/tab] [5]
ERROR: Source/JavaScriptCore/parser/Keywords.table:33:  Line contains tab character.  [whitespace/tab] [5]
ERROR: Source/JavaScriptCore/parser/Keywords.table:34:  Line contains tab character.  [whitespace/tab] [5]
ERROR: Source/JavaScriptCore/parser/ParserTokens.h:79:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/JavaScriptCore/parser/ParserTokens.h:80:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/JavaScriptCore/parser/ParserTokens.h:81:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/JavaScriptCore/parser/ParserTokens.h:82:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/JavaScriptCore/parser/ParserTokens.h:84:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/JavaScriptCore/parser/ParserTokens.h:85:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/JavaScriptCore/parser/ParserTokens.h:87:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/WebCore/ChangeLog:8:  You should remove the 'No new tests' and either add and list tests, or explain why no new tests were possible.  [changelog/nonewtests] [5]
Total errors found: 12 in 17 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Ryosuke Niwa 2015-01-21 21:50:41 PST
Created attachment 245121 [details]
Fixed the build failure
Comment 4 WebKit Commit Bot 2015-01-21 21:53:48 PST
Attachment 245121 [details] did not pass style-queue:


ERROR: Source/JavaScriptCore/parser/Keywords.table:13:  Line contains tab character.  [whitespace/tab] [5]
ERROR: Source/JavaScriptCore/parser/Keywords.table:16:  Line contains tab character.  [whitespace/tab] [5]
ERROR: Source/JavaScriptCore/parser/Keywords.table:33:  Line contains tab character.  [whitespace/tab] [5]
ERROR: Source/JavaScriptCore/parser/Keywords.table:34:  Line contains tab character.  [whitespace/tab] [5]
ERROR: Source/JavaScriptCore/parser/ParserTokens.h:79:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/JavaScriptCore/parser/ParserTokens.h:80:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/JavaScriptCore/parser/ParserTokens.h:81:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/JavaScriptCore/parser/ParserTokens.h:82:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/JavaScriptCore/parser/ParserTokens.h:84:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/JavaScriptCore/parser/ParserTokens.h:85:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/JavaScriptCore/parser/ParserTokens.h:87:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/WebCore/ChangeLog:8:  You should remove the 'No new tests' and either add and list tests, or explain why no new tests were possible.  [changelog/nonewtests] [5]
Total errors found: 12 in 17 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 5 Michael Saboff 2015-01-22 14:25:26 PST
Comment on attachment 245121 [details]
Fixed the build failure

View in context: https://bugs.webkit.org/attachment.cgi?id=245121&action=review

I think we should rename ENABLE_CLASS_SYNTAX to ENABLE_ES6_CLASS_SYNTAX.
Look into mac-wk2 build failure.
r=me with suggested changes.

> Source/JavaScriptCore/parser/Keywords.table:13
> +class		CLASSTOKEN

Change the tabs to spaces.

> Source/JavaScriptCore/parser/Keywords.table:16
> +extends	EXTENDS

Ditto

> Source/JavaScriptCore/parser/Keywords.table:34
> +static		STATICTOKEN
> +super		SUPER

Ditto
Comment 6 Ryosuke Niwa 2015-01-22 15:12:20 PST
Committed r178954: <http://trac.webkit.org/changeset/178954>