delete the shared global variable from Common.Misc
delete the uncalled users of the variable from build.build
Cc: Bob Feng
Cc: Liming Gao
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey
---
BaseTools/Source/Python/Common/Misc.py | 3 -
BaseTools/Source
no use for this code content.
Cc: Bob Feng
Cc: Liming Gao
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey
---
BaseTools/Source/Python/Common/Misc.py | 46
1 file changed, 46 deletions(-)
diff --git a/BaseTools/Source/Python/Common
move functions and remove unused content from common.misc
Cc: Bob Feng
Cc: Liming Gao
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey
Jaben Carsey (4):
BaseTools/Common/Misc: move private functions
BaseTools/Common/Misc: remove uncalled code
BaseTools
These 2 functions are only used internally. move them to the smallest
scope and use them.
Cc: Bob Feng
Cc: Liming Gao
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey
---
BaseTools/Source/Python/Common/Misc.py | 92 ++--
1 file changed, 46
Refactor to 'dict' from 'IterableUserDict' which was only required for old
python interpreter.
Sort imports according to PEP8
Remove those we dont need.
Cc: Bob Feng
Cc: Liming Gao
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey
---
BaseTools/Source
Agreement 1.1
Signed-off-by: Jaben Carsey
---
BaseTools/Source/Python/Common/Misc.py| 6 --
BaseTools/Source/Python/GenFds/Capsule.py | 4 ++--
2 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/BaseTools/Source/Python/Common/Misc.py
b/BaseTools/Source/Python/Common/Misc.py
Move SplitOption and ConvertStringToByteArray from Common.Misc to this file.
There were no other consumers of the functions.
Cc: Bob Feng
Cc: Liming Gao
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey
---
BaseTools/Source/Python/AutoGen/AutoGen.py | 77
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=42
Many shared functions are not used by more than one consumer.
Move them local to consumer until the use arises for sharing.
Cc: Bob Feng
Cc: Liming Gao
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey
Move IsFieldValuieAnArray from Common.Misc to this file.
There were no other consumers of the function.
Cc: Bob Feng
Cc: Liming Gao
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey
---
BaseTools/Source/Python/Common/Misc.py| 18 +--
BaseTools
Move DataDump and DataRestore from Common.Misc to this file.
There were no other consumers of these 2 functions.
Import threading since that module is used in build.
Cc: Bob Feng
Cc: Liming Gao
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey
---
BaseTools
Move ProtocolValue and PpiValue from Common.Misc to this file.
There were no other consumers of these 2 functions.
Cc: Bob Feng
Cc: Liming Gao
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey
---
BaseTools/Source/Python/Common/Misc.py| 38
Move IsFieldValuieAnArray from Common.Misc to this file.
There were no other consumers of the function.
Cc: Bob Feng
Cc: Liming Gao
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey
---
BaseTools/Source/Python/Common/Misc.py| 18 +--
BaseTools
Move PackRegistryFormatGuid logic from Common.Misc to this file.
There were no other consumers of the function.
As it is one line, just replace the logic without the separate function.
Cc: Bob Feng
Cc: Liming Gao
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben
Move SplitOption and ConvertStringToByteArray from Common.Misc to this file.
There were no other consumers of the functions.
Cc: Bob Feng
Cc: Liming Gao
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey
---
BaseTools/Source/Python/AutoGen/AutoGen.py | 77
Move ProtocolValue and PpiValue from Common.Misc to this file.
There were no other consumers of these 2 functions.
Cc: Bob Feng
Cc: Liming Gao
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey
---
BaseTools/Source/Python/Common/Misc.py| 38
Move DataDump and DataRestore from Common.Misc to this file.
There were no other consumers of these 2 functions.
Import threading since that module is used in build.
Cc: Bob Feng
Cc: Liming Gao
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey
---
BaseTools
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=42
Many shared functions are not used by more than one consumer.
Move them local to consumer until the use arises for sharing.
Cc: Bob Feng
Cc: Liming Gao
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey
=42
Cc: Bob Feng
Cc: Liming Gao
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey
---
BaseTools/Source/Python/AutoGen/AutoGen.py | 6 ++
BaseTools/Source/Python/AutoGen/GenC.py | 2 +-
BaseTools/Source/Python
=42
Cc: Bob Feng
Cc: Liming Gao
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey
---
BaseTools/Source/Python/AutoGen/AutoGen.py | 6 ++
BaseTools/Source/Python/AutoGen/GenC.py | 2 +-
BaseTools/Source/Python
The comments are incorrect for the base version of this lib.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey
Cc: Star Zeng
Cc: Jian J Wang
---
MdeModulePkg/Library/BaseSortLib/BaseSortLib.c | 22
1 file changed, 9 insertions(+), 13
Move the Identification file.
This file is only ever imported into the Eot tool.
Cc: Yonghong Zhu
Cc: Liming Gao
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey
---
BaseTools/Source/Python/{Common => Eot}/Identification.py | 0
BaseTools/Source/Python/
add a variable for the string '*' and then use it instead of lots of '*'
Cc: Yonghong Zhu
Cc: Liming Gao
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey
---
BaseTools/Source/Python/AutoGen/AutoGen.py | 54
++--
BaseTools/Source
The comments are incorrect for the base version of this lib.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey
Cc: Star Zeng
Cc: Jian J Wang
---
MdeModulePkg/Library/BaseSortLib/BaseSortLib.c | 22
1 file changed, 9 insertions(+), 13
replace lots of '}' and "}" with a shared new consistent variable.
Cc: Bob Feng
Cc: Yonghong Zhu
Cc: Liming Gao
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey
---
BaseTools/Source/Python/GenFds/FdfParser.py | 45 ++--
1 file c
make functions for common error messages
refactor to use these functions
Cc: Yonghong Zhu
Cc: Liming Gao
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey
---
BaseTools/Source/Python/GenFds/FdfParser.py | 603 ++--
1 file changed, 303
1) initialize UiFvName via __init__ parameter. No change to default behavior.
2) initialize 3 empty lists in __init__. Curently not guarenteed initialized.
Cc: Yonghong Zhu
Cc: Liming Gao
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey
---
BaseTools/Source
unused code/parameters/variables
6) add standard warnings and use them for common code
changes from v1:
1) do not shadow CapsuleFV.
2) rebase on master
changes from v2:
1) do not delete duplicate function calls.
2) add ".lower()" for GUID string comparison.
3) rebase on master
Jaben
Change lists and tuples used solely for "in" testing to sets.
These operations are not order dependent.
fixed some line length for PEP8 compliance on some.
Cc: Liming Gao
Cc: Yonghong Zhu
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey
---
BaseTo
use MacroDict
4. GetFilePart calls into GetSectionData, otherwise doesn’t use MacroDict
Go to 1 and repeat forever.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey
---
BaseTools/Source/Python/GenFds/FdfParser.py | 48 +++-
1 file changed
this file is not imported/used.
Cc: Liming Gao
Cc: Yonghong Zhu
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey
---
BaseTools/Source/Python/Common/Database.py | 120
1 file changed, 120 deletions(-)
diff --git a/BaseTools/Source/Python
replace lots of '}' and "}" with a shared new consistent variable.
Cc: Bob Feng
Cc: Yonghong Zhu
Cc: Liming Gao
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey
---
BaseTools/Source/Python/GenFds/FdfParser.py | 45 ++--
1 file c
use MacroDict
4. GetFilePart calls into GetSectionData, otherwise doesn’t use MacroDict
Go to 1 and repeat forever.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey
---
BaseTools/Source/Python/GenFds/FdfParser.py | 48 +++-
1 file changed
Change lists and tuples used solely for "in" testing to sets.
These operations are not order dependent.
fixed some line length for PEP8 compliance on some.
Cc: Liming Gao
Cc: Yonghong Zhu
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey
---
BaseTo
every call to GetAprioriSection() is duplicated on the line below.
remove one of the calls.
Cc: Bob Feng
Cc: Yonghong Zhu
Cc: Liming Gao
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey
---
BaseTools/Source/Python/GenFds/FdfParser.py | 2 --
1 file changed
make functions for common error messages
refactor to use these functions
Cc: Yonghong Zhu
Cc: Liming Gao
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey
---
BaseTools/Source/Python/GenFds/FdfParser.py | 603 ++--
1 file changed, 303
unused code/parameters/variables
6) add standard warnings and use them for common code
changes from v1:
1) do not shadow CapsuleFV.
2) rebase on master
Jaben Carsey (7):
BaseTools/GenFds: cleanup GenFds
BaseTools/GenFds: change objects to sets
Basetools/GenFds: refactor class FV
BaseTools
1) initialize UiFvName via __init__ parameter. No change to default behavior.
2) initialize 3 empty lists in __init__. Curently not guarenteed initialized.
Cc: Yonghong Zhu
Cc: Liming Gao
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey
---
BaseTools/Source
make functions for common error messages
refactor to use these functions
Cc: Yonghong Zhu
Cc: Liming Gao
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey
---
BaseTools/Source/Python/GenFds/FdfParser.py | 603 ++--
1 file changed, 303
Change lists and tuples used solely for "in" testing to sets.
These operations are not order dependent.
fixed some line length for PEP8 compliance on some.
Cc: Liming Gao
Cc: Yonghong Zhu
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey
---
BaseTo
use MacroDict
4. GetFilePart calls into GetSectionData, otherwise doesn’t use MacroDict
Go to 1 and repeat forever.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey
---
BaseTools/Source/Python/GenFds/FdfParser.py | 48 +++-
1 file changed
replace lots of '}' and "}" with a shared new consistent variable.
Cc: Bob Feng
Cc: Yonghong Zhu
Cc: Liming Gao
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey
---
BaseTools/Source/Python/GenFds/FdfParser.py | 45 ++--
1 file c
1) initialize UiFvName via __init__ parameter. No change to default behavior.
2) initialize 3 empty lists in __init__. Curently not guarenteed initialized.
Cc: Yonghong Zhu
Cc: Liming Gao
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey
---
BaseTools/Source
unused code/parameters/variables
6) add standard warnings and use them for common code
Jaben Carsey (7):
BaseTools/GenFds: cleanup GenFds
BaseTools/GenFds: change objects to sets
Basetools/GenFds: refactor class FV
BaseTools/GenFds: remove MacroDict parameter
BaseTools/GenFds: refactor
every call to GetAprioriSection() is duplicated on the line below.
remove one of the calls.
Cc: Bob Feng
Cc: Yonghong Zhu
Cc: Liming Gao
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey
---
BaseTools/Source/Python/GenFds/FdfParser.py | 2 --
1 file changed
: Bob C Feng
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey
---
BaseTools/Source/Python/GenFds/FdfParser.py | 15 +++
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/BaseTools/Source/Python/GenFds/FdfParser.py
b/BaseTools/Source/Python
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Reverse the checking and only assign once to each variable.
Cc: Yonghong Zhu
Cc: Liming Gao
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey
---
BaseTools/Source/Python/Workspace/DscBuildData.py | 15 ---
1 file changed, 8 insertions(+), 7
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
I see lots of 'MSFT' throughout code and this can reduce them.
Cc: Bob Feng
Cc: Yonghong Zhu
Cc: Liming Gao
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey
---
BaseTools/Source/Python/AutoGen/AutoGen.py | 8
BaseTools/Source
Cc: Yonghong Zhu
Cc: Liming Gao
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey
---
BaseTools/Source/Python/Workspace/DecBuildData.py | 17 +--
BaseTools/Source/Python/Workspace/DscBuildData.py | 17 +--
BaseTools/Source/Python/Workspace
the if statment just has pass statement.
invert if condition and just use do the else work.
Cc: Yonghong Zhu
Cc: Liming Gao
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey
---
BaseTools/Source/Python/Workspace/InfBuildData.py | 6 +-
1 file changed, 1
1) currently a couple classes use m instead of self (including some mixed
functions that should have previously failed).
2) deleted some blank lines.
Cc: Yonghong Zhu
Cc: Liming Gao
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey
---
BaseTools/Source/Python
MakeFile generation is once per module, so mark it as such.
also move the time stamp creation function inside as it's
only called from one place.
Cc: Liming Gao
Cc: Yonghong Zhu
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey
---
BaseTools/Source/Python
: Bob Feng
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey
---
BaseTools/Source/Python/AutoGen/AutoGen.py | 1147 +---
BaseTools/Source/Python/AutoGen/GenC.py|2 +-
BaseTools/Source/Python/AutoGen/GenMake.py | 12 +-
BaseTools/Source/Pyt
-by: Jaben Carsey
---
BaseTools/Source/Python/AutoGen/AutoGen.py | 138 ++--
1 file changed, 66 insertions(+), 72 deletions(-)
diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py
b/BaseTools/Source/Python/AutoGen/AutoGen.py
index 55c84fe4fbc2..7c67f40bff00 100644
--- a/BaseTools
.
Jaben Carsey (5):
BaseTools: AutoGen refactor ModuleAutoGen caching
BaseTools: AutoGen - tag a function as cachable
BaseTools: AutoGen refactor to iterate less
BaseTools/Source/Python/AutoGen/AutoGen.py | 1852 +---
BaseTools/Source/Python/AutoGen/BuildEngine.py | 36
Currently if an invalid parameter is passed, it gives a stack trace.
This changes it to an error message.
Cc: Liming Gao
Cc: Yonghong Zhu
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey
---
BaseTools/Scripts/PatchCheck.py | 9 ++---
1 file changed, 6
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
1) add a property so others can access needed data
2) change GenMake to use property
3) add local variable in GenMake to speed up access
Cc: Liming Gao
Cc: Yonghong Zhu
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey
---
BaseTools/Source/Python/AutoGen
Create the 2 comparison objects once outside the loop.
Cc: Liming Gao
Cc: Yonghong Zhu
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey
---
BaseTools/Source/Python/AutoGen/AutoGen.py | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git
Move single use list from GlobalData (gTempInfs) into the file that uses it as
_TempInfs
Cc: Liming Gao
Cc: Yonghong Zhu
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey
---
BaseTools/Source/Python/Common/GlobalData.py | 7 ---
BaseTools/Source/Python
There are 2 variables that we populate, but never use.
remove them entirely.
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 --
1 file changed, 10 deletions
strings are immutable. allocate minimal duplication.
Cc: Liming Gao
Cc: Yonghong Zhu
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey
---
BaseTools/Source/Python/AutoGen/AutoGen.py | 30
BaseTools/Source/Python/AutoGen/GenC.py
there is no use to assign back to a variable. just return the result.
Cc: Liming Gao
Cc: Yonghong Zhu
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey
---
BaseTools/Source/Python/Common/Expression.py | 3 +--
1 file changed, 1 insertion(+), 2 deletions
change to object types that are closer to use case. for example:
when using a list as a double ended queue, use the built in object.
Cc: Liming Gao
Cc: Yonghong Zhu
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey
---
BaseTools/Source/Python/AutoGen
change mode minimal needed permissions
change to use with statement
Cc: Liming Gao
Cc: Yonghong Zhu
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey
---
BaseTools/Source/Python/AutoGen/AutoGen.py | 57 -
BaseTools/Source/Python
As both can take a tuple, use that instead of calling repeatedly.
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 +-
BaseTools/Source/Python/AutoGen
Instead of testing each equality individually, just make a set and test once.
Cc: Liming Gao
Cc: Yonghong Zhu
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey
---
BaseTools/Source/Python/Ecc/Configuration.py | 10 +-
1 file changed, 1 insertion(+), 9
use with for opening files
remove unneeded variables
dont seek to 0 for just opened file
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 +
BaseTools/Source
performing
operation since strings are immutable and must be completely reallocated and
moved for each concatenation.
v2: Update for concerns sent by Yonghong.
Jaben Carsey (11):
BaseTools: decorate base classes to prevent instantiation
BaseTools: Workspace - create a base class
BaseTools
use python's ABC (abstract base class) to raise type errors if we instantiate
classes we designed to be used only as base classes for other classes.
Cc: Liming Gao
Cc: Yonghong Zhu
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey
---
BaseTools/Source/Python
refactor 3 classes and create a new base class for their shared functions.
Cc: Liming Gao
Cc: Yonghong Zhu
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey
---
BaseTools/Source/Python/Workspace/BuildClassObject.py | 140
+++-
1 file changed
delete commented out code
delete never used class/variable/function/import
refactor to remove Ffs class
dont construct class just for class attribute
Cc: Liming Gao
Cc: Yonghong Zhu
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey
---
BaseTools/Source/Python
d sdict class
Cc: Liming Gao
Cc: Yonghong Zhu
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey
---
BaseTools/Source/Python/AutoGen/AutoGen.py | 38 +-
BaseTools/Source/Python/AutoGen/GenC.py | 454 ++--
BaseTools/Source/Python/AutoG
1 - 100 of 321 matches
Mail list logo