Skip to content

Conversation

@alexcrichton
Copy link
Member

Instantiation right now uses a recursive instantiate function since it
was relatively easy to write that way, but this is unfortunately not
factored in a way friendly to the async implementation in #2434. This
commit refactors the function to instead use an iterative loop and
refactors code in such a way that it should be easy to rebase #2434 on
top of this change. The main goal is to make the body of Instance::new
as small as possible since it needs to be duplicated with
Instance::new_async.

@alexcrichton alexcrichton force-pushed the refactor-instantiation branch from 3557f0a to 0a2768c Compare January 21, 2021 20:20
Instantiation right now uses a recursive `instantiate` function since it
was relatively easy to write that way, but this is unfortunately not
factored in a way friendly to the async implementation in bytecodealliance#2434. This
commit refactors the function to instead use an iterative loop and
refactors code in such a way that it should be easy to rebase bytecodealliance#2434 on
top of this change. The main goal is to make the body of `Instance::new`
as small as possible since it needs to be duplicated with
`Instance::new_async`.
@alexcrichton alexcrichton force-pushed the refactor-instantiation branch from 0a2768c to 6ecf8b9 Compare January 21, 2021 20:23
@alexcrichton alexcrichton merged commit 57c686d into bytecodealliance:main Jan 21, 2021
@alexcrichton alexcrichton deleted the refactor-instantiation branch January 21, 2021 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants