Skip to content

Commit d0d96a8

Browse files
authored
Avoid boilerplate in ExpressionAnalyzer comparing & hashing (WebAssembly#3332)
Expands on WebAssembly#3294: * Scope names must be distinguished as either defs or uses. * Error when a core #define is missing, which is less error-prone, as suggested by @tlively * Add DELEGATE_GET_FIELD which lets one define "get the field" once and then all the loops can use it. This helps avoid boilerplate for loops at least in some cases (when there is a single object on which to get the field). With those, it is possible to replace boilerplate in comparisons and hashing logic. This also fixes a bug where BrOnExn::sent was not scanned there. Add some unit tests for hashing. We didn't have any, and hashing can be subtly wrong without observable external effects (just more collisions).
1 parent 32171f1 commit d0d96a8

5 files changed

Lines changed: 391 additions & 376 deletions

File tree

0 commit comments

Comments
 (0)