Bug 111625

Summary: [V8] Preprocess constant values to avoid a "static_cast<signed int>" in CodeGeneratorV8.
Product: WebKit Reporter: Mike West <mkwst>
Component: WebCore Misc.Assignee: Mike West <mkwst>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, dcarney, dglazkov, haraken, japhet, jochen, ossy, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description Mike West 2013-03-06 14:17:29 PST
When generating code for constants in IDL files, we're currently pushing the values through "static_cast<signed int>" in order to ensure that values like "0xFFFFFFFF" are properly handled as "-1". There's no reason to do this work in C when Perl is perfectly capable of manipulating text.

The FIXME at http://trac.webkit.org/browser/trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm?rev=144976#L2933 has been around since 2009. Now's as good a time as any to take care of it.
Comment 1 Mike West 2013-03-06 14:30:07 PST
Created attachment 191832 [details]
Patch
Comment 2 Mike West 2013-03-06 14:31:44 PST
Starting to dabble in bindings. Jochen, Dan, mind taking a look?
Comment 3 WebKit Review Bot 2013-03-06 15:02:39 PST
Comment on attachment 191832 [details]
Patch

Attachment 191832 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://webkit-commit-queue.appspot.com/results/17027132

New failing tests:
fast/canvas/webgl/css-webkit-canvas-repaint.html
fast/canvas/webgl/error-reporting.html
fast/canvas/webgl/gl-getstring.html
fast/canvas/webgl/copy-tex-image-and-sub-image-2d.html
fast/canvas/webgl/drawingbuffer-test.html
fast/canvas/webgl/gl-pixelstorei.html
fast/canvas/webgl/constants.html
http/tests/cache/subresource-failover-to-network.html
fast/canvas/webgl/functions-returning-strings.html
fast/canvas/webgl/context-attributes-alpha-depth-stencil-antialias.html
fast/canvas/webgl/buffer-data-array-buffer.html
fast/canvas/webgl/gl-enable-enum-test.html
fast/canvas/webgl/get-active-test.html
fast/canvas/webgl/context-lost-restored.html
fast/canvas/webgl/context-release-upon-reload.html
fast/canvas/webgl/buffer-bind-test.html
fast/canvas/webgl/gl-get-calls.html
fast/canvas/webgl/draw-arrays-out-of-bounds.html
fast/canvas/webgl/gl-bind-attrib-location-test.html
fast/canvas/webgl/framebuffer-test.html
fast/canvas/webgl/canvas-zero-size.html
fast/canvas/webgl/context-lost.html
fast/canvas/webgl/attrib-location-length-limits.html
fast/canvas/webgl/bad-arguments-test.html
compositing/webgl/webgl-reflection.html
fast/canvas/webgl/gl-enum-tests.html
fast/canvas/webgl/draw-elements-out-of-bounds.html
fast/canvas/webgl/canvas-2d-webgl-texture.html
fast/canvas/webgl/css-webkit-canvas.html
fast/canvas/webgl/gl-getshadersource.html
Comment 4 Mike West 2013-03-06 15:34:38 PST
Created attachment 191852 [details]
Patch
Comment 5 Kentaro Hara 2013-03-06 17:56:01 PST
Comment on attachment 191852 [details]
Patch

ok
Comment 6 Mike West 2013-03-06 23:18:27 PST
Comment on attachment 191852 [details]
Patch

Thanks.
Comment 7 WebKit Review Bot 2013-03-06 23:51:10 PST
Comment on attachment 191852 [details]
Patch

Clearing flags on attachment: 191852

Committed r145043: <http://trac.webkit.org/changeset/145043>
Comment 8 WebKit Review Bot 2013-03-06 23:51:14 PST
All reviewed patches have been landed.  Closing bug.
Comment 9 Csaba Osztrogon√°c 2013-03-07 03:43:32 PST
(In reply to comment #7)
> (From update of attachment 191852 [details])
> Clearing flags on attachment: 191852
> 
> Committed r145043: <http://trac.webkit.org/changeset/145043>

It broke the bindings generation tests. Could you fix it?
Comment 10 Kentaro Hara 2013-03-07 03:46:12 PST
(In reply to comment #9)
> It broke the bindings generation tests. Could you fix it?

Sorry every week... Fixed in r145060.