]> git.proxmox.com Git - mirror_edk2.git/commit - BaseTools/Source/Python/Common/Expression.py
BaseTools/Expression: Use 2nd passes on PCD values
authorKinney, Michael D <michael.d.kinney@intel.com>
Wed, 21 Feb 2018 04:08:32 +0000 (20:08 -0800)
committerYonghong Zhu <yonghong.zhu@intel.com>
Sun, 25 Feb 2018 08:03:14 +0000 (16:03 +0800)
commit8bd72d7c05ff820ee7826809a033fda9b007d18f
treed3fab27586f5950534cc971734b520845be7a86a
parentebfca258f5d7ab59cd1b72ad56f1de0e7a138ba9
BaseTools/Expression: Use 2nd passes on PCD values

Use 2 passes when evaluating PCD values to discover
all the LABEL() operators and compute the byte offset
of each LABEL().  The 2nd pass then has the information
to replace the OFFSET_OF() operator with the computed
byte offset.  The 2 passes allows OFFSET_OF() to be used
before a LABEL() is declared.

fixes:https://bugzilla.tianocore.org/show_bug.cgi?id=880
Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
BaseTools/Source/Python/Common/Expression.py