Re: [edk2] [PATCH v2 1/1] BaseTools: Ecc - add dict for config file to internal translation

2018-05-04 Thread Carsey, Jaben
Ersek [mailto:ler...@redhat.com] > Sent: Friday, May 04, 2018 11:25 AM > To: Carsey, Jaben ; edk2-devel@lists.01.org > Cc: Gao, Liming ; Zhu, Yonghong > > Subject: Re: [PATCH v2 1/1] BaseTools: Ecc - add dict for config file to > internal > translation > Importance: High

Re: [edk2] [PATCH v1 1/1] BaseTools: Ecc - add dict for config file to internal translation

2018-05-04 Thread Carsey, Jaben
I worked up and sent out a v2. I think that if we only use the translation when acing the dict, we can leave the rest of the code as it. > -Original Message- > From: Laszlo Ersek [mailto:ler...@redhat.com] > Sent: Friday, May 04, 2018 9:20 AM > To: Carsey, Jaben ; edk2-de

[edk2] [PATCH v2 1/1] BaseTools: Ecc - add dict for config file to internal translation

2018-05-04 Thread Jaben Carsey
Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/Ecc/Configuration.py | 101 +++- 1 file changed, 98 insertions(+), 3 deletions(-) diff --git a/BaseTools/Source/Python/Ecc/Configuration.py b/BaseTools/Source/Python/Ecc

[edk2] [PATCH v1 1/1] BaseTools: Ecc - add dict for config file to internal translation

2018-05-04 Thread Jaben Carsey
Cc: Liming Gao Cc: Yonghong Zhu Cc: Laszlo Ersek Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/Ecc/Configuration.py | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/BaseTools/Source/Python/Ecc

Re: [edk2] [PATCH v1 17/27] BaseTools: DataType - cleanup list constants

2018-05-04 Thread Carsey, Jaben
? -Jaben > -Original Message- > From: Laszlo Ersek [mailto:ler...@redhat.com] > Sent: Friday, May 04, 2018 4:15 AM > To: Carsey, Jaben > Cc: edk2-devel@lists.01.org; Gao, Liming > Subject: Re: [edk2] [PATCH v1 17/27] BaseTools: DataType - cleanup list > constants >

[edk2] [PATCH v1 42/42] BaseTools: use set instead of list

2018-04-27 Thread Jaben Carsey
as we only do membership (in) testing for this, set is better Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/Common/Expression.py | 68 ++-- BaseTools/Source/Python/Common

[edk2] [PATCH v1 40/42] BaseTools: dont make iterator into list if not needed

2018-04-27 Thread Jaben Carsey
functions (like join) can use the iterator just as easily. Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/AutoGen/AutoGen.py | 10 +- BaseTools/Source/Python/AutoGen

[edk2] [PATCH v1 29/42] BaseTools: AutoGen - refactor more functions only called in __init__

2018-04-27 Thread Jaben Carsey
Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/AutoGen/IdfClassObject.py | 89 +--- 1 file changed, 40 insertions(+), 49 deletions(-) diff --git a/BaseTools/Source/Python/AutoGen

[edk2] [PATCH v1 39/42] BaseTools: refactor Depex optomization

2018-04-27 Thread Jaben Carsey
No need to make a list from the set. just pop the item off. Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/AutoGen/GenDepex.py | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions

[edk2] [PATCH v1 35/42] BaseTools: remove unused variable

2018-04-27 Thread Jaben Carsey
Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/Common/DataType.py | 1 - 1 file changed, 1 deletion(-) diff --git a/BaseTools/Source/Python/Common/DataType.py b/BaseTools/Source/Python/Common

[edk2] [PATCH v1 41/42] BaseTools: create base expression class

2018-04-27 Thread Jaben Carsey
this class has a fucntion to share between Exception and RangeExpression change both classes to call this function init in their init Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/Common

[edk2] [PATCH v1 30/42] BaseTools: remove unused member variable

2018-04-27 Thread Jaben Carsey
Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/AutoGen/IdfClassObject.py | 1 - 1 file changed, 1 deletion(-) diff --git a/BaseTools/Source/Python/AutoGen/IdfClassObject.py b/BaseTools/Source

[edk2] [PATCH v1 36/42] BaseTools: GenFds - use existing shared string

2018-04-27 Thread Jaben Carsey
Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/GenFds/Fv.py | 34 ++-- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/BaseTools/Source/Python/GenFds/Fv.py b

[edk2] [PATCH v1 28/42] BaseTools: AutoGen - refactor function to remove extra variables

2018-04-27 Thread Jaben Carsey
we dont need to keep data we already have in different formats... Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/AutoGen/GenVar.py | 13 + 1 file changed, 5 insertions(+), 8 deletions

[edk2] [PATCH v1 38/42] BaseTools: Remove lists form set construction

2018-04-27 Thread Jaben Carsey
There is no need to make a list to make a set. remove lists that are only used in constructing sets. Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/AutoGen/GenDepex.py | 7

[edk2] [PATCH v1 37/42] BaseTools: missed a copyright update

2018-04-27 Thread Jaben Carsey
Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/GenPatchPcdTable/GenPatchPcdTable.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BaseTools/Source/Python/GenPatchPcdTable

[edk2] [PATCH v1 33/42] BaseTools: AutoGen - add Opcode constants

2018-04-27 Thread Jaben Carsey
add constants for dependency expression opcode strings use these new opcode string constants Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/AutoGen/GenDepex.py | 112

[edk2] [PATCH v1 23/42] BaseTools: refactor __init__ functions to not compute temporary variable

2018-04-27 Thread Jaben Carsey
just assign correct value to member variable in __init__ or call parent __init__ Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/AutoGen/GenPcdDb.py | 37 1 file changed, 7

[edk2] [PATCH v1 25/42] BaseTools: AutoGen - move function to clean file namespace

2018-04-27 Thread Jaben Carsey
the function is only used in one other function. just move it there. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/AutoGen/GenPcdDb.py | 52 ++-- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a

[edk2] [PATCH v1 34/42] BaseTools: standardize GUID and pack size

2018-04-27 Thread Jaben Carsey
currently GUID packing and pack size determination is spread throughout the code. This introduces a shared function and dict and routes all code paths through them. Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey

[edk2] [PATCH v1 31/42] BaseTools: remove redundant content in InfSectionParser

2018-04-27 Thread Jaben Carsey
Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/AutoGen/InfSectionParser.py | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/BaseTools/Source/Python/AutoGen

[edk2] [PATCH v1 26/42] BaseTools: AutoGen - remove another function no one calls

2018-04-27 Thread Jaben Carsey
Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/AutoGen/GenVar.py | 5 - 1 file changed, 5 deletions(-) diff --git a/BaseTools/Source/Python/AutoGen/GenVar.py b/BaseTools/Source/Python/AutoGen

[edk2] [PATCH v1 22/42] BaseTools: AutoGen - no need to recompute

2018-04-27 Thread Jaben Carsey
looping over a list and recomputing the same value has no impact on final value Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/AutoGen/GenPcdDb.py | 3 +-- 1 file changed, 1 insertion(+), 2

[edk2] [PATCH v1 15/42] BaseTools: eliminate {} from dictionary contructor call

2018-04-27 Thread Jaben Carsey
no need to construct 2 dictionaries. Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/Workspace/BuildClassObject.py | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a

[edk2] [PATCH v1 24/42] BaseTools: AutoGen - remove function no one calls

2018-04-27 Thread Jaben Carsey
Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/AutoGen/GenPcdDb.py | 11 --- 1 file changed, 11 deletions(-) diff --git a/BaseTools/Source/Python/AutoGen/GenPcdDb.py b/BaseTools/Source

[edk2] [PATCH v1 20/42] BaseTools: AutoGen - refactor out a list

2018-04-27 Thread Jaben Carsey
the lists were used in __init__ then converted to sets instead just use the sets from the begining Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/AutoGen/ValidCheckingInfoObject.py | 10

[edk2] [PATCH v1 19/42] BaseTools: AutoGen - refactor out functions only called in __init__

2018-04-27 Thread Jaben Carsey
Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/AutoGen/ValidCheckingInfoObject.py | 16 +--- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/BaseTools/Source/Python

[edk2] [PATCH v1 18/42] BaseTools: move PCD size calculation functions to PcdClassObject

2018-04-27 Thread Jaben Carsey
move both GetPcdMaxSize and GetPcdSize to the PcdClassObject. fix MAX_SIZE_TYPE to have int values Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/AutoGen/GenC.py| 37

[edk2] [PATCH v1 27/42] BaseTools: Refactor to share GUID packing function

2018-04-27 Thread Jaben Carsey
Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/AutoGen/GenPcdDb.py | 17 ++--- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/BaseTools/Source/Python/AutoGen/GenPcdDb.py

[edk2] [PATCH v1 13/42] BaseTools: AutoGen - UniClassObject refactor static methods

2018-04-27 Thread Jaben Carsey
change methods which do not use self to @staticmethod change their calls to use class name instead of instance Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/AutoGen/UniClassObject.py | 12

[edk2] [PATCH v1 17/42] BaseTools: Workspace - refactor a dict

2018-04-27 Thread Jaben Carsey
change a dict to a set since we never examine the contents, just the keys. Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/Workspace/BuildClassObject.py | 2 +- BaseTools/Source/Python/Workspace

[edk2] [PATCH v1 21/42] BaseTools: AutoGen - refactor out a useless class

2018-04-27 Thread Jaben Carsey
this class was never instantiated. the static function was called. save the function, remove the rest. Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/AutoGen/GenPcdDb.py| 4

[edk2] [PATCH v1 16/42] BaseTools: remove Compound statements

2018-04-27 Thread Jaben Carsey
split them into 2 seperate lines. Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/Workspace/BuildClassObject.py | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a

[edk2] [PATCH v1 14/42] BaseTools: refactor to use list not dict

2018-04-27 Thread Jaben Carsey
since we never access the values in the copied dict, just use a list instead. Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/Common/ToolDefClassObject.py | 5 +++-- BaseTools/Source/Python/GenFds

[edk2] [PATCH v1 08/42] BaseTools: AutoGen - share StripComments API

2018-04-27 Thread Jaben Carsey
add the API root in one class file. delete the static API out of both classes. share it in the single location. Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/AutoGen/IdfClassObject.py | 19

[edk2] [PATCH v1 11/42] BaseTools: Eot - refactor global data

2018-04-27 Thread Jaben Carsey
remove unused lists, dicts, and duplicate variables Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/Eot/Eot.py | 5 - BaseTools/Source/Python/Eot/EotGlobalData.py | 12

[edk2] [PATCH v1 05/42] BaseTools: AutoGen - refactor assemble_variable

2018-04-27 Thread Jaben Carsey
make this function @staticmethod since self parameter is not used. change valuelist to valuedict since it is a dictionary. Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/AutoGen/GenVar.py | 8

[edk2] [PATCH v1 12/42] BaseTools: AutoGen - remove global line

2018-04-27 Thread Jaben Carsey
this serves no purpose since we dont change the global or assign to it. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/AutoGen/UniClassObject.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/BaseTools/Source/Python/AutoGen

[edk2] [PATCH v1 10/42] BaseTools: Eot - remove unused lists

2018-04-27 Thread Jaben Carsey
Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/Eot/EotGlobalData.py | 29 1 file changed, 29 deletions(-) diff --git a/BaseTools/Source/Python/Eot/EotGlobalData.py b

[edk2] [PATCH v1 06/42] BaseTools: AutoGen - refactor dictionary access

2018-04-27 Thread Jaben Carsey
dont use dict.get() inside loops of dictionary contents. its not needed. Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/AutoGen/GenVar.py | 8 1 file changed, 4 insertions(+), 4 deletions

[edk2] [PATCH v1 09/42] BaseTools: AutoGen - refactor class factory

2018-04-27 Thread Jaben Carsey
since instances are not added to cache, the factory does nothing. Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/AutoGen/BuildEngine.py | 23 1 file changed, 4 insertions

[edk2] [PATCH v1 04/42] BaseTools: this function has no purpose.

2018-04-27 Thread Jaben Carsey
it looks like a old POC of the concepts then used to make the classes in the file. Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/AutoGen/ValidCheckingInfoObject.py | 17 - 1 file

[edk2] [PATCH v1 01/42] BaseTools: FdfParser - update to remove duplicate constant value

2018-04-27 Thread Jaben Carsey
PCD size by type is shared so this change both removes duplication and makes the function work for all numeric PCD types. Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/GenFds/FdfParser.py | 29

[edk2] [PATCH v1 07/42] BaseTools: AutoGen - GenVar refactor static methods

2018-04-27 Thread Jaben Carsey
change methods which do not use self to @staticmethod change their calls to use class name instead of instance Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/AutoGen/GenVar.py | 61

[edk2] [PATCH v1 00/42] BaseTools: refactoring patches

2018-04-27 Thread Jaben Carsey
patch removes lots of trailing whitepsace, without making any other changes. Jaben Carsey (42): BaseTools: FdfParser - update to remove duplicate constant value BaseTools: AutoGen - update to remove duplicate constant value BaseTools: check before accessing members in __eq__ BaseTools: this fun

[edk2] [PATCH v1 02/42] BaseTools: AutoGen - update to remove duplicate constant value

2018-04-27 Thread Jaben Carsey
PCD size by type is shared. just use it. Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/AutoGen/ValidCheckingInfoObject.py | 13 - 1 file changed, 4 insertions(+), 9 deletions

[edk2] [PATCH v1 03/42] BaseTools: check before accessing members in __eq__

2018-04-27 Thread Jaben Carsey
minimize risk for exceptions. Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/AutoGen/ValidCheckingInfoObject.py | 5 + BaseTools/Source/Python/build/build.py | 3 ++- 2

[edk2] [PATCH v2 11/27] BaseTools: Workspace/MetaFileParser - refactor dicts

2018-04-27 Thread Jaben Carsey
Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/Workspace/MetaFileParser.py | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/BaseTools/Source/Python/Workspace/MetaFileParser.py b/BaseTools/Source/Python/Workspace/MetaFileParser.py index 550359f9abb2

[edk2] [PATCH v3 16/27] BaseTools: Replace EDK Component strings with predefined constant

2018-04-27 Thread Jaben Carsey
n own patches. v3 - fix v2 Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/Common/DataType.py| 28 ++-- BaseTools/Source/Python/GenFds/FdfParser.py | 6 ++--- BaseToo

[edk2] [PATCH v2 18/27] BaseTools: Replace PCD type strings with predefined constant

2018-04-26 Thread Jaben Carsey
v2 - fix YongHong's comment. Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/AutoGen/AutoGen.py | 4 +-- BaseTools/Source/Python/AutoGen/GenC.py| 4 +-- Base

[edk2] [PATCH v2 19/27] BaseTools: Replace Binary File type strings with predefined constant

2018-04-26 Thread Jaben Carsey
' BINARY_FILE_TYPE_VER was 'VER' BINARY_FILE_TYPE_UI was 'UI' BINARY_FILE_TYPE_BIN was 'BIN' BINARY_FILE_TYPE_FV was 'FV' v2 - split apart FV and GUID types with different meanings. Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: Tiano

[edk2] [PATCH v2 13/27] BaseTools: replace string constants used for module types

2018-04-26 Thread Jaben Carsey
N' SUP_MODULE_USER_DEFINED was 'USER_DEFINED' SUP_MODULE_SMM_CORE was 'SMM_CORE' SUP_MODULE_MM_STANDALONE was 'MM_STANDALONE' SUP_MODULE_MM_CORE_STANDALONE was 'MM_CORE_STANDALONE' v2 - fix Yonghong's comments. Cc: Liming Gao Cc: Yonghon

[edk2] [PATCH v2 21/27] BaseTools: replace string with predefined constant

2018-04-26 Thread Jaben Carsey
v2 - add missing namespace. Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/Ecc/Check.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BaseTools/Source/Python/Ecc/Check.py b

[edk2] [PATCH v2 16/27] BaseTools: Replace EDK Component strings with predefined constant

2018-04-26 Thread Jaben Carsey
es. Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/Common/DataType.py| 28 ++-- BaseTools/Source/Python/GenFds/FdfParser.py | 6 ++--- BaseTools/Source/Python

Re: [edk2] [Patch] BaseTools: Fix one invalid change in 6be94743

2018-04-26 Thread Carsey, Jaben
Can you also update the comment to match the code please. I think that the comment is wrong and your code is correct, but now they are opposite. The comment says skip (return in context) for no binary files, but the new code will skip for modules with binary files... -Jaben > -Origi

Re: [edk2] [PATCH v1 16/27] BaseTools: Replace EDK Component strings with predefined constant

2018-04-24 Thread Carsey, Jaben
Sure. We could make a new constant that is defined to the same value. Do you want to propose a name? > -Original Message- > From: Zhu, Yonghong > Sent: Tuesday, April 24, 2018 12:42 AM > To: Carsey, Jaben ; edk2-devel@lists.01.org > Cc: Gao, Liming ; Zhu, Yonghong &

Re: [edk2] [PATCH v1 19/27] BaseTools: Replace Binary File type strings with predefined constant

2018-04-24 Thread Carsey, Jaben
> -Original Message- > From: Zhu, Yonghong > Sent: Tuesday, April 24, 2018 12:38 AM > To: Carsey, Jaben ; edk2-devel@lists.01.org > Cc: Gao, Liming ; Zhu, Yonghong > > Subject: RE: [PATCH v1 19/27] BaseTools: Replace Binary File type strings with > predefined constan

[edk2] [PATCH v1 27/27] BaseTools: CommonClass - remove unused classes

2018-04-20 Thread Jaben Carsey
CommonDataClass/CommonClass has only 1 used class: SkuInfoClass remove all unused classes Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/CommonDataClass/CommonClass.py | 397

[edk2] [PATCH v1 13/27] BaseTools: replace string constants used for module types

2018-04-20 Thread Jaben Carsey
N' SUP_MODULE_USER_DEFINED was 'USER_DEFINED' SUP_MODULE_SMM_CORE was 'SMM_CORE' SUP_MODULE_MM_STANDALONE was 'MM_STANDALONE' SUP_MODULE_MM_CORE_STANDALONE was 'MM_CORE_STANDALONE' Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contrib

[edk2] [PATCH v1 17/27] BaseTools: DataType - cleanup list constants

2018-04-20 Thread Jaben Carsey
remove unused ones convert lists used for membership testing to sets use shared ones not local ones Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/AutoGen/AutoGen.py | 32

[edk2] [PATCH v1 15/27] BaseTools: Share a dictionary instead of keeping multiples

2018-04-20 Thread Jaben Carsey
Move a dictionary to a shared location and use from there Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/Common/DataType.py| 15 BaseTools/Source/Python/Workspace

[edk2] [PATCH v1 22/27] BaseTools: remove redundant if comparison

2018-04-20 Thread Jaben Carsey
inherently python will check string and list for None and having data if in [None, ''] and similar are superflous. Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/AutoGen/

[edk2] [PATCH v1 19/27] BaseTools: Replace Binary File type strings with predefined constant

2018-04-20 Thread Jaben Carsey
' BINARY_FILE_TYPE_VER was 'VER' BINARY_FILE_TYPE_UI was 'UI' BINARY_FILE_TYPE_BIN was 'BIN' BINARY_FILE_TYPE_FV was 'FV' Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- Ba

[edk2] [PATCH v1 25/27] BaseTools: AutoGen - use defaultdict to auto initialize

2018-04-20 Thread Jaben Carsey
Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/AutoGen/GenVar.py | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/BaseTools/Source/Python/AutoGen/GenVar.py b/BaseTools

[edk2] [PATCH v1 09/27] BaseTools: AutoGen - remove unused variables.

2018-04-20 Thread Jaben Carsey
Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/AutoGen/GenMake.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/BaseTools/Source/Python/AutoGen/GenMake.py b/BaseTools/Source/Python/AutoGen

[edk2] [PATCH v1 23/27] BaseTools: AutoGen - use dafultdict instead of dict

2018-04-20 Thread Jaben Carsey
since we manually make each entry a set(), just use defaultdict(set) Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/AutoGen/AutoGen.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff

[edk2] [PATCH v1 11/27] BaseTools: Workspace/MetaFileParser - refactor dicts

2018-04-20 Thread Jaben Carsey
make defaultdict to avoid initialize inner items to empty the dict, call clear instead of making a new object Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/Workspace/MetaFileParser.py | 15

[edk2] [PATCH v1 03/27] BaseTools: Share RegEx between files

2018-04-20 Thread Jaben Carsey
Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/Common/Misc.py | 22 +++- BaseTools/Source/Python/GenPatchPcdTable/GenPatchPcdTable.py | 15 + 2

[edk2] [PATCH v1 24/27] BaseTools: GenFds - simplify testing for Hex number

2018-04-20 Thread Jaben Carsey
Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/Common/GlobalData.py | 1 + BaseTools/Source/Python/GenFds/FdfParser.py | 9 + 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a

[edk2] [PATCH v1 16/27] BaseTools: Replace EDK Component strings with predefined constant

2018-04-20 Thread Jaben Carsey
ATABLE_PEIM' EDK_COMPONENT_TYPE_BS_DRIVER was 'BS_DRIVER' EDK_COMPONENT_TYPE_RT_DRIVER was 'RT_DRIVER' EDK_COMPONENT_TYPE_SAL_RT_DRIVER was 'SAL_RT_DRIVER' EDK_COMPONENT_TYPE_APPLICATION was 'APPLICATION' Cc: Liming Gao Cc: Yonghong Zhu Contributed-unde

[edk2] [PATCH v1 21/27] BaseTools: replace string with predefined constant

2018-04-20 Thread Jaben Carsey
Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/Ecc/Check.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BaseTools/Source/Python/Ecc/Check.py b/BaseTools/Source/Python/Ecc

[edk2] [PATCH v1 14/27] BaseTools: Define and use a set for common list

2018-04-20 Thread Jaben Carsey
share a set for both PEI module types Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/AutoGen/AutoGen.py | 4 ++-- BaseTools/Source/Python/AutoGen/GenC.py| 8 BaseTools/Source/Python

[edk2] [PATCH v1 26/27] BaseTools: remove unused MigrationUtilities.py

2018-04-20 Thread Jaben Carsey
Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/Common/MigrationUtilities.py | 568 BaseTools/Source/Python/Makefile | 1 - 2 files changed, 569 deletions

[edk2] [PATCH v1 12/27] BaseTools: remove dict from DscBuildData

2018-04-20 Thread Jaben Carsey
the dict is not needed as BaseTools can check the set Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/Workspace/DscBuildData.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git

[edk2] [PATCH v1 20/27] BaseTools: remove duplicate variable

2018-04-20 Thread Jaben Carsey
Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/Common/DataType.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/BaseTools/Source/Python/Common/DataType.py b/BaseTools/Source/Python/Common

[edk2] [PATCH v1 18/27] BaseTools: Replace PCD type strings with predefined constant

2018-04-20 Thread Jaben Carsey
Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/AutoGen/AutoGen.py | 4 +-- BaseTools/Source/Python/AutoGen/GenC.py| 4 +-- BaseTools/Source/Python/AutoGen/GenPcdDb.py

[edk2] [PATCH v1 07/27] BaseTools: Workspace - refactor GetStructurePcdInfo

2018-04-20 Thread Jaben Carsey
the function doesn't use self and can be static defaultdict replaces dict and removes the dict initialization code Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/Workspace/DscBuildData.py

[edk2] [PATCH v1 10/27] BaseTools: Remove extra .keys()

2018-04-20 Thread Jaben Carsey
Cc: Yonghong Zhu Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/GenFds/Fv.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BaseTools/Source/Python/GenFds/Fv.py b/BaseTools/Source/Python

[edk2] [PATCH v1 08/27] BaseTools: AutoGen - remove dictionary populated, but never accessed

2018-04-20 Thread Jaben Carsey
Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/AutoGen/GenPcdDb.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/BaseTools/Source/Python/AutoGen/GenPcdDb.py b/BaseTools/Source/Python

[edk2] [PATCH v1 02/27] BaseTools: GenPatchPcdTable - refactor RegEx to minimize multiple compiling

2018-04-20 Thread Jaben Carsey
Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/GenPatchPcdTable/GenPatchPcdTable.py | 24 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/BaseTools/Source

[edk2] [PATCH v1 06/27] BaseTools: simplify if call

2018-04-20 Thread Jaben Carsey
the variable is a string type since we just used .strip() on it. Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/Common/Expression.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[edk2] [PATCH v1 00/27] BaseTools refactoring

2018-04-20 Thread Jaben Carsey
ch 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 - refac

[edk2] [PATCH v1 01/27] BaseTools: Misc - refactor RegEx to minimize multiple compiling

2018-04-20 Thread Jaben Carsey
Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/Common/Misc.py | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/BaseTools/Source/Python/Common/Misc.py b

[edk2] [PATCH v1 05/27] BaseTools: Autogen - replace string constants with those from DataType

2018-04-20 Thread Jaben Carsey
Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/AutoGen/AutoGen.py | 68 ++-- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/BaseTools/Source/Python/AutoGen

[edk2] [PATCH v1 04/27] BaseTools: Workspace - refactor RegEx to minimize multiple compiling

2018-04-20 Thread Jaben Carsey
Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/Workspace/DscBuildData.py | 4 +++- BaseTools/Source/Python/Workspace/MetaFileParser.py | 8 ++-- 2 files changed, 9 insertions(+), 3 deletions

[edk2] [PATCH v2 1/1] BaseTools: remove EdkIIWorkspace as its not used.

2018-04-19 Thread Jaben Carsey
v2 - update makefile too. Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/Common/EdkIIWorkspace.py | 317 BaseTools/Source/Python/Makefile | 1 - 2 files

[edk2] [PATCH v2 1/1] BaseTools: remove PlatformClass as it's not used

2018-04-19 Thread Jaben Carsey
v2 - update makefile too. Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/CommonDataClass/PlatformClass.py | 456 BaseTools/Source/Python/Makefile

[edk2] [PATCH v1 1/1] BaseTools: remove EdkIIWorkspace as its not used.

2018-04-18 Thread Jaben Carsey
Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/Common/EdkIIWorkspace.py | 317 1 file changed, 317 deletions(-) diff --git a/BaseTools/Source/Python/Common/EdkIIWorkspace.py

[edk2] [PATCH v1 1/1] BaseTools: remove PlatformClass as it's not used

2018-04-18 Thread Jaben Carsey
Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/CommonDataClass/PlatformClass.py | 456 1 file changed, 456 deletions(-) diff --git a/BaseTools/Source/Python/CommonDataClass

[edk2] [PATCH v2 1/3] BaseTools: refactor and remove more keys() usage

2018-04-18 Thread Jaben Carsey
this is no longer required to make dictionary objects iterable. v2 - add back a missing "C" PcdName -> PcdCName Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/Workspace/DscBuil

[edk2] [PATCH v2 2/2] BaseTools: replace 'UINT8', 'UINT16', 'UINT32', 'UINT64', 'VOID*' with shared constants.

2018-04-17 Thread Jaben Carsey
From: Jaben v2 fixes yonghongs comment. Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/AutoGen/AutoGen.py | 26 +++--- BaseTools/Source/Python/AutoGen/GenC.py

[edk2] [PATCH v3 2/2] BaseTools: refactor and remove un-needed use of .keys() on dictionaries

2018-04-17 Thread Jaben Carsey
From: Jaben sometimes just delete it. sometimes the loop needed .values() instead v2 was my error v3 fix error per Yonghong's review. Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/Au

[edk2] [PATCH v2 2/2] BaseTools: refactor and remove un-needed use of .keys() on dictionaries

2018-04-17 Thread Jaben Carsey
From: Jaben sometimes just delete it. sometimes the loop needed .values() instead v2 - revert one change yer Yonghong's review. Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/AutoGen/AutoG

[edk2] [PATCH v1 1/1] BaseTools: Eot - Remove FvImage file

2018-04-16 Thread Jaben Carsey
move the single used class from FvImage to Eot delete the FvImage file remove FvImage from makefile Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/Eot/Eot.py | 26 +- BaseTools/Source/Python

[edk2] [PATCH v2 2/3] BaseTools: use predefined constants instead of local strings

2018-04-16 Thread Jaben Carsey
fixed an incorrect import found in Yonghong's review. Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/AutoGen/AutoGen.py | 24 +-- BaseTools/Source/Python/AutoGen/BuildEngi

[edk2] [PATCH v1 7/9] BaseTools: FdfParser refactor to remove a dictionary

2018-04-13 Thread Jaben Carsey
From: Jaben __GetInfStatement() does not use the dict parameter, so remove it from the API and from all callers. Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/GenFds/FdfParser.py | 9

[edk2] [PATCH v1 5/9] BaseTools: use dictionary.get() when we have value if not found

2018-04-13 Thread Jaben Carsey
From: Jaben Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/build/build.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/BaseTools/Source/Python/build/build.py b

[edk2] [PATCH v1 6/9] BaseTools: refactor DepexSection.GenSection

2018-04-13 Thread Jaben Carsey
From: Jaben change default parameter value to None since the parameter isn't used. remove temporary dictionary and just do the reaplce call. Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/G

[edk2] [PATCH v1 3/9] BaseTools: Remove unused functions from DscBuildData

2018-04-13 Thread Jaben Carsey
From: Jaben 3 functions were never called: _dumpPcdInfo __STRING2OCTList __UNICODE2OCTList Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/Workspace/DscBuildData.py | 31 1

[edk2] [PATCH v1 8/9] BaseTools: FdfParser - refactor functions to make static

2018-04-13 Thread Jaben Carsey
From: Jaben make functions that doesn't use self into @staticmethod Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/GenFds/FdfParser.py | 11 ++- BaseTools/Source/Python/G

<    1   2   3   4   5   6   7   8   9   10   >