Bug 42829

Summary: Code Generator: Should be able to generate constants with string and negative number values.
Product: WebKit Reporter: Jessie Berlin <jberlin>
Component: WebCore Misc.Assignee: Jessie Berlin <jberlin>
Status: RESOLVED FIXED    
Severity: Normal CC: jberlin, sam, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Adds ability to generate string values and negative number values for constants none

Jessie Berlin
Reported 2010-07-22 08:25:45 PDT
Right now it is only possible to generate constants from the idl files with values that match [a-zA-Z0-9]*, which catches unsigned integral values and hexadecimal numbers but not strings or negative numbers.
Attachments
Adds ability to generate string values and negative number values for constants (17.80 KB, patch)
2010-07-22 08:41 PDT, Jessie Berlin
no flags
Jessie Berlin
Comment 1 2010-07-22 08:41:55 PDT
Created attachment 62302 [details] Adds ability to generate string values and negative number values for constants
WebKit Review Bot
Comment 2 2010-07-22 08:43:02 PDT
Attachment 62302 [details] did not pass style-queue: Failed to run "['WebKitTools/Scripts/check-webkit-style']" exit_code: 1 WebCore/bindings/scripts/test/JS/JSTestObj.cpp:1293: jsTestObjCONST_VALUE_9 is incorrectly named. Don't use underscores in your identifier names. [readability/naming] [4] WebCore/bindings/scripts/test/JS/JSTestObj.cpp:1298: jsTestObjCONST_VALUE_10 is incorrectly named. Don't use underscores in your identifier names. [readability/naming] [4] WebCore/bindings/scripts/test/JS/JSTestObj.cpp:1303: jsTestObjCONST_VALUE_11 is incorrectly named. Don't use underscores in your identifier names. [readability/naming] [4] WebCore/bindings/scripts/test/JS/JSTestObj.cpp:1308: jsTestObjCONST_VALUE_12 is incorrectly named. Don't use underscores in your identifier names. [readability/naming] [4] WebCore/bindings/scripts/test/JS/JSTestObj.cpp:1313: jsTestObjCONST_VALUE_13 is incorrectly named. Don't use underscores in your identifier names. [readability/naming] [4] WebCore/bindings/scripts/test/JS/JSTestObj.cpp:1318: jsTestObjCONST_VALUE_14 is incorrectly named. Don't use underscores in your identifier names. [readability/naming] [4] WebCore/bindings/scripts/test/JS/JSTestObj.h:183: jsTestObjCONST_VALUE_9 is incorrectly named. Don't use underscores in your identifier names. [readability/naming] [4] WebCore/bindings/scripts/test/JS/JSTestObj.h:184: jsTestObjCONST_VALUE_10 is incorrectly named. Don't use underscores in your identifier names. [readability/naming] [4] WebCore/bindings/scripts/test/JS/JSTestObj.h:185: jsTestObjCONST_VALUE_11 is incorrectly named. Don't use underscores in your identifier names. [readability/naming] [4] WebCore/bindings/scripts/test/JS/JSTestObj.h:186: jsTestObjCONST_VALUE_12 is incorrectly named. Don't use underscores in your identifier names. [readability/naming] [4] WebCore/bindings/scripts/test/JS/JSTestObj.h:187: jsTestObjCONST_VALUE_13 is incorrectly named. Don't use underscores in your identifier names. [readability/naming] [4] WebCore/bindings/scripts/test/JS/JSTestObj.h:188: jsTestObjCONST_VALUE_14 is incorrectly named. Don't use underscores in your identifier names. [readability/naming] [4] Total errors found: 12 in 9 files If any of these errors are false positives, please file a bug against check-webkit-style.
Jessie Berlin
Comment 3 2010-07-22 08:45:03 PDT
These match with the existing names in the tests (and were auto-generated by running run-bindings-tests). Is this going to be an issue? (In reply to comment #2) > Attachment 62302 [details] did not pass style-queue: > > Failed to run "['WebKitTools/Scripts/check-webkit-style']" exit_code: 1 > WebCore/bindings/scripts/test/JS/JSTestObj.cpp:1293: jsTestObjCONST_VALUE_9 is incorrectly named. Don't use underscores in your identifier names. [readability/naming] [4] > WebCore/bindings/scripts/test/JS/JSTestObj.cpp:1298: jsTestObjCONST_VALUE_10 is incorrectly named. Don't use underscores in your identifier names. [readability/naming] [4] > WebCore/bindings/scripts/test/JS/JSTestObj.cpp:1303: jsTestObjCONST_VALUE_11 is incorrectly named. Don't use underscores in your identifier names. [readability/naming] [4] > WebCore/bindings/scripts/test/JS/JSTestObj.cpp:1308: jsTestObjCONST_VALUE_12 is incorrectly named. Don't use underscores in your identifier names. [readability/naming] [4] > WebCore/bindings/scripts/test/JS/JSTestObj.cpp:1313: jsTestObjCONST_VALUE_13 is incorrectly named. Don't use underscores in your identifier names. [readability/naming] [4] > WebCore/bindings/scripts/test/JS/JSTestObj.cpp:1318: jsTestObjCONST_VALUE_14 is incorrectly named. Don't use underscores in your identifier names. [readability/naming] [4] > WebCore/bindings/scripts/test/JS/JSTestObj.h:183: jsTestObjCONST_VALUE_9 is incorrectly named. Don't use underscores in your identifier names. [readability/naming] [4] > WebCore/bindings/scripts/test/JS/JSTestObj.h:184: jsTestObjCONST_VALUE_10 is incorrectly named. Don't use underscores in your identifier names. [readability/naming] [4] > WebCore/bindings/scripts/test/JS/JSTestObj.h:185: jsTestObjCONST_VALUE_11 is incorrectly named. Don't use underscores in your identifier names. [readability/naming] [4] > WebCore/bindings/scripts/test/JS/JSTestObj.h:186: jsTestObjCONST_VALUE_12 is incorrectly named. Don't use underscores in your identifier names. [readability/naming] [4] > WebCore/bindings/scripts/test/JS/JSTestObj.h:187: jsTestObjCONST_VALUE_13 is incorrectly named. Don't use underscores in your identifier names. [readability/naming] [4] > WebCore/bindings/scripts/test/JS/JSTestObj.h:188: jsTestObjCONST_VALUE_14 is incorrectly named. Don't use underscores in your identifier names. [readability/naming] [4] > Total errors found: 12 in 9 files > > > If any of these errors are false positives, please file a bug against check-webkit-style.
Darin Adler
Comment 4 2010-07-22 12:57:37 PDT
Comment on attachment 62302 [details] Adds ability to generate string values and negative number values for constants > + (WebDOMTestObj::): > + > + (WebCore::): > + (WebCore::jsTestObjCONST_VALUE_9): > + (WebCore::jsTestObjCONST_VALUE_10): > + (WebCore::jsTestObjCONST_VALUE_11): > + (WebCore::jsTestObjCONST_VALUE_12): > + (WebCore::jsTestObjCONST_VALUE_13): > + (WebCore::jsTestObjCONST_VALUE_14): > + (WebCore::): You should take out these useless function name lines.
Jessie Berlin
Comment 5 2010-07-22 13:29:58 PDT
(In reply to comment #4) > (From update of attachment 62302 [details]) > > + (WebDOMTestObj::): > > + > > + (WebCore::): > > + (WebCore::jsTestObjCONST_VALUE_9): > > + (WebCore::jsTestObjCONST_VALUE_10): > > + (WebCore::jsTestObjCONST_VALUE_11): > > + (WebCore::jsTestObjCONST_VALUE_12): > > + (WebCore::jsTestObjCONST_VALUE_13): > > + (WebCore::jsTestObjCONST_VALUE_14): > > > + (WebCore::): > > You should take out these useless function name lines. Done. Thanks!
Jessie Berlin
Comment 6 2010-07-22 13:36:03 PDT
Comment on attachment 62302 [details] Adds ability to generate string values and negative number values for constants Committed in r63908 http://trac.webkit.org/changeset/63908
Note You need to log in before you can comment on or make changes to this bug.