| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Mostly this involves adding additional casts. Though there are a few
more substantial changes:
* The default method for relocating parser stacks no longer works
because Bison assumes that C++ values can't be memcpy'd. Ours can, but
there's no easy way to make the generated code do the right thing, so
we do it manually
* Removed all uses of WabtBool and replaced with bool
* Renamed all uses of export and mutable -> export_ and mutable_
* Casting an invalid value to an enum triggers ubsan, so we have to be a
little more careful about when we do it (see binary-reader.c:read_sections())
* It's illegal to forward-declare enums, so we just #include instead.
* Designated initializers are not allowed in g++, so we have to switch
them to lazily initialized structures instead. Pretty horrible, so it
will be nice to have a better solution for C++.
|
|
|
|
| |
It complicates the code everywhere. It's faster to use a stack
allocator, but not worth the trouble for maintainability.
|
|
|
| |
This fixes issue #304.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The typechecking is now shared between the validator and
binary-reader-interpreter as well.
* Shared the various LabelType enumerations -> WabtLabelType.
* Fixed the "invalid depth" errors, the max value was incorrect.
* Removed some tests that aren't useful anymore:
- interp/if-then-br hasn't been useful for a while, but now is even
less so because it doesn't validate without dropping the i32.const
from the true branch
- typecheck/bad-br-multi-type isn't possible because the block must
specify the signature for the br.
- typecheck/bad-label-multi-type used to test matching signature for
fallthrough and br, but isn't possible because of block signatures.
|
| |
|
| |
|
|
|
|
|
| |
It was being passed before as "index", which is confusing because the
other callbacks have recently been changed to pass the
func/global/memory/table index instead.
|
|
|
|
|
|
| |
This change also modifies a few BinaryReader callbacks to return indexes
in the "module" space, rather than the "defined" space.
This fixes issue #277.
|
|
|
|
|
|
| |
* Change assertions in apply-names to failures
* Fix off-by-one bug in binary-reader-ast get_label_at
* Keep track of last known section code, so the same section cannot be
specified twice, with a custom section between.
|
| |
|
|
|
|
|
|
|
| |
* Make some binary reading/writing utilities public
This is mostly a refactor to make some of the internal
binary reading/writing utilities public and available
to the wasm linker prototype that I'm working on.
|
|
|