Skip to content

Commit

Permalink
decodetree: Move semantic propagation into classes
Browse files Browse the repository at this point in the history
Create ExcMultiPattern to hold an set of non-overlapping patterns.
The body of build_tree, prop_format become member functions on this
class.  Add minimal member functions to Pattern and MultiPattern
to allow recusion through the tree.

Move the bulk of build_incmulti_pattern to prop_masks and prop_width
in MultiPattern, since we will need this for both kinds of containers.
Only perform prop_width for variablewidth.

Remove global patterns variable, and pass down container object into
parse_file from main.

No functional change in all of this.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
  • Loading branch information
rth7680 committed Jun 8, 2020
1 parent b44b344 commit 08561fc
Showing 1 changed file with 252 additions and 210 deletions.

0 comments on commit 08561fc

Please sign in to comment.