Skip to content

Conversation

dcodeIO
Copy link
Member

@dcodeIO dcodeIO commented Dec 16, 2019

This PR updates Binaryen to latest, most notably accounting for

  • Creation and expansion of multi-value types
  • Removal of function types (API now takes multi-value types)
  • Required type parameter when creating local.tees (currently polyfilled to the old behavior)

in turn also removing our own Binaryen-like signature handling. Signature changes are responsible for the huge fixture diff.

@jtenner
Copy link
Contributor

jtenner commented Dec 16, 2019

Multivalue returns are going to open up the world for writing very efficient parsers.

@willemneal
Copy link
Contributor

And can make iterators better too! Currently iterator.next() returns an object like {done: false, value: 1}, which would mean allocating a new object each iteration. I got around this in #862 by using the iterator itself as the return value. However, now we can just return the value and the done boolean!

Also tuples!!!

@dcodeIO
Copy link
Member Author

dcodeIO commented Dec 18, 2019

Don't get too excited, as we don't have multi-value types yet. This is merely initial preparation on the Binaryen side. Also added a little test that doesn't validate at this point, but can be used to check in the future.

@dcodeIO dcodeIO merged commit 7acff76 into master Dec 18, 2019
@dcodeIO dcodeIO deleted the update-binaryen5 branch January 1, 2020 14:22
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.

3 participants