4853 Commits

Author SHA1 Message Date
Ivan Enderlin
d8f923091f chore(decoders) Simplify code. 2020-02-13 13:54:26 +01:00
Ivan Enderlin
3f0c32bf44 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
370fd6d866 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
1ad42d81cb doc(interface-types) Improve documentation of decoders::binary::leb. 2020-02-13 11:41:02 +01:00
Ivan Enderlin
b7941f4019 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
13b9cb3995 doc(interface-types) Improve the documentation of the interpreter module. 2020-02-12 17:37:06 +01:00
Ivan Enderlin
6b0e43b7c4 doc(interface-types) Improve the documentation of the instruction module. 2020-02-12 16:01:33 +01:00
Ivan Enderlin
b3c102da37 doc(interface-types) Improve documentation of the instruction module.
Also, rename `RepeatWhile` to `RepeatUntil`.
2020-02-12 15:59:41 +01:00
Ivan Enderlin
98c73099c3 doc(interface-types) Improve documentation of the macros module. 2020-02-12 15:52:15 +01:00
Ivan Enderlin
c5b963b81b doc(interface-types) Improve documentation of the wat module. 2020-02-10 17:12:32 +01:00
Ivan Enderlin
55ae0e474e doc(interface-types) Add a doctest for decoders::binary::parse. 2020-02-10 16:48:25 +01:00
Ivan Enderlin
98fb0697d1 test(interface-types) Test the parse parser. 2020-02-10 16:39:34 +01:00
Ivan Enderlin
9fda6f9451 doc(interface-types) Improve documentation of the binary module. 2020-02-10 16:39:06 +01:00
Ivan Enderlin
2fc1fbb7ec doc(interface-types) Improve documentation of the ast module. 2020-02-10 15:44:28 +01:00
Ivan Enderlin
d667cb8e2f doc(interface-types) Improve documentation of the ast module. 2020-02-10 15:41:41 +01:00
Ivan Enderlin
36c7dbd92f feat(interface-types) Rename ImportedFunction to Import.
So that we are consistent with `Export`.
2020-02-10 15:41:10 +01:00
Ivan Enderlin
32325c1861 doc(interface-types) Improve module descriptions. 2020-02-10 15:27:04 +01:00
Ivan Enderlin
d63508f19e doc(interface-types) Improve documentation of the stack module. 2020-02-10 15:23:28 +01:00
Ivan Enderlin
e098934328 doc(interface-types) Improve documentation of the crate itself. 2020-02-10 15:22:56 +01:00
Ivan Enderlin
5ed5ac82c0 test(interface-types) Improve test cases for Stack. 2020-02-10 15:22:22 +01:00
Ivan Enderlin
102ebe87f8 chore(interface-types) Format code. 2020-02-10 14:41:40 +01:00
Ivan Enderlin
0b0a89bf0f test(interface-types) Fix a documentation message. 2020-02-10 14:41:06 +01:00
Ivan Enderlin
60a905698d feat(interface-types) Use nom 5.1. 2020-02-10 14:05:13 +01:00
Ivan Enderlin
fe14c5c06b chore(interface-types) Update crate version. 2020-02-10 13:32:04 +01:00
Ivan Enderlin
ba16d12b1a Merge branch 'master' into feat-interface-types 2020-02-10 13:25:57 +01:00
Ivan Enderlin
c8af1b1fb7 feat(interface-types) Remove dev-dependencies to any runtime. 2020-02-10 13:15:52 +01:00
Ivan Enderlin
b56240010c feat(interface-types) Simplify code. 2020-02-10 13:14:46 +01:00
Ivan Enderlin
207d69fdbd 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
99c9fc44dc chore(interface-types) The tests/ directory has moved in wasmer-runtime-core-tests. 2020-02-10 13:13:03 +01:00
Ivan Enderlin
7b3ab38608 chore(interface-types) Simplify the code. 2020-02-10 13:03:36 +01:00
Ivan Enderlin
d8134721a8 feat(interface-types) Introduce the wasm::structures::MemoryView trait. 2020-02-10 13:00:29 +01:00
Syrus Akbary
5b8c44c529 Try to fix docs generation 2020-02-07 22:30:51 -08:00
Syrus Akbary
e521339694
Merge pull request #1194 from wasmerio/nlewycky-patch-1
Fix typo in comment.
2020-02-07 12:16:54 -08:00
nlewycky
073d342f01
Fix typo in comment. 2020-02-07 12:16:16 -08:00
Syrus Akbary
e387569818
Merge pull request #1193 from wasmerio/feature/document-private-items
Include implementation details when generating our documentation.
2020-02-07 11:49:46 -08:00
Nick Lewycky
0a89c8188c Include implementation details when generating our documentation.
In passing, replace deprecated flag --all with equivalent flag --workspace.
2020-02-07 11:48:45 -08:00
bors[bot]
2c44b700c8
Merge #1183
1183: Make full preemption an optional feature. r=syrusakbary a=losfair

Full preemption requires two additional memory loads on loop backedges and function calls. This PR allows disabling full preemption at code generation time, and disables it by default.

Co-authored-by: losfair <zhy20000919@hotmail.com>
Co-authored-by: Heyang Zhou <zhy20000919@hotmail.com>
2020-02-05 01:05:04 +00:00
bors[bot]
abbdda7ebe
Merge #1189
1189: Fix a couple typos in comments. r=MarkMcCaskey a=nlewycky



Co-authored-by: Nick Lewycky <nick@wasmer.io>
2020-02-04 18:03:12 +00:00
losfair
d2fc5c8013 Cargo fmt 2020-02-05 00:45:24 +08:00
losfair
d3f2cf594a Fix comments. 2020-02-05 00:44:59 +08:00
Heyang Zhou
b5a629b065
Use less-than to compare sizes.
Co-Authored-By: nlewycky <nick@wasmer.io>
2020-02-05 00:37:40 +08:00
Heyang Zhou
fe5ed7b27a
Improve comment for memory_bound_check_mode.
Co-Authored-By: nlewycky <nick@wasmer.io>
2020-02-05 00:35:15 +08:00
Nick Lewycky
5a795d560e Fix a couple typos in comments. 2020-02-03 12:41:57 -08:00
losfair
bb79df7e69 Merge remote-tracking branch 'origin/master' into feature/optional-full-preemption 2020-02-04 01:58:53 +08:00
losfair
60c7d1e0fc Fix register zeroing in emit_compare_and_swap. 2020-02-04 01:58:21 +08:00
bors[bot]
cc034cd5e1
Merge #1186
1186: Improve some docs and misc code segments r=MarkMcCaskey a=MarkMcCaskey

A bit of a follow up to #1184 plus some clippy fixes and doc improvements

Co-authored-by: Mark McCaskey <mark@wasmer.io>
2020-01-31 23:51:29 +00:00
Mark McCaskey
929825cba1 Improve some docs and misc code segments 2020-01-31 15:42:18 -08:00
bors[bot]
a54f4e730e
Merge #1185
1185: Bump supported Rust version to 1.40.0 r=MarkMcCaskey a=MarkMcCaskey

Rust 1.41.0 released yesterday

Co-authored-by: Mark McCaskey <mark@wasmer.io>
2020-01-31 23:09:57 +00:00
Mark McCaskey
bff7027e81 Bump supported Rust version to 1.40.0 2020-01-31 14:56:20 -08:00
bors[bot]
a01fd4cafb
Merge #1184
1184: Add minor documentation updates r=MarkMcCaskey a=MarkMcCaskey



Co-authored-by: Mark McCaskey <mark@wasmer.io>
2020-01-31 22:50:37 +00:00