Commit Graph

3148 Commits

Author SHA1 Message Date
Mark McCaskey
403e14bc1e Add CompilerConifg opt to disable IR verification in debug mode 2020-03-24 14:52:02 -07:00
Ivan Enderlin
ffe7f765a2 doc(interface-types) Add strign.size in the list of supported instructions. 2020-03-24 15:35:01 +01:00
Ivan Enderlin
38f62392ff feat(interface-types) Implement the string.size instruction. 2020-03-24 15:33:42 +01:00
Ivan Enderlin
daef7b0bfd feat(interface-types) Add the Stackable::peek1 method.
This method allows to peek the last item on the stack (if any) by
reference.
2020-03-24 15:32:54 +01:00
Ivan Enderlin
7f2273b32b doc(interface-types) Add string.* instructions. 2020-03-24 13:29:38 +01:00
Ivan Enderlin
ec7aebe7e1 feat(interface-types) Implement the string.(lift|lower)_memory instructions.
The `string.lift_memory` instruction replaces `memory-to-string`, and
`string.lower_memory` replaces `string-to-memory`.
2020-03-24 13:25:06 +01:00
Ivan Enderlin
afbeb5d230 feat(interface-types) Rename lowering_lifting module to numbers. 2020-03-24 13:10:21 +01:00
Ivan Enderlin
6fcd45bce3 doc(interface-types) Add links to WIT instructions. 2020-03-24 12:48:33 +01:00
Ivan Enderlin
cd58af2633 doc(interface-types) Update supported instructions. 2020-03-24 12:47:39 +01:00
Ivan Enderlin
50201a5e0b feat(interface-types) Implement [siu](NN|MM).from_* instructions.
Basically the `x-to-y` instructions have been renamed `y.from_x`. This
patch updates the instruction. The binary representation isn't
specified yet, so it's just arbitrary values.
2020-03-24 12:43:57 +01:00
bors[bot]
56aec04d1d
Merge #1327
1327: fix(interface-types) Stack pops items in the same order than Wasm invocation rule r=Hywan a=Hywan

This PR fixes the items order when popped from the stack. It matches [the Wasm invocation rule](https://webassembly.github.io/spec/core/exec/instructions.html#invocation-of-function-address).

Not that it is more performant in our case, since we use the `drain` API rather than `drain` + `rev`.

Co-authored-by: Ivan Enderlin <ivan.enderlin@hoa-project.net>
2020-03-24 09:49:42 +00:00
Mark McCaskey
9829d97d7d Update Module::custom_sections to properly return multiples 2020-03-23 14:12:07 -07:00
Mark McCaskey
59bd6f6e86
Merge branch 'master' into feature/update-api 2020-03-23 14:07:02 -07:00
Mark McCaskey
9cdb49d22c
Merge branch 'master' into android 2020-03-23 13:29:18 -07:00
bors[bot]
e695ecbfd8
Merge #1288
1288: Update some dependencies manually, removing duplicate deps r=MarkMcCaskey a=MarkMcCaskey

Removes all duplicate deps (as seen by `cargo +stable tree -d`).  Primarily by updating `wasm-debug` but also by through updating some other dependencies.

Co-authored-by: Mark McCaskey <mark@wasmer.io>
2020-03-23 18:58:51 +00:00
Ivan Enderlin
a1f0a556e5 fix(interface-types) Use same stack order than Wasm invocation rule. 2020-03-23 14:34:57 +01:00
Ivan Enderlin
693b210638 fix(interface-types) Stack pops items in the same order than Wasm invocation rule. 2020-03-23 14:32:26 +01:00
YAMAMOTO Yuji
96a0f851c2
Update libc
The new version of libc contains changes necessary to build
wasmer-runtime-core for Android.

See https://github.com/rust-lang/libc/pull/1622 for details.
2020-03-23 11:55:32 +09:00
Yuji Yamamoto
b23436d1bb
🐛 Correct error message when trying to build on non-supported targets 2020-03-23 11:55:31 +09:00
Yuji Yamamoto
0df0a1cccb
Support Android
I'll send a PR after https://github.com/rust-lang/libc/pull/1622 is merged and released
2020-03-23 11:55:31 +09:00
bors[bot]
704c34283f
Merge #1320
1320: Support multiple custom sections with the same name r=MarkMcCaskey a=MarkMcCaskey

The spec doesn't disallow duplicates and the [JS API spec](https://webassembly.github.io/spec/js-api/index.html#dom-module-customsections) supports them.

# Review

- [ ] Add a short description of the the change to the CHANGELOG.md file


Co-authored-by: Mark McCaskey <mark@wasmer.io>
2020-03-21 00:15:24 +00:00
Mark McCaskey
844a572bca Rename new type fields from type_ to ty 2020-03-20 17:10:43 -07:00
nlewycky
30afd145e0
Merge branch 'master' into feature/llvm-mcg-no-builder 2020-03-20 12:27:48 -07:00
Nick Lewycky
f7d4f855a3 inkwell::Builder is a per-function notion, remove it from LLVMModuleCodeGenerator.
This also removes it from the API to generate trampolines, which makes sense because those produce new functions, so it can produce a new builder for the new function.
2020-03-20 12:26:15 -07:00
Mark McCaskey
248e06146a Support multiple custom sections with the same name 2020-03-20 11:27:23 -07:00
Mark McCaskey
da949f47a1 Improve Table implementation for API
This commit also leaves comments explaining the current state of
things so that when it's unblocked it can be finished and the API made public.
2020-03-20 11:15:10 -07:00
Heyang Zhou
d1e8674f8d
Merge branch 'master' into feature/singlepass-nan-cncl 2020-03-19 12:05:57 +08:00
Mark McCaskey
2dc3ea53eb Implement table getting and setting 2020-03-18 18:06:53 -07:00
Mark McCaskey
71be2c6763 Add getter to table and other misc changes 2020-03-18 15:33:34 -07:00
Jake Shadle
19ffd8ebb9 Fix warning (from clang) 2020-03-18 20:07:12 +01:00
Jake Shadle
9e389b9a5f Fix cross compilation
cfg!()/env!() are applied on the host platform during the build script's
build, the environment of the build script's execution is the proper way
to determine eg target_os
2020-03-18 20:06:55 +01:00
Jake Shadle
4de7deb568 Replace cmake with cc 2020-03-18 20:05:05 +01:00
losfair
c25ba627df Add comment for call argument list preprocessing. 2020-03-18 23:41:10 +08:00
Mark McCaskey
f864765298 Make trailing commas in imports! macro optional
We now use `,*` on the outside of a `$()` expression to match on
interspersed commas instead of trailing commas. To continue to handle
the trailing comma case, we optionally match on an extra comma at the
end with `$(,)?`.
2020-03-17 16:17:03 -07:00
Mark McCaskey
f4dc419b5e Add types and methods to provide updated API 2020-03-17 15:27:11 -07:00
losfair
8485ccc88c Update comment for nan_canonicalization. 2020-03-18 01:48:27 +08:00
losfair
29a431cfc7 Remove 4 spectest excludes that are no longer needed. 2020-03-18 01:43:05 +08:00
losfair
a9cd6d6814 Add aarch64 NaN canonicalization spectest excludes. 2020-03-18 01:16:18 +08:00
losfair
ea0cd7286e Cargo fmt 2020-03-18 01:03:55 +08:00
losfair
3a18b70d31 Merge remote-tracking branch 'origin/feature/singlepass-nan-cncl' into feature/singlepass-nan-cncl 2020-03-18 01:03:30 +08:00
losfair
86dde8cab2 Add missing movs. 2020-03-18 01:02:59 +08:00
Heyang Zhou
bfc3b8292c
Apply suggestions from code review
Co-Authored-By: nlewycky <nick@wasmer.io>
2020-03-18 00:58:50 +08:00
losfair
8e92e3208a Disable canonicalization for aarch64. 2020-03-18 00:47:52 +08:00
losfair
5e40be48a1 Merge remote-tracking branch 'origin/master' into feature/singlepass-nan-cncl 2020-03-18 00:43:52 +08:00
losfair
72bc9f6531 Add call canonicalization tests. 2020-03-18 00:42:19 +08:00
losfair
1d9f0c53e1 Style fixes and fix missing canonicalization at function call. 2020-03-18 00:42:10 +08:00
Heyang Zhou
5331a1c2e4
Merge branch 'master' into fix/dynamicfunc-panic 2020-03-17 19:02:20 +08:00
losfair
1ddf3a1c4e Add mem/local NaN tests. 2020-03-17 14:13:31 +08:00
losfair
e0538d32fa Remove clif spectest excludes. 2020-03-17 13:52:42 +08:00
losfair
4357c15046 Fix missing canonicalizations. 2020-03-17 13:52:11 +08:00
losfair
3ee7f43b1c Enable nan canonicalization for cranelift backend. 2020-03-17 13:09:22 +08:00
bors[bot]
c177c44aa2
Merge #1310
1310: upgrade the blake3 dependency to 0.2 r=MarkMcCaskey a=oconnor663

Version 0.2 makes assembly implementations available. They're off by default, and I haven't enabled them here, because they require the build machine to have a C toolchain installed. But if that's already a requirement for Wasmer, we could enable them with the `"c"` feature, for both better runtime performance and faster build times.

Co-authored-by: Jack O'Connor <oconnor663@gmail.com>
2020-03-16 21:49:54 +00:00
bors[bot]
de0578441b
Merge #1307
1307: Add FreeBSD specific failure excludes. r=MarkMcCaskey a=MikaelUrankar

These tests doesn't pass on FreeBSD amd64

Co-authored-by: MikaelUrankar <mikael.urankar@gmail.com>
Co-authored-by: Mark McCaskey <5770194+MarkMcCaskey@users.noreply.github.com>
2020-03-16 21:20:33 +00:00
Jack O'Connor
1cbafeb315 upgrade blake3 to version 0.2 2020-03-16 17:12:26 -04:00
Mark McCaskey
382e244f18
Merge branch 'master' into freebsd 2020-03-16 12:53:10 -07:00
Mark McCaskey
fac27c749b
Merge branch 'master' into feature/improved-wasitests 2020-03-16 12:46:24 -07:00
Mark McCaskey
228c5baa53
Fix typo in wasitest build.rs
Co-Authored-By: Syrus Akbary <me@syrusakbary.com>
2020-03-16 12:37:23 -07:00
Nick Lewycky
29b5223b3e Canonicalize NANs produced by f.trunc and f.nearby. 2020-03-16 11:36:17 -07:00
losfair
da07ed5011 Add clif/llvm NaN spectest failure excludes. 2020-03-16 23:40:28 +08:00
losfair
5d26d92d9b Add switch to turn on/off NaN canonicalization. 2020-03-16 23:40:02 +08:00
losfair
0f663887ad Handle panics from DynamicFunc. 2020-03-16 22:49:37 +08:00
losfair
8ea7bfd563 NaN canonicalization by tracking values. 2020-03-16 00:43:19 +08:00
Syrus
5e2488c1ea Fixed lint 2020-03-14 15:38:16 -07:00
Mark McCaskey
6a5efcda98 Update wasi-tests to test multiple versions of WASI
This change also cleans up the `wasi-test` generation a bit.  It's
actually still really, really messy, but at least now it's split up
into easier to understand chunks.

There's still a lot of low-hanging fruit in terms of improving the
readibilty and maintainability of the code.
2020-03-13 15:41:50 -07:00
Syrus Akbary
c01afac783
Merge pull request #1298 from Hywan/doc-interface-types
doc(interface-types) Update the state of supported instructions
2020-03-12 09:00:53 -07:00
Ivan Enderlin
03910a51fb Merge branch 'master' into feat-interface-types-better-error 2020-03-12 14:52:15 +01:00
Ivan Enderlin
b78a6f47ab chore(interface-types) Simplify code. 2020-03-12 14:51:18 +01:00
Ivan Enderlin
f46099c67b feat(interface-types) Implement Error on errors. 2020-03-12 14:49:43 +01:00
Ivan Enderlin
64729aa8f4 feat(interface-types) Use include ranges to read the memory. 2020-03-12 14:39:15 +01:00
Ivan Enderlin
20085e84a6 doc(interface-types) Update the state of supported instructions. 2020-03-12 13:57:57 +01:00
Syrus Akbary
7617350851
Merge branch 'master' into fix/fpcc-workaround 2020-03-11 21:51:31 -07:00
bors[bot]
7b97b8abb7
Merge #1289
1289: Enable `DynamicFunc` for closures with captured environment. r=syrusakbary a=losfair

Previously we disabled `DynamicFunc` for any non-zero-sized closures to leave space for future changes. However this feature is critical for applications that needs to bring context with host functions, like integrations with dynamic lauguages. So it might be good to enable it.

A question left is: should we put this behind a feature flag or enable it by default?

@Hywan @syrusakbary 

Co-authored-by: losfair <zhy20000919@hotmail.com>
2020-03-12 04:25:34 +00:00
Mark McCaskey
fffdba395d Prepare for 0.16.2 release 2020-03-11 19:15:31 -07:00
Mark McCaskey
c3865c919c Allow zero length arrays and check base offset for being out of bounds 2020-03-11 19:10:15 -07:00
Mark McCaskey
dc9cc3292c Prepare for 0.16.1 release 2020-03-11 16:00:21 -07:00
losfair
6c7f49a223 Put fat DynamicFuncs behind a feature flag. 2020-03-12 03:14:57 +08:00
Mark McCaskey
aaab59f69c Update deps in llvm and singlepass too 2020-03-11 12:00:36 -07:00
losfair
5edd1b5ab7 Enable DynamicFunc for closures with environment. 2020-03-12 02:58:36 +08:00
losfair
9930d54aaa Merge remote-tracking branch 'origin/fix/fpcc-workaround' into fix/fpcc-workaround 2020-03-12 02:53:19 +08:00
Mark McCaskey
ac3d9a37ae Update some dependencies manually, removing duplicate deps 2020-03-11 11:52:43 -07:00
losfair
fc9f1bc8b3 Merge remote-tracking branch 'origin/master' into fix/fpcc-workaround 2020-03-12 02:51:40 +08:00
losfair
adabfa02b0 Move feed_* into closures. 2020-03-12 02:51:22 +08:00
Mark McCaskey
d7d5f5b894 Prepare for 0.16.0 release 2020-03-11 11:15:07 -07:00
Ivan Enderlin
7d6bc577b7 feat(interface-types) Reformat the instructions. 2020-03-10 17:49:35 +01:00
Ivan Enderlin
f0c97a1b81 feat(interface-types) Use better errors.
The new `errors` module contains structure to represent errors,
instead of using basic strings. The first usage is in the interpreter
itself.
2020-03-10 17:49:35 +01:00
Ivan Enderlin
c1e40f165e fix: Revert a file that wasn't a commit candidate. 2020-03-10 15:58:27 +01:00
Ivan Enderlin
52312ff0ad feat(interface-types) Remove the 'input lifetime on Instruction. 2020-03-10 10:37:09 +01:00
Ivan Enderlin
717914f82b Merge branch 'master' into feat-interface-types-instructions-string-and-memory 2020-03-10 10:33:56 +01:00
Ivan Enderlin
e9de8f9999 feat(interface-types) write-utf8 is renamed string-to-memory. 2020-03-10 10:27:17 +01:00
Ivan Enderlin
1b0bda82dd feat(interface-types) Rename write-utf8 to string-to-memory. 2020-03-10 10:25:58 +01:00
Heyang Zhou
e521dfe8c1
Fix typo (2)
Co-Authored-By: nlewycky <nick@wasmer.io>
2020-03-10 12:38:55 +08:00
Heyang Zhou
cfbcd886d0
Fix typo (1)
Co-Authored-By: nlewycky <nick@wasmer.io>
2020-03-10 12:38:39 +08:00
losfair
3e63f1aaa9 Deprecate wasmer_trampoline_buffer_builder_add_callinfo_trampoline. 2020-03-10 12:37:40 +08:00
losfair
7d2d89b606 Resolve review comments. 2020-03-10 12:28:54 +08:00
losfair
7e2ede3960 Fix floating point return values. 2020-03-10 03:16:22 +08:00
losfair
fc114ac671 Merge remote-tracking branch 'Hywan/test-runtime-core-polymorphic-host-functions' into fix/fpcc-workaround 2020-03-10 02:47:00 +08:00
losfair
65962f0186 Add a translation layer before import call in singlepass. 2020-03-10 02:46:13 +08:00
losfair
79613e42d7 Prettier format panic message in spectest. 2020-03-10 02:45:31 +08:00
bors[bot]
674d18ed66
Merge #1281
1281: feat(interface-types) Rename `call` to `call-core`, and remove `call-export` r=syrusakbary a=Hywan

The latest standard removes `call-export` and has a single `call-core` instruction.

Co-authored-by: Ivan Enderlin <ivan.enderlin@hoa-project.net>
2020-03-09 18:03:28 +00:00
losfair
3ff3554345 Merge remote-tracking branch 'origin/master' into fix/fpcc-workaround 2020-03-10 01:29:15 +08:00
Ivan Enderlin
39d491e465 feat(interface-types) read-utf8 is renamed memory-to-string. 2020-03-09 15:06:35 +01:00
Ivan Enderlin
3cc4c6142c doc(interface-types) Improve the README.md. 2020-03-09 14:53:11 +01:00
Ivan Enderlin
637ff1e316 feat(interface-types) Rename call to call-core, and remove call-export. 2020-03-09 14:33:17 +01:00
bors[bot]
b292292267
Merge #1262
1262: Update to latest inkwell which adds context lifetime to basic blocks. r=nlewycky a=nlewycky

The latest inkwell adds lifetimes to basic blocks and also changes most APIs to pass them without reference.

Co-authored-by: Nick Lewycky <nick@wasmer.io>
2020-03-06 22:51:22 +00:00
Mark McCaskey
f8d34e0b57 Add WasmPtr access edge case test 2020-03-05 15:08:09 -08:00
Mark McCaskey
eb4c1bdace Prevent 0 length utf8 strings from WasmPtr too 2020-03-05 13:31:37 -08:00
Mark McCaskey
1c6424a754 Fix WasmPtr to work with accesses accessing the final valid byte
This also returns `None` for all accesses of zero sized types and
arrays of length 0.  Because the array accesses have a non-inclusive
length, length of 0 is not valid.  These checks prevent returning
empty slices that point just outside of memory bounds.
2020-03-05 13:23:50 -08:00
losfair
e62095da5d runtime-core: Move ArgumentRegisterAllocator into state. 2020-03-06 00:37:48 +08:00
losfair
a5de17fb18 runtime-core: Correctly allocate floating point registers for trampolines. 2020-03-05 22:49:58 +08:00
Ivan Enderlin
4d3e8ee117 test(runtime-core) Test polymorphic host functions with more types. 2020-03-05 14:17:04 +01:00
Mark McCaskey
c295adbaa8 Prepare for 0.15.0 release 2020-03-04 12:26:19 -08:00
Mark McCaskey
69fd76af10 Improve support for preopened directories in WASI syscalls
Also filters our default logging more and improves some debug statements
2020-03-04 11:51:24 -08:00
bors[bot]
b2e6535aa0
Merge #1264
1264: feat(interface-types) Implement lifting and lowering instructions r=Hywan a=Hywan

For the moment, WIT defines [a bunch of lifting and lowering instructions](https://github.com/WebAssembly/interface-types/blob/master/proposals/interface-types/working-notes/instr.md). The encoders, the decoders and the AST support them, but we didn't have any instruction implementations for them. This PR implements the instructions for real.

To handle casting failure, I decided to use the `TryFrom` trait, instead of `as`, such as:

```rust
let x: i32 = 128;
let y: i8 = x.try_into().unwrap(); // fails
```

while:

```rust
let x: i32 = 128;
let y: i8 = x as _; // just overflows silently
```

Not all `*x` instructions aren't implement _yet_.

Co-authored-by: Ivan Enderlin <ivan.enderlin@hoa-project.net>
2020-03-04 13:43:33 +00:00
Mark McCaskey
4a6c96382d Update wording of doc comment from feedback 2020-03-03 17:04:52 -08:00
Mark McCaskey
469e43312a Improve WasmPtr documentation 2020-03-03 16:16:29 -08:00
losfair
f499dea0a7 Merge remote-tracking branch 'origin/master' into feature/polymorphic-v2 2020-03-04 01:56:52 +08:00
losfair
d9e744d9dc Resolve review comments. 2020-03-04 01:56:48 +08:00
Ivan Enderlin
de53659ee7 feat(interface-types) Implement s64-to-i32x and u64-to-i32x
Actually, `s64-to-i32` and `u64-to-i32` already error when overflow
happens.
2020-03-03 17:17:26 +01:00
Ivan Enderlin
c157bdaf63 test(interface-types) Test when lowering or lifting fails because of the value. 2020-03-03 17:10:10 +01:00
Ivan Enderlin
6576dfd64b test(interface-types) Add test cases for errors. 2020-03-03 17:04:26 +01:00
Ivan Enderlin
30e72eb796 feat(interface-types) Implement lifting and lowering instructions. 2020-03-03 16:57:05 +01:00
MikaelUrankar
da04dab436 Add FreeBSD specific failure excludes. 2020-03-03 12:13:56 +01:00
Nick Lewycky
3e0d299227 Update to latest inkwell which adds context lifetime to basic blocks. 2020-03-02 14:25:30 -08:00
bors[bot]
115a6573a9
Merge #1261
1261: Fix our side of wasmparser typo. r=MarkMcCaskey a=nlewycky

This is a `cargo update` plus change to fix for ac6df05378 .


Co-authored-by: Nick Lewycky <nick@wasmer.io>
2020-03-02 21:53:13 +00:00
Nick Lewycky
d5581331a2 Fix our side of wasmparser typo. 2020-03-02 11:16:21 -08:00
MikaelUrankar
48fcc8af09 Recognize FreeBSD 2020-03-02 15:41:41 +01:00
Syrus
7a88a320c7 Allow / in mapdir wasm path 2020-02-29 08:47:25 -08:00
Syrus
3f456db4ad Updated headers 2020-02-29 08:45:48 -08:00
losfair
d443ad8d40 Remove outdated comment. 2020-02-29 11:15:09 +08:00
losfair
4012645aee Fix CodeMemory doc comments. 2020-02-29 11:13:34 +08:00
bors[bot]
85a3bb7148
Merge #1244
1244: feat(interface-types) Update to last standard version r=MarkMcCaskey a=Hywan

WIP

Co-authored-by: Ivan Enderlin <ivan.enderlin@hoa-project.net>
2020-02-28 18:35:28 +00:00
losfair
2ddf9ad4c8 Disallow "fat" closures. 2020-02-28 22:16:29 +08:00
losfair
6516243e8a Merge remote-tracking branch 'origin/master' into feature/polymorphic-v2 2020-02-28 11:54:13 +08:00
losfair
31a72e59fb Rename ErasedFunc to DynamicFunc and fix leaky PolymorphicContext. 2020-02-28 11:41:36 +08:00
Mark McCaskey
91808b9df2 Update test-rest to explicitly test each crate 2020-02-27 14:22:26 -08:00
losfair
32915f0077 Merge remote-tracking branch 'origin/master' into feature/polymorphic-v2 2020-02-27 23:49:10 +08:00
Mark McCaskey
0593965459 Make gdb jit symbol weak linking default in llvm-backend features 2020-02-26 19:41:53 -08:00
Mark McCaskey
b5cbb9df60 Fix test and build for musl 2020-02-26 19:07:30 -08:00
Mark McCaskey
dbb2ececf8 Work around unstable linkage attribute 2020-02-26 18:32:40 -08:00
Mark McCaskey
a089cf5a0c Link GDB JIT exposed global and fn as "linkonce"
This is required because LLVM exposes its own
2020-02-26 18:05:24 -08:00
Mark McCaskey
3691c80b7d Add generate_debug_info field to test 2020-02-26 17:29:18 -08:00
Mark McCaskey
56e47c17b0 Revert Wasm parsing to improved old style, fixing singlepass 2020-02-26 16:35:25 -08:00
Mark McCaskey
cb20cd9b2d Merge branch 'master' into feature/debug-prototype2 2020-02-26 14:39:02 -08:00
Mark McCaskey
a8b4f2a1e4 Update clif option string, fix table parsing to match AnyFunc 2020-02-26 13:25:41 -08:00
Mark McCaskey
0a92d9c65e Update LLVM backend to wasmparser 0.51.3 2020-02-26 13:07:31 -08:00
Mark McCaskey
21fd95d760 Update wasmparser to 0.51.3 and clif forks to 0.59 2020-02-26 12:51:56 -08:00
Ivan Enderlin
c0933c52ca feat(interface-types) Fix clippy errors and warnings. 2020-02-26 17:02:52 +01:00
Ivan Enderlin
bff63e3fad Merge branch 'master' into feat-interface-types-update-to-last-standard-version 2020-02-26 16:22:56 +01:00
Ivan Enderlin
4e82d59ea1 feat(interface-types) Implement lifting and lowering instructions.
List from https://github.com/WebAssembly/interface-types/blob/master/proposals/interface-types/working-notes/instr.md.
2020-02-26 16:20:39 +01:00
Ivan Enderlin
f951b6aa53 feat(interface-types) Remove abandonned instructions. 2020-02-26 15:48:00 +01:00
Ivan Enderlin
350a30507f fix(interface-types) arg.get's index is of type u32. 2020-02-26 15:42:29 +01:00
Ivan Enderlin
3653c42e23 test(interface-types) Test adapter to binary. 2020-02-26 15:38:59 +01:00
Ivan Enderlin
4b7cd3a875 doc(interface-types) Fix a typo. 2020-02-26 15:34:04 +01:00
Ivan Enderlin
45283d4f52 test(interface-types) Fix all tests based on previous commits. 2020-02-26 15:32:14 +01:00
losfair
eb89720d5a Merge remote-tracking branch 'origin/feature/polymorphic-v2' into feature/polymorphic-v2 2020-02-26 17:09:10 +08:00
losfair
b0877b26e5 Add safety notice for TrampolineBufferBuilder::remove_global. 2020-02-26 17:07:56 +08:00
Heyang Zhou
a438a644b6
fold() -> sum()
Co-Authored-By: Ivan Enderlin <ivan.enderlin@wanadoo.fr>
2020-02-26 17:01:36 +08:00
Heyang Zhou
292e42addc
Update lib/runtime-core/src/typed_func.rs
Co-Authored-By: Ivan Enderlin <ivan.enderlin@wanadoo.fr>
2020-02-26 17:01:16 +08:00
losfair
262d431b49 Remove unneeded allow(dead_code). 2020-02-26 16:59:31 +08:00
losfair
a0ea1af71f Remove pub(self). 2020-02-26 16:54:33 +08:00
losfair
96d9e39913 Specify imports instead of using a *. 2020-02-26 13:40:02 +08:00
Mark McCaskey
52d4dac450 Rename feed_event's loc to source_loc 2020-02-25 17:15:17 -08:00
Mark McCaskey
6f5ebb564c Allow building clif-backend without wasm-debug 2020-02-25 17:08:09 -08:00
losfair
40d823e298 Merge remote-tracking branch 'origin/master' into feature/polymorphic-v2 2020-02-26 01:45:18 +08:00
losfair
80f824e708 Auto-release trampolines. 2020-02-26 01:45:11 +08:00
losfair
b7c9c1843a Add dynamic executable memory allocation & tests to trampolines. 2020-02-26 01:44:50 +08:00
Mark McCaskey
ce21910077 Prepare for 0.14.1 release
0.14.1 differs from 0.14.0 primarily in that the GNU/Linux build is
built on Ubuntu 16.04 instead of 18.04, meaning we'll use an earlier
version of GLIBC.
2020-02-24 13:20:12 -08:00
losfair
b67acbc0e3 Add ErasedFunc for type-erased functions. 2020-02-25 01:19:19 +08:00
Ivan Enderlin
0c5d46eec9 feat(interface-types) Re-implement interface kinds.
Adopt a flat structure: Flat resolved imports, flat resolved exports,
flat resolved types etc.

Also, use the latest textual format for adapters & co.
2020-02-24 18:12:01 +01:00
losfair
2020901d75 Merge remote-tracking branch 'origin/master' into feature/polymorphic-v2 2020-02-25 00:56:46 +08:00
Ivan Enderlin
c64febdad6 feat(interface-types) Re-implement Type.
The semantics of “types” have changed since the previous draft. Now, a
type is like a regular WebAssembly type but with Interface Types.
2020-02-24 16:23:31 +01:00
Ivan Enderlin
d1ed647efc feat(interface-types) Forwarded adapters have been removed. 2020-02-24 15:56:11 +01:00
Ivan Enderlin
8538e3be33 feat(interface-types) The “helper adapter” has been removed. 2020-02-24 15:49:03 +01:00
Ivan Enderlin
ac68325cc9 feat(interface-types) Update interface types.
According to the last working notes, new interface types are s8, s16,
s32, s64, u8, u16, u32, u64, f32, f64, string, anyref, i32, and i64.

Their binary reprensentations are changing too, from 0x00 to 0x0d.
2020-02-24 15:37:03 +01:00
Mark McCaskey
d7fca539c1 Make JitCodeDebugInfoEntryHandleInner Send and Sync 2020-02-21 15:10:58 -08:00
Mark McCaskey
40e4dddc4b Add updates from feedback
Co-authored-by: Ivan Enderlin <ivan.enderlin@wanadoo.fr>
2020-02-21 14:33:32 -08:00
Nick Lewycky
a56660bfe9 Remove LLVMModuleCodeGenerator::signatures_raw which is a clone of a mapping available in ModuleInfo. 2020-02-21 13:31:49 -08:00
Nick Lewycky
642e6c3db1 Fix typo in comment. 2020-02-21 11:44:31 -08:00
losfair
f717d4c779 Merge remote-tracking branch 'origin/master' into feature/spectest-check-excluded 2020-02-22 01:26:10 +08:00
losfair
f2084982d4 Make excludes more specialized. 2020-02-22 01:25:14 +08:00
Ivan Enderlin
6b667805d7
Merge branch 'master' into doc-readme-logo 2020-02-21 13:41:35 +01:00
Ivan Enderlin
1e52d4b9b2 doc(readme) Fix logo. 2020-02-21 13:39:43 +01:00
Ivan Enderlin
48f8823879 Merge branch 'master' into feat-interface-types-decoders-wat 2020-02-21 12:24:52 +01:00
Ivan Enderlin
80d0b5116f doc(interface-types) Add intra links. 2020-02-21 12:23:58 +01:00
Ivan Enderlin
0afd308c44 feat(interface-types) Add the parse public API.
Also rename `kw` to `keyword`.
2020-02-21 12:23:20 +01:00
Mark McCaskey
3d6e915108
Merge branch 'master' into feature/debug-prototype2 2020-02-20 17:48:02 -08:00
Mark McCaskey
7c5f8251e3 Flatten tuple in return type, conditionally remove more jit debug code 2020-02-20 16:59:59 -08:00
Mark McCaskey
1374bf0806 Prepare for 0.14.0 release 2020-02-20 13:15:29 -08:00
Mark McCaskey
0ec08b5bbd Add updates from feedback 2020-02-20 13:06:50 -08:00
losfair
3fa62461e6 Specify excludes separately for linux/macos singlepass. 2020-02-21 03:47:17 +08:00
losfair
456d2dc2a8 Match against both target OS and family. 2020-02-21 03:47:01 +08:00
Syrus
aa0f33203c Reuse doc file for capi docs 2020-02-20 11:24:54 -08:00
losfair
c1f1a82854 Check for unused excludes. 2020-02-21 03:23:44 +08:00
Mark McCaskey
65a9e04f3c Add updates from feedback
Co-authored-by: Nick Lewycky <nick@wasmer.io>
2020-02-20 11:20:40 -08:00
Ivan Enderlin
2ef13cdc81 fix(interface-types) Remove #[allow(unused)]. 2020-02-20 15:16:35 +01:00
Ivan Enderlin
5e00153d29 feat(interface-types) Decode instructions in WIT's text format. 2020-02-20 15:13:11 +01:00
Ivan Enderlin
cda53a57b5 feat(interface-types) Replace nom by wast for decoding WIT's text format. 2020-02-20 14:43:58 +01:00
Syrus Akbary
8933f3208e
Merge branch 'master' into feature/release-capi 2020-02-19 19:03:57 -08:00
Syrus
edeabd419b Add links for API Docs 2020-02-19 18:58:22 -08:00
Syrus
40fb54c58f Improved Wasmer C API artifacts 2020-02-19 18:54:32 -08:00