constants are always typed to 'int' https://bugs.webkit.org/show_bug.cgi?id=130775
authortonikitoo@webkit.org <tonikitoo@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 28 Mar 2014 17:51:51 +0000 (17:51 +0000)
committertonikitoo@webkit.org <tonikitoo@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 28 Mar 2014 17:51:51 +0000 (17:51 +0000)
commit5b5a3b20fcade6e77f2d11e8c70a54283cfc8457
treecf65a2b8f68a940d0d93e6bade68d39035bfe6b7
parent2e829049fb327e06d02009cb8080fea55114e8ba
constants are always typed to 'int' https://bugs.webkit.org/show_bug.cgi?id=130775

Reviewed by Darin Adler.
Patch by Antonio Gomes <a1.gomes@sisa.samsung.com>

Patch fixes a bug where all constant getter generated
methods were returning 'integer' values due to static_cast.

Compilers should be smarth enough to properly infer which
jsNumber class construtor to call given a literal value.

Patch also fixes a bug where values whose representation
is bigger an integer maximum were overflowing. For instance,
NodeFilter.SHOW_ALL (0xFFFFFFFF).

Tests:
Binding tests updated.
Rebaselined fast/dom/constants.html

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
* bindings/scripts/test/JS/JSTestInterface.cpp:
(WebCore::jsTestInterfaceIMPLEMENTSCONSTANT1):
(WebCore::jsTestInterfaceIMPLEMENTSCONSTANT2):
(WebCore::jsTestInterfaceSUPPLEMENTALCONSTANT1):
(WebCore::jsTestInterfaceSUPPLEMENTALCONSTANT2):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::jsTestObjCONDITIONAL_CONST):
(WebCore::jsTestObjCONST_VALUE_0):
(WebCore::jsTestObjCONST_VALUE_1):
(WebCore::jsTestObjCONST_VALUE_2):
(WebCore::jsTestObjCONST_VALUE_4):
(WebCore::jsTestObjCONST_VALUE_8):
(WebCore::jsTestObjCONST_VALUE_9):
(WebCore::jsTestObjCONST_VALUE_11):
(WebCore::jsTestObjCONST_VALUE_12):
(WebCore::jsTestObjCONST_VALUE_13):
(WebCore::jsTestObjCONST_VALUE_14):
(WebCore::jsTestObjCONST_JAVASCRIPT):
(WebCore::jsTestObjReadonly):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@166413 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/fast/dom/constants-expected.txt
LayoutTests/fast/dom/constants.html
Source/WebCore/ChangeLog
Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp