summaryrefslogtreecommitdiffstats
path: root/hw/arm
diff options
context:
space:
mode:
authorPaolo Bonzini2019-01-23 07:55:58 +0100
committerPaolo Bonzini2019-03-07 21:45:53 +0100
commitf7082a9a7cb26bd6531d6cd25914e4fcc30ab0c3 (patch)
tree9f50de33e8aefbd24cac9011d651bf90177fcf77 /hw/arm
parentminikconfig: add AST (diff)
downloadqemu-f7082a9a7cb26bd6531d6cd25914e4fcc30ab0c3.tar.gz
qemu-f7082a9a7cb26bd6531d6cd25914e4fcc30ab0c3.tar.xz
qemu-f7082a9a7cb26bd6531d6cd25914e4fcc30ab0c3.zip
minikconfig: add semantic analysis
There are three parts in the semantic analysis: 1) evaluating expressions. This is done as a simple visit of the Expr nodes. 2) ordering clauses. This is done by constructing a graph of variables. There is an edge from X to Y if Y depends on X, if X selects Y, or if X appears in a conditional selection of Y; in other words, if the value of X can affect the value of Y. Each clause has a "destination" variable whose value can be affected by the clause, and clauses will be processed according to a topological sorting of their destination variables. Defaults are processed after all other clauses with the same destination. 3) deriving the value of the variables. This is done by processing the clauses in the topological order provided by the previous step. A "depends on" clause will force a variable to False, a "select" clause will force a variable to True, an assignment will force a variable to its RHS. A default will set a variable to its RHS if it has not been set before. Because all variables have a default, after visiting all clauses all variables will have been set. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20190123065618.3520-25-yang.zhong@intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/arm')
0 files changed, 0 insertions, 0 deletions