Skip to content

Commit

Permalink
Refactor the wast resolver
Browse files Browse the repository at this point in the history
The purpose of this commit is to cut down on the complexity of reading
and understanding the resolver for components. These were some
refactorings I noticed during review that I think help make it a bit
more clear in each function what's happenign.

* Add a new `Resolver` type to encapsulate the `Vec<ComponentResolver>`
  stack
* Move freestanding functions to methods on `Resolver` and remove
  lifetime arguments on each function.
* Rename the `ComponentResolver` type to `ComponentState` to avoid
  conflicting with `Resolver`.
* Move `register*` functions to `ComponentState`
  • Loading branch information
alexcrichton committed May 18, 2022
1 parent cf92a1e commit e808388
Showing 1 changed file with 569 additions and 609 deletions.

0 comments on commit e808388

Please sign in to comment.