ECC: Add progress indicator of file name for time-consuming checks; Cache include...
authorjlin16 <jlin16@7335b38e-4728-0410-8992-fb3ffe349368>
Thu, 19 Jun 2008 07:45:39 +0000 (07:45 +0000)
committerjlin16 <jlin16@7335b38e-4728-0410-8992-fb3ffe349368>
Thu, 19 Jun 2008 07:45:39 +0000 (07:45 +0000)
git-svn-id: https://buildtools.tianocore.org/svn/buildtools/trunk/BaseTools@1265 7335b38e-4728-0410-8992-fb3ffe349368

Source/Python/Ecc/Check.py
Source/Python/Ecc/c.py

index 17bc3a4..f0b9d2a 100644 (file)
@@ -108,6 +108,7 @@ class Check(object):
                 for F in Filenames:\r
                     if os.path.splitext(F)[1] in ('.c'):\r
                         FullName = os.path.join(Dirpath, F)\r
+                        EdkLogger.quiet("[PROTOTYPE]" + FullName)\r
                         c.CheckFuncLayoutPrototype(FullName)\r
 \r
     # Check whether the body of a function is contained by open and close braces that must be in the first column\r
@@ -280,6 +281,7 @@ class Check(object):
                 for F in Filenames:\r
                     if os.path.splitext(F)[1] in ('.c'):\r
                         FullName = os.path.join(Dirpath, F)\r
+                        EdkLogger.quiet("[BOOLEAN]" + FullName)\r
                         c.CheckBooleanValueComparison(FullName)\r
     # Check whether Non-Boolean comparisons use a compare operator (==, !=, >, < >=, <=). \r
     def PredicateExpressionCheckNonBooleanOperator(self):\r
@@ -294,6 +296,7 @@ class Check(object):
                 for F in Filenames:\r
                     if os.path.splitext(F)[1] in ('.c'):\r
                         FullName = os.path.join(Dirpath, F)\r
+                        EdkLogger.quiet("[NON-BOOLEAN]" + FullName)\r
                         c.CheckNonBooleanValueComparison(FullName)\r
     # Check whether a comparison of any pointer to zero must be done via the NULL type\r
     def PredicateExpressionCheckComparisonNullType(self):\r
@@ -308,6 +311,7 @@ class Check(object):
                 for F in Filenames:\r
                     if os.path.splitext(F)[1] in ('.c'):\r
                         FullName = os.path.join(Dirpath, F)\r
+                        EdkLogger.quiet("[POINTER]" + FullName)\r
                         c.CheckPointerNullComparison(FullName)\r
     #\r
     # Include file checking\r
index 4797a12..48231f2 100644 (file)
@@ -11,6 +11,7 @@ import EccGlobalData
 import MetaDataParser\r
 \r
 IncludeFileListDict = {}\r
+AllIncludeFileListDict = {}\r
 IncludePathListDict = {}\r
 ComplexTypeDict = {}\r
 SUDict = {}\r
@@ -543,6 +544,9 @@ def GetFullPathOfIncludeFile(Str, IncludePathList):
     return None\r
 \r
 def GetAllIncludeFiles(FullFileName):\r
+    if AllIncludeFileListDict.get(FullFileName) != None:\r
+        return AllIncludeFileListDict.get(FullFileName)\r
+    \r
     IncludePathList = IncludePathListDict.get(os.path.dirname(FullFileName))\r
     if IncludePathList == None:\r
         IncludePathList = MetaDataParser.GetIncludeListOfFile(EccGlobalData.gWorkspace, FullFileName, GetDB())\r
@@ -569,6 +573,8 @@ def GetAllIncludeFiles(FullFileName):
             if FullPath != None and FullPath not in IncludeFileQueue:\r
                 IncludeFileQueue.insert(i + 1, FullPath)\r
         i += 1\r
+    \r
+    AllIncludeFileListDict[FullFileName] = IncludeFileQueue\r
     return IncludeFileQueue\r
 \r
 def GetPredicateListFromPredicateExpStr(PES):\r