| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
| |
* Non-imported globals can not be used in initializer expressions
* block/loop/if labels can be repeated at the end
* get_global index in initializer expression should reference use module
index space, not "defined" global index space
|
| |
|
|
|
|
|
|
|
| |
* `offset=` and `align=` can now specify hex values
* data and elem segment offsets are now not checked; they can be out of
order or overlapping, and even out-of-bounds if the size is zero
* added the new tests `skip-stack-guard-page` and `unwind`
|
|
|
|
|
|
| |
This updates third_party/testsuite to the current head of the `binary_0xc` branch
(https://github.com/WebAssembly/testsuite/commit/58c1bf67cc65a1219d49114c41805bafc75ac0c6),
which is the collection of tests from the current head of the spec repo's `binary_0xc` branch
(https://github.com/WebAssembly/spec/commit/0fa1531c2deebb767b263d405dbce849c9663f55).
|
| |
|
| |
|
| |
|
|
|
|
| |
It was an interesting experiment, but it is not maintained or tested.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Change 7c482b1a of the spec repo now requires that implicit function
types are created when creating a new func or import, but only when the
type is not explicitly specified, and the have not been specified. For
example:
```
(func (param i32))
(import "foo" "bar" (result i32)
```
This was previously done in sexpr-wasm when writing the binary, but now
these types can be referenced by `call_import`, so it has to be handled
earlier.
Since all signatures are now defined in the module, I made it so the
function signature is shared with the module function types. The tricky
part here is when a function type and an explicit signature are both
specified:
```
(func (type $t) (param f32) ...)
```
In this case, we need to keep the explicit signature around long enough
to be checked against the function type, so it must be owned by the
function. The WASM_FUNC_DECLARATION_FLAG_SHARED_SIGNATURE flag specifies
this case.
To simplify code that uses the AST, I reverted many of the
changes introduced in 73e5bc7d. Now the function declaration's signature
is always valid to access, and will have been resolved if it was
specified with a func type instead of an explicit signature.
Some other changes:
* There was a bug in the interpreter's `f32.demote/f64` rounding when
given a value that is very close to positive or negative F32_MAX
* Added `update-spec-tests.py` to more easily update the spec tests in
`test/interp/spec/*.txt` from the files in
`third_party/testsuite/*.wast`. Previously I would just do it
manually.
|
|
|
|
|
| |
`(func (br 0))` is valid, because the function introduces an implicit
block scope. This change also updates the testsuite (which has tests for
this behavior).
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Modify AST parser to disallow any other order than `param`, `result`,
`local`.
* Allow parsing all var integers as int64 (the lookups will fail later.)
* Fix interpreter logic determining whether to adjust the stack; we were
correctly handling the case where `unreachable` was being used in an
expression (the value stack is adjusted "up" as if a value was
actually produced), but the same behavior is required for `br`,
`br_table` and `return`.
* Add NAT token to lexer/parser, which is an integer value without a
sign.
|
|
|
|
|
| |
It's not really the appropriate place to handle it. Now that we have
wasm-wast and wasm-interp, we can at least verify that the tools are
internally consistent.
|
| |
|
|
|
|
|
|
|
|
|
| |
* Parse memory pages as uint64, as we need to check whether it's invalid
in assert_invalid, and one of the spec tests uses the value 2**32.
* Update WASM_MAX_PAGES to 65535 (not 65536)
* Add the new spec tests: binary.wast, break-drop.wast and
typecheck.wast. A couple of these were added before, but weren't added
as .txt files in the test directory.
|
|
|
|
|
| |
You can't git clone to a specific commit SHA, so we just download the
source archive from Github.
|
|
|
|
|
| |
This makes it easier to build for users who don't run
`git submodule update --init`.
|
| |
|
|
|
|
|
|
|
| |
* current_memory and grow_memory return page size, not byte size
* also update testsuite, which fixes a couple of spec tests
* disable d8/spec tests (in a hacky way), because the binary_0xb v8
support isn't landed yet, so we can't easily test it
|
|
|
|
| |
These will be useful for testing the binary reader.
|
| |
|
|
|
|
| |
It's pretty clunky though
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
v8 also has support for the names section, but I'll add that later.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
spec/switch.txt is still failing because we don't yet support br_table
passing an argument.
|
| |
|
|
|
|
| |
(last v8 push broke the build)
|
| |
|
|
|
|
|
| |
This breaks the spec tests, since the corresponding change to the
testsuite has been pushed yet.
|
|
|
|
| |
Also update testsuite
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Condition now comes last in br_if:
BR_IF var cond
BR_IF var expr cond
It should also be evaluated last, but that hasn't been updated in v8
yet.
|