Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow multiple data segments #17

Merged
merged 3 commits into from
Aug 22, 2015
Merged

Allow multiple data segments #17

merged 3 commits into from
Aug 22, 2015

Conversation

lukewagner
Copy link
Member

It's my understanding that we want to be able to have multiple data segments and to control the offset in linear memory into which each segment is loaded. For simplicity of validation and because I don't see the need for this flexibility, the validation rules require the segments to be disjoint and ordered by offset.

For good form, I should also add negative validation tests (breaking the rules). Rather than giving each one a separate file and pattern-matching on the exact text output, I think this is another good usecase for a new script command that you give a module that should fail to validate and then perhaps a string key to identify which error you're expecting. Need some agreement on #14 before pursuing that.

@lukewagner lukewagner mentioned this pull request Aug 21, 2015
@titzer
Copy link
Contributor

titzer commented Aug 21, 2015

At the s-expression level, this probably makes sense. However at the binary level I think it makes sense to allow multiple overlapping data segments. In fact, I think we should allow unrestricted data segments in the binary format so that a binary can really "process itself", including the data representing its own code, etc. This freedom may allow us to "polyfill" new binary tricks and features on top of WASM 1.0.

@lukewagner
Copy link
Member Author

@titzer I agree with wanting the over-the-wire binary format to be able to do arbitrary stuff, but this is generally something we've said would be done above level 0 (along with deduplication, macros, etc). That way the manipulation can be quite arbitrary and not complicate the spec. (And perhaps later, based on a lot of trial and error, we standardize an optional layer 1 which can be decoded natively.)

@lukewagner
Copy link
Member Author

Updated to address comments. I also made modul.memory a memory option, instead of having dead values, as the way to say "no declared linear memory". This was also nice for being able to simply reject multiple memory declarations (which previously overwrote).

rossberg added a commit that referenced this pull request Aug 22, 2015
@rossberg rossberg merged commit d4dbba1 into master Aug 22, 2015
@rossberg rossberg deleted the multi-sections branch August 26, 2015 13:15
eqrion pushed a commit to eqrion/wasm-spec that referenced this pull request Jul 18, 2019
ErikMcClure pushed a commit to innative-sdk/spec that referenced this pull request Jun 15, 2020
rossberg referenced this pull request in effect-handlers/wasm-spec Feb 15, 2021
Plus some minor fixes and more tests.
dhil pushed a commit to dhil/webassembly-spec that referenced this pull request Mar 2, 2023
dhil pushed a commit to dhil/webassembly-spec that referenced this pull request Mar 2, 2023
dhil added a commit to dhil/webassembly-spec that referenced this pull request Jan 25, 2024
This patch (re)installs the check for continuation type
well-formedness.

Currently, it allows only continuation types to be indexed by plain
function types.
dhil added a commit to dhil/webassembly-spec that referenced this pull request Jan 25, 2024
This patch (re)installs the check for continuation type
well-formedness.
dhil pushed a commit to dhil/webassembly-spec that referenced this pull request Apr 12, 2024
Revised and renamed to switching fibers
rossberg added a commit that referenced this pull request Jul 3, 2024
* [interpreter] Handle custom sections and annotations

Co-authored-by: Yuri Iozzelli <y.iozzelli@gmail.com>

* Fix merge conflict

* Fix lexer priorities

* Fix wast.ml

* Oops

* Update wast.ml

---------

Co-authored-by: Andreas Rossberg <rossberg@mpi-sws.org>
rossberg added a commit that referenced this pull request Jul 3, 2024
* [interpreter] Handle custom sections and annotations

Co-authored-by: Yuri Iozzelli <y.iozzelli@gmail.com>

* Fix merge conflict

* Fix lexer priorities

* Fix wast.ml

* Oops

* Update wast.ml

---------

Co-authored-by: Andreas Rossberg <rossberg@mpi-sws.org>
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