From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.43; helo=mga05.intel.com; envelope-from=jaben.carsey@intel.com; receiver=edk2-devel@lists.01.org Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id E648A2251212F for ; Fri, 20 Apr 2018 08:51:54 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Apr 2018 08:51:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,302,1520924400"; d="scan'208";a="44811529" Received: from jcarsey-desk1.amr.corp.intel.com ([10.7.159.144]) by orsmga003.jf.intel.com with ESMTP; 20 Apr 2018 08:51:52 -0700 From: Jaben Carsey To: edk2-devel@lists.01.org Date: Fri, 20 Apr 2018 08:51:20 -0700 Message-Id: X-Mailer: git-send-email 2.16.2.windows.1 Subject: [PATCH v1 00/27] BaseTools refactoring X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Apr 2018 15:51:55 -0000 remove unused code/variables/file move re.compile to eliminate recompiling same expression replace string constants in code with predefined constants (including sets, preferred for "in" testing, and lists of string constants) (include making new constants, sets, and lists) switch dict to defaultdict to eliminate initialization code dont compare using "in [None,'']" as python does that by default use a shared Component to Module map Jaben Carsey (27): BaseTools: Misc - refactor RegEx to minimize multiple compiling BaseTools: GenPatchPcdTable - refactor RegEx to minimize multiple compiling BaseTools: Share RegEx between files BaseTools: Workspace - refactor RegEx to minimize multiple compiling BaseTools: Autogen - replace string constants with those from DataType BaseTools: simplify if call BaseTools: Workspace - refactor GetStructurePcdInfo BaseTools: AutoGen - remove dictionary populated, but never accessed BaseTools: AutoGen - remove unused variables. BaseTools: Remove extra .keys() BaseTools: Workspace/MetaFileParser - refactor dicts BaseTools: remove dict from DscBuildData BaseTools: replace string constants used for module types BaseTools: Define and use a set for common list BaseTools: Share a dictionary instead of keeping multiples BaseTools: Replace EDK Component strings with predefined constant BaseTools: DataType - cleanup list constants BaseTools: Replace PCD type strings with predefined constant BaseTools: Replace Binary File type strings with predefined constant BaseTools: remove duplicate variable BaseTools: replace string with predefined constant BaseTools: remove redundant if comparison BaseTools: AutoGen - use dafultdict instead of dict BaseTools: GenFds - simplify testing for Hex number BaseTools: AutoGen - use defaultdict to auto initialize BaseTools: remove unused MigrationUtilities.py BaseTools: CommonClass - remove unused classes BaseTools/Source/Python/AutoGen/AutoGen.py | 153 +++--- BaseTools/Source/Python/AutoGen/BuildEngine.py | 10 +- BaseTools/Source/Python/AutoGen/GenC.py | 170 +++--- BaseTools/Source/Python/AutoGen/GenDepex.py | 33 +- BaseTools/Source/Python/AutoGen/GenMake.py | 2 - BaseTools/Source/Python/AutoGen/GenPcdDb.py | 12 +- BaseTools/Source/Python/AutoGen/GenVar.py | 6 +- BaseTools/Source/Python/Common/DataType.py | 54 +- BaseTools/Source/Python/Common/Expression.py | 4 +- BaseTools/Source/Python/Common/GlobalData.py | 1 + BaseTools/Source/Python/Common/MigrationUtilities.py | 568 -------------------- BaseTools/Source/Python/Common/Misc.py | 26 +- BaseTools/Source/Python/CommonDataClass/CommonClass.py | 397 +------------- BaseTools/Source/Python/Ecc/Check.py | 6 +- BaseTools/Source/Python/Ecc/Configuration.py | 2 +- BaseTools/Source/Python/Ecc/c.py | 2 +- BaseTools/Source/Python/GenFds/CompressSection.py | 3 +- BaseTools/Source/Python/GenFds/DataSection.py | 8 +- BaseTools/Source/Python/GenFds/DepexSection.py | 17 +- BaseTools/Source/Python/GenFds/EfiSection.py | 25 +- BaseTools/Source/Python/GenFds/Fd.py | 3 +- BaseTools/Source/Python/GenFds/FdfParser.py | 121 ++--- BaseTools/Source/Python/GenFds/Ffs.py | 51 +- BaseTools/Source/Python/GenFds/FfsInfStatement.py | 56 +- BaseTools/Source/Python/GenFds/Fv.py | 6 +- BaseTools/Source/Python/GenFds/FvImageSection.py | 5 +- BaseTools/Source/Python/GenFds/GenFds.py | 10 +- BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py | 40 +- BaseTools/Source/Python/GenFds/GuidSection.py | 5 +- BaseTools/Source/Python/GenFds/OptRomInfStatement.py | 3 +- BaseTools/Source/Python/GenFds/Region.py | 5 +- BaseTools/Source/Python/GenFds/Section.py | 46 +- BaseTools/Source/Python/GenFds/UiSection.py | 3 +- BaseTools/Source/Python/GenFds/VerSection.py | 3 +- BaseTools/Source/Python/GenPatchPcdTable/GenPatchPcdTable.py | 23 +- BaseTools/Source/Python/Makefile | 1 - BaseTools/Source/Python/Trim/Trim.py | 2 +- BaseTools/Source/Python/Workspace/DecBuildData.py | 22 +- BaseTools/Source/Python/Workspace/DscBuildData.py | 51 +- BaseTools/Source/Python/Workspace/InfBuildData.py | 74 +-- BaseTools/Source/Python/Workspace/MetaFileParser.py | 27 +- BaseTools/Source/Python/Workspace/WorkspaceCommon.py | 2 +- BaseTools/Source/Python/build/BuildReport.py | 99 ++-- BaseTools/Source/Python/build/build.py | 16 +- 44 files changed, 583 insertions(+), 1590 deletions(-) delete mode 100644 BaseTools/Source/Python/Common/MigrationUtilities.py -- 2.16.2.windows.1