[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

levin at chromium.org levin at chromium.org
Wed Dec 22 14:42:50 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 511bd7a84f67c6c1c88edc403fe98d452540fdd6
Author: levin at chromium.org <levin at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Oct 18 11:57:36 2010 +0000

    2010-10-18  David Levin  <levin at chromium.org>
    
            Reviewed by Oliver Hunt.
    
            check-webkit-style needs to ignore underscores in opcode names and vm_throw
            https://bugs.webkit.org/show_bug.cgi?id=47789
    
            * Scripts/webkitpy/style/checker.py: Added the exception for the assembler directory.
            * Scripts/webkitpy/style/checkers/cpp.py: Added special cased names.
            * Scripts/webkitpy/style/checkers/cpp_unittest.py: Added unit tests for the special cases.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69953 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 75bf66c..e9a37d0 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,14 @@
+2010-10-18  David Levin  <levin at chromium.org>
+
+        Reviewed by Oliver Hunt.
+
+        check-webkit-style needs to ignore underscores in opcode names and vm_throw
+        https://bugs.webkit.org/show_bug.cgi?id=47789
+
+        * Scripts/webkitpy/style/checker.py: Added the exception for the assembler directory.
+        * Scripts/webkitpy/style/checkers/cpp.py: Added special cased names.
+        * Scripts/webkitpy/style/checkers/cpp_unittest.py: Added unit tests for the special cases.
+
 2010-10-18  MORITA Hajime  <morrita at google.com>
 
         Reviewed by Kent Tamura.
diff --git a/WebKitTools/Scripts/webkitpy/style/checker.py b/WebKitTools/Scripts/webkitpy/style/checker.py
index f8eefa4..4651859 100644
--- a/WebKitTools/Scripts/webkitpy/style/checker.py
+++ b/WebKitTools/Scripts/webkitpy/style/checker.py
@@ -142,6 +142,10 @@ _PATH_RULES_SPECIFIER = [
       # exceptional header guards (e.g., WebCore_FWD_Debugger_h).
       "/ForwardingHeaders/"],
      ["-build/header_guard"]),
+    ([# assembler has lots of opcodes that use underscores, so
+      # we on't check for underscores in that directory.
+      "/JavaScriptCore/assembler/"],
+     ["-readability/naming"]),
 
     # For third-party Python code, keep only the following checks--
     #
diff --git a/WebKitTools/Scripts/webkitpy/style/checkers/cpp.py b/WebKitTools/Scripts/webkitpy/style/checkers/cpp.py
index f8ebeff..7c1cb3e 100644
--- a/WebKitTools/Scripts/webkitpy/style/checkers/cpp.py
+++ b/WebKitTools/Scripts/webkitpy/style/checkers/cpp.py
@@ -2512,7 +2512,7 @@ def check_identifier_name_in_declaration(filename, line_number, line, error):
         modified_identifier = sub(r'(^|(?<=::))[ms]_', '', identifier)
         if modified_identifier.find('_') >= 0:
             # Various exceptions to the rule: JavaScript op codes functions, const_iterator.
-            if (not (filename.find('JavaScriptCore') >= 0 and modified_identifier.find('_op_') >= 0)
+            if (not (filename.find('JavaScriptCore') >= 0 and modified_identifier.find('op_') >= 0)
                 and not modified_identifier.startswith('tst_')
                 and not modified_identifier.startswith('webkit_dom_object_')
                 and not modified_identifier.startswith('NPN_')
@@ -2521,7 +2521,8 @@ def check_identifier_name_in_declaration(filename, line_number, line, error):
                 and not modified_identifier.startswith('qt_')
                 and not modified_identifier.startswith('cairo_')
                 and not modified_identifier.find('::qt_') >= 0
-                and not modified_identifier == "const_iterator"):
+                and not modified_identifier == "const_iterator"
+                and not modified_identifier == "vm_throw"):
                 error(line_number, 'readability/naming', 4, identifier + " is incorrectly named. Don't use underscores in your identifier names.")
 
         # Check for variables named 'l', these are too easy to confuse with '1' in some fonts
diff --git a/WebKitTools/Scripts/webkitpy/style/checkers/cpp_unittest.py b/WebKitTools/Scripts/webkitpy/style/checkers/cpp_unittest.py
index 2f54305..071ce50 100644
--- a/WebKitTools/Scripts/webkitpy/style/checkers/cpp_unittest.py
+++ b/WebKitTools/Scripts/webkitpy/style/checkers/cpp_unittest.py
@@ -3690,6 +3690,7 @@ class WebKitStyleTest(CppStyleTestBase):
 
         # There is an exception for op code functions but only in the JavaScriptCore directory.
         self.assert_lint('void this_op_code(int var1, int var2)', '', 'JavaScriptCore/foo.cpp')
+        self.assert_lint('void op_code(int var1, int var2)', '', 'JavaScriptCore/foo.cpp')
         self.assert_lint('void this_op_code(int var1, int var2)', 'this_op_code' + name_underscore_error_message)
 
         # GObject requires certain magical names in class declarations.
@@ -3716,6 +3717,9 @@ class WebKitStyleTest(CppStyleTestBase):
         # const_iterator is allowed as well.
         self.assert_lint('typedef VectorType::const_iterator const_iterator;', '')
 
+        # vm_throw is allowed as well.
+        self.assert_lint('int vm_throw;', '')
+
         # Bitfields.
         self.assert_lint('unsigned _fillRule : 1;',
                          '_fillRule' + name_underscore_error_message)

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list