Bug 140760

Summary: Add a build flag for ES6 class syntax
Product: WebKit Reporter: Ryosuke Niwa <rniwa>
Component: JavaScriptCoreAssignee: Ryosuke Niwa <rniwa>
Status: RESOLVED FIXED    
Severity: Normal CC: barraclough, commit-queue, fpizlo, ggaren, mark.lam, oliver, sam
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 140491    
Attachments:
Description Flags
Adds a build flag
none
Fixed the build failure msaboff: review+

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>