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+

Ryosuke Niwa
Reported 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.
Attachments
Adds a build flag (34.54 KB, patch)
2015-01-21 21:39 PST, Ryosuke Niwa
no flags
Fixed the build failure (34.74 KB, patch)
2015-01-21 21:50 PST, Ryosuke Niwa
msaboff: review+
Ryosuke Niwa
Comment 1 2015-01-21 21:39:00 PST
Created attachment 245120 [details] Adds a build flag
WebKit Commit Bot
Comment 2 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.
Ryosuke Niwa
Comment 3 2015-01-21 21:50:41 PST
Created attachment 245121 [details] Fixed the build failure
WebKit Commit Bot
Comment 4 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.
Michael Saboff
Comment 5 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
Ryosuke Niwa
Comment 6 2015-01-22 15:12:20 PST
Note You need to log in before you can comment on or make changes to this bug.