[edk2] [PATCH v1 1/1] BaseTools: AutoGen.py remove unused import

2018-08-27 Thread Jaben Carsey
AutoGen does not use anything defined in BuildClassObject Cc: Yonghong Zhu Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/AutoGen/AutoGen.py | 1 - 1 file changed, 1 deletion(-) diff --git a/BaseTools/Source

[edk2] [PATCH v1 1/1] BaseTools: AutoGen - change class variable to funciton variable

2018-07-19 Thread Jaben Carsey
This variable is only used in one function, make it local there. Also when iterating on the variable, use dict.items() to get value instead of re-looking up the value multiple times. Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben

[edk2] [PATCH v1 1/1] BaseTools: Clarify a DSC parsing error about PCDs

2018-08-29 Thread Jaben Carsey
This error needs the information about which DEC files were searched. Cc: Yonghong Zhu Cc: Liming Gao Cc: Lee Hamel Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/Workspace/DscBuildData.py | 2 +- 1 file changed, 1 insertion

[edk2] [PATCH v1 4/9] BaseTools: refactor class properties

2018-08-29 Thread Jaben Carsey
use decorators and auto cache those that were cached manually remove properties never used Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/Common/Misc.py | 90 +--- 1 file changed

[edk2] [PATCH v1 6/9] BaseTools: refactor Build Database objects

2018-08-29 Thread Jaben Carsey
1) use namedtuple instead of custom class when apropriate 2) rename collections.OrderedDict to OrderedDict since we import it already Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/Workspace

[edk2] [PATCH v1 9/9] BaseTools: refactor to cache InfBuildData data

2018-08-29 Thread Jaben Carsey
use Common.caching and auto cache properties and functions of InfBuildData Cc: Liming Gao Cc: Yonghong Zhu Cc: Bob Feng Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/Workspace/InfBuildData.py | 842 +--- 1 file

[edk2] [PATCH v1 5/9] BaseTools: Workspace classes refactor properties

2018-08-29 Thread Jaben Carsey
1) use decorators 2) also change some private functions to public when all callers are external 3) change external callers to use functions instead of directly accessing private data. Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben

[edk2] [PATCH v1 3/9] BaseTools: AutoGen - refactor class properties

2018-08-29 Thread Jaben Carsey
use function decorators Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/AutoGen/GenMake.py | 20 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/BaseTools/Source

[edk2] [PATCH v1 7/9] BaseTools: Don't save unused workspace data

2018-08-29 Thread Jaben Carsey
FlexibleFieldName was never used not set. DefinitionPosition (file and line number) are recalculated and never used outside the function. remove the saving of the data. Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey

[edk2] [PATCH v1 0/9] BaseTools: refactor Workspace classes

2018-08-29 Thread Jaben Carsey
callers from accessing "private" data and use the existing properties 6) removed a circular dependency between APIs Jaben Carsey (9): BaseTools: Refactor PlatformAutoGen BaseTools: AutoGen refactor WorkspaceAutoGen class BaseTools: AutoGen - refactor class properties BaseTools

[edk2] [PATCH v1 1/9] BaseTools: Refactor PlatformAutoGen

2018-08-29 Thread Jaben Carsey
use decorators for property and automatic caching remove circular dependency between some APIs Cc: Liming Gao Cc: Yonghong Zhu Cc: Bob Feng Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/AutoGen/AutoGen.py | 587

[edk2] [PATCH v1 2/9] BaseTools: AutoGen refactor WorkspaceAutoGen class

2018-08-29 Thread Jaben Carsey
Update the WorkspaceAutoGen class to use caching decorators and remove the no longer needed private variables. Cc: Liming Gao Cc: Yonghong Zhu Cc: Bob Feng Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/AutoGen/AutoGen.py | 69

[edk2] [PATCH v1 8/9] BaseTools: refactor to not overcreate ModuleAutoGen objects

2018-08-29 Thread Jaben Carsey
currently created for 3 different purposes and saved once. this makes it created once and saved and then referenced. Cc: Liming Gao Cc: Yonghong Zhu Cc: Bob Feng Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/AutoGen/AutoGen.py

[edk2] [PATCH v1 1/1] BaseTools: Refactor to remove functionally equivalent functions

2018-08-29 Thread Jaben Carsey
IsSupportedArch and IsBinaryModule return the same value under the same curcimstances. Remove newer one with fewer callers and send them to the other function. Cc: Yonghong Zhu Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools

[edk2] [PATCH v1 1/1] BaseTools: refactor to remove duplicate functions

2018-09-05 Thread Jaben Carsey
Update GenFdsGlobalVariable GetAlignment to support G. replace use of local function in Region with updated shared function. Cc: Yonghong Zhu Cc: Liming Gao Cc: Bob C Feng Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/GenFds

[edk2] [PATCH v1 1/1] BaseTools/GenFds: remove function without callers

2018-09-05 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/GenFdsGlobalVariable.py | 17 - 1 file changed, 17 deletions(-) diff --git a/BaseTools/Source/Python/GenFds

[edk2] [PATCH v1 1/1] BaseTools/GenFds: delete unused file

2018-09-05 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/Attribute.py | 28 1 file changed, 28 deletions(-) diff --git a/BaseTools/Source/Python/GenFds/Attribute.py b/BaseTools

[edk2] [PATCH v1 1/1] BaseTools/GenFds: Verify binaries all the time

2018-09-06 Thread Jaben Carsey
Currently, Basetools only verifies Binary file list existance for default ARCH, but it should verify for a specified ARCH the same. Also, dont save the list to a unused variable. Cc: Yonghong Zhu Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey

[edk2] [PATCH v2 2/9] BaseTools: AutoGen refactor WorkspaceAutoGen class

2018-09-10 Thread Jaben Carsey
Update the WorkspaceAutoGen class to use caching decorators and remove the no longer needed private variables. Cc: Liming Gao Cc: Yonghong Zhu Cc: Bob Feng Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/AutoGen/AutoGen.py | 69

[edk2] [PATCH v2 0/9] BaseTools: refactor Workspace classes

2018-09-10 Thread Jaben Carsey
callers from accessing "private" data and use the existing properties 6) removed a circular dependency between APIs v2: fix error where class attribute M was accidentally removed. Jaben Carsey (9): BaseTools: Refactor PlatformAutoGen BaseTools: AutoGen refactor WorkspaceAut

[edk2] [PATCH v2 5/9] BaseTools: Workspace classes refactor properties

2018-09-10 Thread Jaben Carsey
1) use decorators 2) also change some private functions to public when all callers are external 3) change external callers to use functions instead of directly accessing private data. Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben

[edk2] [PATCH v2 4/9] BaseTools: refactor class properties

2018-09-10 Thread Jaben Carsey
use decorators and auto cache those that were cached manually remove properties never used Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/Common/Misc.py | 90 +--- 1 file changed

[edk2] [PATCH v2 9/9] BaseTools: refactor to cache InfBuildData data

2018-09-10 Thread Jaben Carsey
use Common.caching and auto cache properties and functions of InfBuildData Cc: Liming Gao Cc: Yonghong Zhu Cc: Bob Feng Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/Workspace/InfBuildData.py | 840 +--- 1 file

[edk2] [PATCH v2 3/9] BaseTools: AutoGen - refactor class properties

2018-09-10 Thread Jaben Carsey
use function decorators Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/AutoGen/GenMake.py | 20 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/BaseTools/Source

[edk2] [PATCH v2 1/9] BaseTools: Refactor PlatformAutoGen

2018-09-10 Thread Jaben Carsey
use decorators for property and automatic caching remove circular dependency between some APIs Cc: Liming Gao Cc: Yonghong Zhu Cc: Bob Feng Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/AutoGen/AutoGen.py | 587

[edk2] [PATCH v2 8/9] BaseTools: refactor to not overcreate ModuleAutoGen objects

2018-09-10 Thread Jaben Carsey
currently created for 3 different purposes and saved once. this makes it created once and saved and then referenced. Cc: Liming Gao Cc: Yonghong Zhu Cc: Bob Feng Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/AutoGen/AutoGen.py

[edk2] [PATCH v2 7/9] BaseTools: Don't save unused workspace data

2018-09-10 Thread Jaben Carsey
FlexibleFieldName was never used not set. DefinitionPosition (file and line number) are recalculated and never used outside the function. remove the saving of the data. Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey

[edk2] [PATCH v2 6/9] BaseTools: refactor Build Database objects

2018-09-10 Thread Jaben Carsey
1) use namedtuple instead of custom class when apropriate 2) rename collections.OrderedDict to OrderedDict since we import it already Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/Workspace

[edk2] [PATCH v1 1/1] BaseTools\GenFds: remove extra content

2018-09-10 Thread Jaben Carsey
remove uncalled functions remove extra blank lines remove commented out code Cc: Yonghong Zhu Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/GenFds/FdfParser.py | 56 1 file changed, 56

[edk2] [PATCH v1 1/1] BaseTools: GlobalData remove unused variable

2018-03-07 Thread Jaben Carsey
gWideStringPattern is not used. Cc: Yonghong Zhu <yonghong@intel.com> Cc: Liming Gao <liming@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Source/Python/Common/GlobalData.py | 3 +--

[edk2] [PATCH v1 0/1] BaseTools: remove unused variable

2018-03-07 Thread Jaben Carsey
delete a variable never uised and the comment Cc: Yonghong Zhu <yonghong@intel.com> Cc: Liming Gao <liming@intel.com> Jaben Carsey (1): BaseTools: GlobalData remove unused variable BaseTools/Source/Python/Common/GlobalData.py | 3 +-- 1 file changed, 1 insertion(+),

[edk2] [PATCH v1 1/1] BaseTools: UPT: remove unused variable and inaccessible code.

2018-03-12 Thread Jaben Carsey
gINCLUDE_PATTERN is never used. IncList is always empty. Cc: Yonghong Zhu <yonghong@intel.com> Cc: Liming Gao <liming@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Source/

[edk2] [PATCH v1 4/5] BaseTools: Expression - remove variable

2018-03-13 Thread Jaben Carsey
The InArary variable serves no purpose. just do the work immediately. Cc: Yonghong Zhu <yonghong@intel.com> Cc: Liming Gao <liming@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/So

[edk2] [PATCH v1 1/5] BaseTools: Expression - remove redundant variable

2018-03-13 Thread Jaben Carsey
Str is created and not needed. Cc: Yonghong Zhu <yonghong@intel.com> Cc: Liming Gao <liming@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Source/Python/Common/Expression.py | 10

[edk2] [PATCH v1 2/5] BaseTools: Expression refactor function

2018-03-13 Thread Jaben Carsey
The function is about C Names, not C Strings. Move the re.compile outside the function call Cc: Yonghong Zhu <yonghong@intel.com> Cc: Liming Gao <liming@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com&

[edk2] [PATCH v1 0/5] BaseTools - some simple cleanups for BaseTools

2018-03-13 Thread Jaben Carsey
cleanup up some BaseTools code for simplicity. Jaben Carsey (5): BaseTools: Expression - remove redundant variable BaseTools: Expression refactor function BaseTools: Expression - change from series of if to elif BaseTools: Expression - remove variable BaseTools: RangeExpression - remove

[edk2] [PATCH v1 5/5] BaseTools: RangeExpression - remove unused variable

2018-03-13 Thread Jaben Carsey
remove a never used variable. Cc: Yonghong Zhu <yonghong@intel.com> Cc: Liming Gao <liming@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Source/Python/Common/RangeExpression.py | 9

[edk2] [PATCH v1 1/5] BaseTools: StrGather has redundant declaration

2018-03-15 Thread Jaben Carsey
remove COMPATIBLE_STRING_TOKEN as it is the same as STRING_TOKEN remove if statement that used one or the other (identical) re Cc: Yonghong Zhu <yonghong@intel.com> Cc: Liming Gao <liming@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by:

[edk2] [PATCH v1 4/5] BaseTools: FdfParser & FdfParserLite refactor regular expression for GUIDs

2018-03-15 Thread Jaben Carsey
Instead of recompiling it each time the API is called, just use the global one that exists. Cc: Yonghong Zhu <yonghong@intel.com> Cc: Liming Gao <liming@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com&

[edk2] [PATCH v1 0/5] BaseTools: improve reuse and remove dead code

2018-03-15 Thread Jaben Carsey
remove class and function definitions that are never used re-use existing regular expressions instead of compiling use string format instead of eval() Jaben Carsey (5): BaseTools: StrGather has redundant declaration BaseTools: StrGather simplify string/int conversion functions BaseTools

[edk2] [PATCH v1 2/5] BaseTools: StrGather simplify string/int conversion functions

2018-03-15 Thread Jaben Carsey
use ''.format instead of eval() and use some list comprehension for making list delete some unused variables Cc: Yonghong Zhu <yonghong@intel.com> Cc: Liming Gao <liming@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.c

[edk2] [PATCH v1 5/5] BaseTools: FdfParser remove class never used.

2018-03-15 Thread Jaben Carsey
the MacroProfile class is never instantiated nor referenced. Cc: Yonghong Zhu <yonghong@intel.com> Cc: Liming Gao <liming@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/So

[edk2] [PATCH v1 3/5] BaseTools: StrGather remove functions no one calls

2018-03-15 Thread Jaben Carsey
simplify the code and remove functions not called anymore Cc: Yonghong Zhu <yonghong@intel.com> Cc: Liming Gao <liming@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Source/Python/Au

[edk2] [PATCH v1 2/2] BaseTools: AutoGen should use is None not == None

2018-03-14 Thread Jaben Carsey
change to the style we document as in use Cc: Yonghong Zhu <yonghong@intel.com> Cc: Liming Gao <liming@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Source/Python/AutoGe

[edk2] [PATCH v1 1/2] BaseTools: Autogen - modify to use standard parent/child class relationships

2018-03-14 Thread Jaben Carsey
use __new__ and __init__ to create/manage/initialize objects in standard flow. Cc: Yonghong Zhu <yonghong@intel.com> Cc: Liming Gao <liming@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseT

[edk2] [PATCH v1 0/2] BaseTools: AutoGen code style compliance

2018-03-14 Thread Jaben Carsey
update the object factory and child classes to use standard functions update the file to use is None instead of == None Jaben Carsey (2): BaseTools: Autogen - modify to use standard parent/child class relationships BaseTools: AutoGen should use is None not == None BaseTools/Source

[edk2] [PATCH v1 05/14] BaseTools: replace a dict with a set

2018-04-05 Thread Jaben Carsey
As we never use the values, just keep the keys in a set. Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Source/Python/Auto

[edk2] [PATCH v1 12/14] BaseTools: change more list to set

2018-04-05 Thread Jaben Carsey
potentially accelerate "in" testing remove uncalled function Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Sour

[edk2] [PATCH v1 14/14] BaseTools: refactor and remove out of date use of .keys()

2018-04-05 Thread Jaben Carsey
this is no longer required to make dictionary objects iterable. Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> ---

[edk2] [PATCH v1 11/14] BaseTools: remove unneeded function call

2018-04-05 Thread Jaben Carsey
Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Source/Python/AutoGen/AutoGen.py | 1 - 1 file changed, 1 deletion(-) diff

[edk2] [PATCH v1 06/14] BaseTools: remove unused variables

2018-04-05 Thread Jaben Carsey
some were populated, but never used after. some were never used. Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Sou

[edk2] [PATCH v1 04/14] BaseTools: sets are faster to check via "in" due to hashing

2018-04-05 Thread Jaben Carsey
ribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Source/Python/AutoGen/AutoGen.py | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/A

[edk2] [PATCH v1 07/14] BaseTools: change list to set

2018-04-05 Thread Jaben Carsey
Order is irelevant duplication is auto-prevented Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Source/Python/AutoG

[edk2] [PATCH v1 10/14] BaseTools: change another list to set

2018-04-05 Thread Jaben Carsey
potentially accelerate "in" testing which is the use for this variable Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- Bas

[edk2] [PATCH v1 02/14] BaseTools: remove uncalled functions

2018-04-05 Thread Jaben Carsey
Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Source/Python/Common/TargetTxtClassObject.py | 27

[edk2] [PATCH v1 03/14] BaseTools: defaultdict(set) allows us to just add to the set

2018-04-05 Thread Jaben Carsey
New sets will get created automatically when needed Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Source/Python/AutoG

[edk2] [PATCH v1 01/14] BaseTools: remove unused file

2018-04-05 Thread Jaben Carsey
ToolsDefClassObject didnt need Dictionary, it needed an import from there. Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseT

[edk2] [PATCH v1 08/14] BaseTools: simplify testing for existance and containing data

2018-04-05 Thread Jaben Carsey
and remove a duplicate "if" block from 6 lines up. Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Source/Py

[edk2] [PATCH v1 13/14] BaseTools: GenC - move content from both parts of if/else

2018-04-05 Thread Jaben Carsey
move identical lines out of both if and else and move 1 level up. Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Sou

[edk2] [PATCH v1 00/14] BaseTools: refactoring the code for readability and simplicity

2018-04-05 Thread Jaben Carsey
group of changes to make code smaller and reduce overhead. Jaben Carsey (14): BaseTools: remove unused file BaseTools: remove uncalled functions BaseTools: defaultdict(set) allows us to just add to the set BaseTools: sets are faster to check via "in" due to hashing BaseTool

[edk2] [PATCH v1 09/14] BaseTools: optimize buildoptions loop

2018-04-05 Thread Jaben Carsey
reement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Source/Python/AutoGen/AutoGen.py | 21 ++-- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py inde

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

2018-04-10 Thread Jaben Carsey
Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Source/Python/AutoGen/AutoGen.py | 24 +-- BaseTools/Sou

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

2018-04-10 Thread Jaben Carsey
this is no longer required to make dictionary objects iterable. Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Sourc

[edk2] [PATCH v1 3/3] BaseTools: use existing contrants to replace raw strings in python code.

2018-04-10 Thread Jaben Carsey
Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Source/Python/AutoGen/GenC.py | 13 +++-- BaseTools/Sou

[edk2] [PATCH v1 0/3] BaseTools: refactor to remove redundant

2018-04-10 Thread Jaben Carsey
Replace raw strings used in lots of places with predefined constants. remove more out of date keys() usage. Jaben Carsey (3): BaseTools: refactor and remove more keys() usage BaseTools: use predefined constants instead of local strings BaseTools: use existing contrants to replace raw

[edk2] [PATCH v1 4/5] BaseTools: use set instead of list for a variable to be used with in

2018-04-10 Thread Jaben Carsey
Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Source/Python/AutoGen/AutoGen.py | 7 ++- 1 file changed, 2 insertio

[edk2] [PATCH v1 2/5] BaseTools: no need to save the data

2018-04-10 Thread Jaben Carsey
It's never accessed. Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Source/Python/AutoGen/AutoGen.py | 7 +++

[edk2] [PATCH v1 0/5] BaseTools: remove or change un-needed variables

2018-04-10 Thread Jaben Carsey
use sets instead of lists when doing only "in" testing later use counts instead of lists when they just get counted after Jaben Carsey (5): BaseTools: use existing shared variable BaseTools: no need to save the data BaseTools: skip updating temporary variable. BaseTools: use s

[edk2] [PATCH v1 1/5] BaseTools: use existing shared variable

2018-04-10 Thread Jaben Carsey
Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Source/Python/AutoGen/GenVar.py | 15 BaseTools/Source/Pyt

[edk2] [PATCH v1 3/5] BaseTools: skip updating temporary variable.

2018-04-10 Thread Jaben Carsey
Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Source/Python/AutoGen/AutoGen.py | 12 +++- 1 file changed,

[edk2] [PATCH v1 5/5] BaseTools: reduce list usage when not needed

2018-04-10 Thread Jaben Carsey
remove not needed lists. some were just counted and others should be sets. Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseT

[edk2] [PATCH v1 1/1] BaseTools: dont make temporary dict

2018-04-05 Thread Jaben Carsey
just make the key list directly Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Source/Python/Common/Misc.py | 6 +++---

[edk2] [PATCH v1 2/2] BaseTools: Remove unneeded files

2018-04-04 Thread Jaben Carsey
ng Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Source/Python/Common/DecClassObject.py | 553 BaseTools/Source/Python/Common/DscClassObject.py | 1434 BaseT

[edk2] [PATCH v1 0/2] BaseTools: remove files not needed

2018-04-04 Thread Jaben Carsey
Delete 4 files that we dont need (first copying the one dictionary we do need) Jaben Carsey (2): BaseTools: copy a dictionary from InfClassObject to BuildReport BaseTools: Remove unneeded files BaseTools/Source/Python/Common/DecClassObject.py | 553 BaseTools/Source/Python/Common

[edk2] [PATCH v1 9/9] BaseTools: FfsInfStatement - remove unused function

2018-04-13 Thread Jaben Carsey
From: Jaben <jaben.car...@intel.com> Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Source/Python/GenFds

[edk2] [PATCH v1 1/9] BaseTools: remove unused local variable.

2018-04-13 Thread Jaben Carsey
From: Jaben <jaben.car...@intel.com> Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Source/Python/Workspace/DscBui

[edk2] [PATCH v1 0/9] BaseTools: refactoring

2018-04-13 Thread Jaben Carsey
group of patches for refactoring BaseTools. removing unused functions, variables, and parameters. make functions statis where apropriate. Jaben (9): BaseTools: remove unused local variable. BaseTools: change DscBuildData functions without need for self to staticmethod BaseTools:

[edk2] [PATCH v1 2/9] BaseTools: change DscBuildData functions without need for self to staticmethod

2018-04-13 Thread Jaben Carsey
From: Jaben <jaben.car...@intel.com> prepend functiosn with @staticmethod change calls to use class name, not self Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben

[edk2] [PATCH v1 4/9] BaseTools: move RegEx compile out of loops

2018-04-13 Thread Jaben Carsey
From: Jaben <jaben.car...@intel.com> Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Source/Python/Worksp

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

2018-04-13 Thread Jaben Carsey
From: Jaben <jaben.car...@intel.com> make functions that doesn't use self into @staticmethod Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@inte

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

2018-04-13 Thread Jaben Carsey
From: Jaben <jaben.car...@intel.com> __GetInfStatement() does not use the dict parameter, so remove it from the API and from all callers. Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Si

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

2018-04-13 Thread Jaben Carsey
From: Jaben <jaben.car...@intel.com> Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Source/Python/build/build.py | 4

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

2018-04-13 Thread Jaben Carsey
oCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Source/Python/GenFds/DepexSection.py | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/BaseTools/Source/Python/GenFds/DepexSection.py b/BaseTools/Source/Python/GenF

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

2018-04-13 Thread Jaben Carsey
From: Jaben <jaben.car...@intel.com> 3 functions were never called: _dumpPcdInfo __STRING2OCTList __UNICODE2OCTList Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben

[edk2] [PATCH v1 2/3] BaseTools: Autogen - change from list to set

2018-04-04 Thread Jaben Carsey
1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Source/Python/AutoGen/AutoGen.py | 36 1 file changed, 15 insertions(+), 21 deletions(-) diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py

[edk2] [PATCH v1 0/3] BaseTools: refactor and cleanup

2018-04-04 Thread Jaben Carsey
no real functional change. just code cleanup. Jaben Carsey (3): BaseTools: move RegEx to root of file and share it BaseTools: Autogen - change from list to set BaseTools: small cleanup BaseTools/Source/Python/AutoGen/AutoGen.py| 51 ++-- BaseTools/Source/Python

[edk2] [PATCH v1 3/3] BaseTools: small cleanup

2018-04-04 Thread Jaben Carsey
just deleting else: then pass as they have no effect. Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Source/Python/AutoG

[edk2] [PATCH v1 1/3] BaseTools: move RegEx to root of file and share it

2018-04-04 Thread Jaben Carsey
make it easy to import and use by others Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Source/Python/Common/Expr

[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 <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by

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

2018-04-17 Thread Jaben Carsey
From: Jaben <jaben.car...@intel.com> v2 fixes yonghongs comment. Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseToo

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

2018-04-17 Thread Jaben Carsey
reement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Source/Python/AutoGen/AutoGen.py | 32 +- BaseTools/Source/Python/AutoGen/GenMake.py | 24 BaseTools/Source/Python/AutoGen/GenVar.py | 2 +- BaseToo

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

2018-04-18 Thread Jaben Carsey
Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Source/Python/CommonDataClass/PlatformClass.py | 456 --

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

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

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

2018-04-20 Thread Jaben Carsey
Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Source/Python/Common/Misc.py | 16 +++- 1 file changed, 1

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

2018-04-20 Thread Jaben Carsey
Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Source/Python/GenPatchPcdTable/GenPatchPcdTable.py | 24 --

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

2018-04-20 Thread Jaben Carsey
Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Source/Python/AutoGen/AutoGen.py | 68 ++-- 1 file chan

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

2018-04-20 Thread Jaben Carsey
Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Source/Python/Workspace/DscBuildData.py | 4 +++- BaseTools/Sourc

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

2018-04-20 Thread Jaben Carsey
Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Source/Python/AutoGen/AutoGen.py | 4 +-- BaseTools/Source/Pyth

[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 <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Source/Python/Workspa

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

2018-04-20 Thread Jaben Carsey
Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Source/Python/Common/DataType.py | 2 -- 1 file changed, 2 deleti

<    1   2   3   4   >