Skip to content

Module allocation & Store #528

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

Closed
LuisHsu opened this issue Jul 23, 2017 · 1 comment
Closed

Module allocation & Store #528

LuisHsu opened this issue Jul 23, 2017 · 1 comment

Comments

@LuisHsu
Copy link

LuisHsu commented Jul 23, 2017

In the description of 4.5.3 Allocation (page 77), it says

New instances of functions, tables, memories, globals, and modules are allocated in a store S

But in 4.2.2 Store, modules is not specified in the Store structure.

Is module instances still resides in the Store, or there's other mechanism that I didn't mentioned?

@rossberg
Copy link
Member

This was meant to reflect that all the components of a module are allocated in the store (even though the record itself isn't). But I agree that it's misleading. Sneaked in a change into PR #526.

ngzhian added a commit to ngzhian/spec that referenced this issue Nov 16, 2021
Previously, i8 and i16 was careless w.r.t. the top bits,
because they were only used by v128, which uses Bytes.get/set that
appropriate masks the top bits when storing into the byte array.

With this change, i8 and i16 are self contained small integers
implemented using int32. They are always stored signed-extended, e.g.
INT8_MIN (-128) is stored as 0xffffff80.

This requires adding sign-extension operation (Rep.sx) in a couple of
places, that will make sure to extend the sign bit to the rest of the
int32.

Also add a small, non-exhaustive test for these small integers in a new
file tests/smallint.ml. This is the first ml test we are adding (all
previous tests are wasm/wast tests that we run using the interpreter),
so there are some modifications to the Makefile to build and run this
test (make smallinttest, make test will also run it).

This test is in the tests/ folder to avoid a conflict with a Makefile goal
test/x to run x.wast in ../test/core, otherwise it tries to run smallint.ml as
a wast test.

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

No branches or pull requests

2 participants