Skip to content
This repository was archived by the owner on Jun 16, 2020. It is now read-only.

Multi value#103

Merged
yurydelendik merged 6 commits intobytecodealliance:masterfrom
fitzgen:multi-value
Jun 24, 2019
Merged

Multi value#103
yurydelendik merged 6 commits intobytecodealliance:masterfrom
fitzgen:multi-value

Conversation

@fitzgen
Copy link
Member

@fitzgen fitzgen commented Jun 5, 2019

Builds on top of #102

@fitzgen
Copy link
Member Author

fitzgen commented Jun 5, 2019

(Note: this just enables function calls with multiple return values, it doesn't attempt to handle multi-value blocks yet, which I figure can come in follow up PRs).

@fitzgen
Copy link
Member Author

fitzgen commented Jun 5, 2019

Added support for multi-value blocks, which was slightly more involved since it had to mess with control frames / BlockState in the validator a bit.

@yurydelendik
Copy link
Collaborator

It looks good. The only question have is where I can find a spec for the encoding used in the patch? There is https://webassembly.github.io/multi-value/core/binary/types.html#function-types, but it does not match the logic at the read_type_or_func_type.

@fitzgen
Copy link
Member Author

fitzgen commented Jun 24, 2019

See https://webassembly.github.io/multi-value/core/binary/instructions.html#binary-blocktype and the paragraph just above it:

Block types are encoded in special compressed form, by either the byte 0x40 indicating the empty type, as a single value type, or as a type index encoded as a positive signed integer.

Copy link
Collaborator

@yurydelendik yurydelendik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good with the minor changes

@fitzgen
Copy link
Member Author

fitzgen commented Jun 24, 2019

Pushed a new commit with feedback addressed.

@yurydelendik yurydelendik merged commit 443126a into bytecodealliance:master Jun 24, 2019
@yurydelendik
Copy link
Collaborator

Thank you for the patch.

@fitzgen fitzgen deleted the multi-value branch June 24, 2019 23:06
@fitzgen
Copy link
Member Author

fitzgen commented Jun 24, 2019

Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants