Skip to content
This repository was archived by the owner on Nov 3, 2021. It is now read-only.

[spec/interpreter/test] Declarative element segments #73

Merged
merged 8 commits into from
Jan 16, 2020
Merged

Conversation

rossberg
Copy link
Member

@rossberg rossberg commented Jan 14, 2020

As discussed in #31, makes uses of ref.func outside an element segment illegal, unless they also occur in an element segment.

Furthermore, introduces declarative element segments that are immediately dropped at instantiation. Example syntax is

(elem declare func $f $g)

@rossberg rossberg changed the title [interpreter/test] Declarative element segments [spec/interpreter/test] Declarative element segments Jan 15, 2020
@rossberg
Copy link
Member Author

Spec text added.

Copy link
Contributor

@lars-t-hansen lars-t-hansen left a comment

Choose a reason for hiding this comment

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

No objections.

@@ -529,6 +541,8 @@ Instead, the context :math:`C` for validation of the module's content is constru

* :math:`C.\CRETURN` is empty.

* :math:`C.\CREFS` is the set :math:`\freefuncidx(\module.\MELEMS)`, i.e., the set of :ref:`function indices <syntax-funcidx>` occrring in any of the module's :ref:`element segments <syntax-elem>`.
Copy link
Member

Choose a reason for hiding this comment

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

sp: occurring

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks, fixed.

@rossberg rossberg merged commit 64f9837 into master Jan 16, 2020
rossberg pushed a commit that referenced this pull request May 14, 2020
The data count section has a count that must match the number of data segments. If the data count section isn't present, then `memory.init` and `data.drop` cannot be used.

Fixes issue #73.
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.

3 participants