17 Commits

Author SHA1 Message Date
Ivan Enderlin
9a185a0bf6 feat(decoders) Improve LEB parser in the binary module.
The LEB parser is renamed `uleb`. It now checks for overflow, and
badly-formed bits, resp. `TooLarge` or `Eof`. More test cases are
added, whose from the DWARF 4 standard.
2020-02-13 13:36:18 +01:00
Ivan Enderlin
074108d91b doc(interface-types) Improve documentation of decoders::binary::leb. 2020-02-13 11:41:02 +01:00
Ivan Enderlin
80f317a1eb feat(interface-types) Ensure ast::Type is always well-formed.
As @MarkMcCaskey noted, `Type` can be corrupted because `field_names`
and `field_types` must have the same length. This patch removes the
public visibility, and adds methods like `new`, `add_field`,
`field_names` and `field_types` to encapsulate `Type` internal data.
2020-02-13 11:24:29 +01:00
Ivan Enderlin
ddf6711045 doc(interface-types) Improve documentation of the instruction module.
Also, rename `RepeatWhile` to `RepeatUntil`.
2020-02-12 15:59:41 +01:00
Ivan Enderlin
5fa96f062d doc(interface-types) Add a doctest for decoders::binary::parse. 2020-02-10 16:48:25 +01:00
Ivan Enderlin
764edc8022 test(interface-types) Test the parse parser. 2020-02-10 16:39:34 +01:00
Ivan Enderlin
a53b57b595 doc(interface-types) Improve documentation of the binary module. 2020-02-10 16:39:06 +01:00
Ivan Enderlin
11729b1d4c feat(interface-types) Rename ImportedFunction to Import.
So that we are consistent with `Export`.
2020-02-10 15:41:10 +01:00
Ivan Enderlin
c042050497 feat(interface-types) Split the interpreter into multiple modules/files. 2019-09-26 14:14:46 +02:00
Ivan Enderlin
cecb00bd6a feat(interface-types) Create vectors with specific capacity when possible. 2019-09-26 01:00:17 +02:00
Ivan Enderlin
07055522a1 feat(interface-types) Update Instruction. 2019-09-25 23:29:08 +02:00
Ivan Enderlin
429868a125 feat(interface-types) Implement the call executable instruction.
The patch requires to implement the `wasm::TypedIndex`,
`wasm::LocalImportIndex`, and the `wasm::LocalImport` traits.
2019-09-25 21:53:23 +02:00
Ivan Enderlin
f453af05c6 chore(interface-types) Fix clippy warnings. 2019-09-20 12:02:11 +02:00
Ivan Enderlin
23d5e7b7b3 feat(interface-types) Draft instruction interpreter. 2019-09-19 00:18:36 +02:00
Ivan Enderlin
68e699e495 feat(interface-types) Add new instructions. 2019-09-18 17:12:42 +02:00
Ivan Enderlin
a017b920c5 fix(interface-types) get-field #1 argument is of type InterfaceType. 2019-09-18 17:12:42 +02:00
Ivan Enderlin
086c3bdb4c feat(interface-types) Move TryFrom from the ast to the binary module. 2019-09-18 17:12:42 +02:00