Changeset 87771 in webkit
- Timestamp:
- May 31, 2011, 7:40:27 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/Source/JavaScriptCore/ChangeLog ¶
r87702 r87771 1 2011-05-31 Yong Li <yoli@rim.com> 2 3 Reviewed by Eric Seidel. 4 5 https://bugs.webkit.org/show_bug.cgi?id=54807 6 We have been assuming plain bitfields (like "int a : 31") are always signed integers. 7 However some compilers can treat them as unsigned. For example, RVCT 4.0 states plain 8 bitfields (declared without either signed or unsigned qualifiers) are treats as unsigned. 9 http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0348c/Babjddhe.html 10 Although we can use "--signed-bitfields" flag to make RVCT 4.0 behave as most other compilers, 11 always using "signed"/"unsigned" qualifier to declare integral type bitfields is still a good 12 rule we should have in order to make our code independent from compilers and compiler flags. 13 14 No new test added because this change is not known to fix any issue. 15 16 * bytecode/StructureStubInfo.h: 17 1 18 2011-05-30 Hojong Han <hojong.han@samsung.com> 2 19 -
TabularUnified trunk/Source/JavaScriptCore/bytecode/StructureStubInfo.h ¶
r87431 r87771 128 128 } 129 129 130 intaccessType : 31;131 intseen : 1;130 signed accessType : 31; 131 unsigned seen : 1; 132 132 133 133 union { -
TabularUnified trunk/Source/WebCore/ChangeLog ¶
r87770 r87771 1 2011-05-31 Yong Li <yoli@rim.com> 2 3 Reviewed by Eric Seidel. 4 5 https://bugs.webkit.org/show_bug.cgi?id=54807 6 We have been assuming plain bitfields (like "int a : 31") are always signed integers. 7 However some compilers can treat them as unsigned. For example, RVCT 4.0 states plain 8 bitfields (declared without either signed or unsigned qualifiers) are treats as unsigned. 9 http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0348c/Babjddhe.html 10 Although we can use "--signed-bitfields" flag to make RVCT 4.0 behave as most other compilers, 11 always using "signed"/"unsigned" qualifier to declare integral type bitfields is still a good 12 rule we should have in order to make our code independent from compilers and compiler flags. 13 14 No new test added because this change is not known to fix any issue. 15 16 * css/CSSPrimitiveValue.h: 17 * css/CSSProperty.h: 18 * rendering/InlineBox.h: 19 * rendering/RenderBlock.h: 20 1 21 2011-05-31 Hironori Bono <hbono@chromium.org> 2 22 -
TabularUnified trunk/Source/WebCore/css/CSSPrimitiveValue.h ¶
r80463 r87771 226 226 virtual unsigned short cssValueType() const; 227 227 228 intm_type : 31;228 signed m_type : 31; 229 229 mutable unsigned m_hasCachedCSSText : 1; 230 230 union { -
TabularUnified trunk/Source/WebCore/css/CSSProperty.h ¶
r76248 r87771 67 67 68 68 // Make sure the following fits in 4 bytes. Really. 69 intm_id : 15;70 intm_shorthandID : 15; // If this property was set as part of a shorthand, gives the shorthand.69 signed m_id : 15; 70 signed m_shorthandID : 15; // If this property was set as part of a shorthand, gives the shorthand. 71 71 bool m_important : 1; 72 72 bool m_implicit : 1; // Whether or not the property was set implicitly as the result of a shorthand. -
TabularUnified trunk/Source/WebCore/rendering/InlineBox.h ¶
r87753 r87771 366 366 mutable bool m_nextOnLineExists : 1; 367 367 mutable bool m_prevOnLineExists : 1; 368 intm_expansion : 11; // for justified text368 signed m_expansion : 11; // for justified text 369 369 370 370 #ifndef NDEBUG -
TabularUnified trunk/Source/WebCore/rendering/RenderBlock.h ¶
r87302 r87771 829 829 RenderLineBoxList m_lineBoxes; // All of the root line boxes created for this block flow. For example, <div>Hello<br>world.</div> will have two total lines for the <div>. 830 830 831 mutable intm_lineHeight : 31;831 mutable signed m_lineHeight : 31; 832 832 bool m_beingDestroyed : 1; 833 833 -
TabularUnified trunk/Tools/ChangeLog ¶
r87770 r87771 1 2011-05-31 Yong Li <yoli@rim.com> 2 3 Reviewed by Eric Seidel. 4 5 https://bugs.webkit.org/show_bug.cgi?id=54807 6 We have been assuming plain bitfields (like "int a : 31") are always signed integers. 7 However some compilers can treat them as unsigned. For example, RVCT 4.0 states plain 8 bitfields (declared without either signed or unsigned qualifiers) are treats as unsigned. 9 http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0348c/Babjddhe.html 10 Although we can use "--signed-bitfields" flag to make RVCT 4.0 behave as most other compilers, 11 always using "signed"/"unsigned" qualifier to declare integral type bitfields is still a good 12 rule we should have in order to make our code independent from compilers and compiler flags. 13 14 * Scripts/webkitpy/style/checkers/cpp.py: 15 1 16 2011-05-31 Hironori Bono <hbono@chromium.org> 2 17 -
TabularUnified trunk/Tools/Scripts/webkitpy/style/checkers/cpp.py ¶
r85138 r87771 2920 2920 ' for more information.') 2921 2921 2922 # Check for plain bitfields declared without either "singed" or "unsigned". 2923 # Most compilers treat such bitfields as signed, but there are still compilers like 2924 # RVCT 4.0 that use unsigned by default. 2925 matched = re.match(r'\s*((const|mutable)\s+)?(char|(short(\s+int)?)|int|long(\s+(long|int))?)\s+.+\s*:\s*\d+\s*;', line) 2926 if matched: 2927 error(line_number, 'runtime/bitfields', 5, 2928 'Please declare integral type bitfields with either signed or unsigned.') 2929 2922 2930 check_identifier_name_in_declaration(filename, line_number, line, file_state, error) 2923 2931 … … 3453 3461 'readability/webkit_api', 3454 3462 'runtime/arrays', 3463 'runtime/bitfields', 3455 3464 'runtime/casting', 3456 3465 'runtime/explicit', -
TabularUnified trunk/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py ¶
r85138 r87771 2374 2374 'operator*). [runtime/invalid_increment] [5]') 2375 2375 2376 # Integral bitfields must be declared with either signed or unsigned keyword. 2377 def test_plain_integral_bitfields(self): 2378 errmsg = ('Please declare integral type bitfields with either signed or unsigned. [runtime/bitfields] [5]') 2379 2380 self.assert_lint('int a : 30;', errmsg) 2381 self.assert_lint('mutable short a : 14;', errmsg) 2382 self.assert_lint('const char a : 6;', errmsg) 2383 self.assert_lint('long int a : 30;', errmsg) 2376 2384 2377 2385 class CleansedLinesTest(unittest.TestCase):
Note:
See TracChangeset
for help on using the changeset viewer.