Ivan Enderlin
836c848c61
doc(interface-types) Add #[deny(missing_docs)]
.
2020-02-13 14:34:45 +01:00
Ivan Enderlin
32bf806f9b
chore(interface-types) Simplify code.
2020-02-13 14:26:50 +01:00
Ivan Enderlin
8748597483
chore(encoders) Changing unimplemented!()
to todo!()
.
2020-02-13 14:24:07 +01:00
Ivan Enderlin
ed06fc0482
feat(encoders) Implement ToString
instead of From<…> for String
.
2020-02-13 14:19:31 +01:00
Ivan Enderlin
276478d1ed
chore(decoders) Simplify code.
2020-02-13 13:56:30 +01:00
Ivan Enderlin
6314ebcbd6
chore(decoders) Simplify code.
2020-02-13 13:54:26 +01:00
Ivan Enderlin
ab717513ec
fix(decoders) Remove the unsafe
block in the string
parser.
...
Instead of using `str::from_utf8_unchecked`, this patch updates the
code to use `str::from_utf8` and handles the error appropriately.
2020-02-13 13:52:23 +01:00
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
8ba931e33f
doc(interface-types) Improve the documentation of the interpreter
module.
2020-02-12 17:37:06 +01:00
Ivan Enderlin
278a743e60
doc(interface-types) Improve the documentation of the instruction
module.
2020-02-12 16:01:33 +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
1749af20f5
doc(interface-types) Improve documentation of the macros
module.
2020-02-12 15:52:15 +01:00
Ivan Enderlin
3aaa6dafda
doc(interface-types) Improve documentation of the wat
module.
2020-02-10 17:12:32 +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
8ec4eb429e
doc(interface-types) Improve documentation of the ast
module.
2020-02-10 15:44:28 +01:00
Ivan Enderlin
57692f0458
doc(interface-types) Improve documentation of the ast
module.
2020-02-10 15:41:41 +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
a8da95b339
doc(interface-types) Improve module descriptions.
2020-02-10 15:27:04 +01:00
Ivan Enderlin
74a46288ce
doc(interface-types) Improve documentation of the stack
module.
2020-02-10 15:23:28 +01:00
Ivan Enderlin
59aee179d2
doc(interface-types) Improve documentation of the crate itself.
2020-02-10 15:22:56 +01:00
Ivan Enderlin
023364c042
test(interface-types) Improve test cases for Stack
.
2020-02-10 15:22:22 +01:00
Ivan Enderlin
15ac649f4d
chore(interface-types) Format code.
2020-02-10 14:41:40 +01:00
Ivan Enderlin
64ee66ccda
test(interface-types) Fix a documentation message.
2020-02-10 14:41:06 +01:00
Ivan Enderlin
e4e319c28d
feat(interface-types) Use nom 5.1.
2020-02-10 14:05:13 +01:00
Ivan Enderlin
9f815950ed
chore(interface-types) Update crate version.
2020-02-10 13:32:04 +01:00
Ivan Enderlin
74dfa0d8cd
feat(interface-types) Remove dev-dependencies to any runtime.
2020-02-10 13:15:52 +01:00
Ivan Enderlin
23c512d33c
feat(interface-types) Simplify code.
2020-02-10 13:14:46 +01:00
Ivan Enderlin
3c651cd146
feat(interface-types) Change Instance::local_or_import(&self)
to Instance::local_or_import(&mut self)
.
...
It allows the instance to create or update locals/imports when the
`local_or_import` function is called. It's not ideal, but fine enough
for a first step.
2020-02-10 13:14:19 +01:00
Ivan Enderlin
1352424a6c
chore(interface-types) The tests/
directory has moved in wasmer-runtime-core-tests
.
2020-02-10 13:13:03 +01:00
Ivan Enderlin
0a2b094d02
chore(interface-types) Simplify the code.
2020-02-10 13:03:36 +01:00
Ivan Enderlin
f206ccd55f
feat(interface-types) Introduce the wasm::structures::MemoryView
trait.
2020-02-10 13:00:29 +01:00
Ivan Enderlin
a27782ac66
chore(cargo) Remove patches from version contraints.
2019-09-26 15:05:22 +02:00
Ivan Enderlin
6fee3acf59
feat(interface-types) Add attributes.
2019-09-26 15:02:20 +02:00
Ivan Enderlin
cae0640d75
feat(interface-types) Let the type inference engine do the work.
2019-09-26 14:37:29 +02:00
Ivan Enderlin
cabb277f14
feat(interface-types) Rename a variable.
2019-09-26 14:18:30 +02:00
Ivan Enderlin
1478ad8b4e
chore(interface-types) Simplify the executable_instruction
macro.
2019-09-26 14:17:43 +02:00
Ivan Enderlin
c042050497
feat(interface-types) Split the interpreter into multiple modules/files.
2019-09-26 14:14:46 +02:00
Ivan Enderlin
e509f97c2d
fix(interface-types) Fix typos in error messages.
2019-09-26 01:02:29 +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
0e1422f16a
feat(interface-types) Implement the write-utf8
executable instruction.
2019-09-26 00:55:26 +02:00
Ivan Enderlin
77546784cf
chore(interface-types) Re-order match arms.
2019-09-25 23:30:41 +02:00
Ivan Enderlin
07055522a1
feat(interface-types) Update Instruction
.
2019-09-25 23:29:08 +02:00
Ivan Enderlin
5e08e76899
test(interface-types) Use macros to reduce test boilerplate.
2019-09-25 23:13:26 +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
3361b3d9a8
feat(interface-types) Implement the read-utf8
instruction.
...
It implies to create the `wasm::Memory` trait.
Also, the patch updates `wasm::Type` and `wasm::Value` to
`wasm::InterfaceType` and `wasm::InterfaceValue`. It enforces a new
rule that is: All values in the stack must be owned by the stack. Any
value going in or out must be cloned.
2019-09-23 16:29:01 +02:00
Ivan Enderlin
1eea395679
test(interface-types) Test calling a void exported function.
2019-09-20 14:59:18 +02:00