Commit Graph

3147 Commits

Author SHA1 Message Date
9e2080def1 Run cargo fmt. 2020-01-10 02:54:50 +08:00
0a23327401 Emit exception table in singlepass. 2020-01-10 02:54:23 +08:00
4b5b8976e9 Serialize/deserialize exception codes. 2020-01-10 02:53:08 +08:00
b08b65913b Add WindowClosed event to experimental fb 2020-01-09 12:11:34 -05:00
c81e49a091 feat(runtime-core) Replace missing host function by always_trap. 2020-01-09 15:12:09 +01:00
6018aa32e1 fix(runtime-core) Drop vm::FuncCtx if not null. 2020-01-09 15:11:51 +01:00
19c3837881 feat(runtime-core) Create the always_trap host function. 2020-01-09 15:10:53 +01:00
cd6e4bdaee test(runtime) Fix CS. 2020-01-09 15:10:23 +01:00
f48a74e44a Set default scale on fb window to fit screen 2020-01-09 06:48:03 -05:00
7b6d8993e1 chore(runtime-c-api) Update C/C++ headers. 2020-01-09 10:17:34 +01:00
67b684ac85 feat(runtime-c-api) Improve DEPRECATED compatibility.
Clang can emulate GNUC or MSVC behaviors. So instead of detecting
whether Clang is used to compile the code, it's better to detect the
targeted features are available.

Code proposed by @nlewycky, thanks!
2020-01-09 10:13:22 +01:00
f44517b9fb Look up exception tables in trap handler. 2020-01-09 01:42:50 +08:00
5c15ff9673 ExceptionCode and ExceptionTable. 2020-01-09 01:42:21 +08:00
4f691dde17 chore(runtime-c-api) Update headers. 2020-01-08 15:25:48 +01:00
b31a3dcdec feat(runtime-c-api) Define the DEPRECATED macro.
This PR defines a cross-compiler `DEPRECATED(message)` macro. It must
be used as follows in Rust:

```rust
/// This is a documentation.
/// cbindgen:prefix=DEPRECATED(This is a deprecation message.")
pub extern "C" fn wasmer_foo() -> c_uint {
    42
}
```

It will generate the following C header:

```c
/**
 * This is a documentation.
 */
DEPRECATED("This is a deprecation message.")
unsigned int wasmer_foo();
```

And once this code is used by a C compiler, it will print something
like this (example from Clang):

```
…/test.c:…:…: error: 'wasmer_foo' is deprecated: This is a deprecation message. [-Werror,-Wdeprecated-declarations]
    unsigned int x = wasmer_foo();
                     ^
…/wasmer.h:…:…: note: 'wasmer_foo' has been explicitly marked deprecated here
DEPRECATED("This is a deprecation message.")
^
…/wasmer.h:…:…: note: expanded from macro 'DEPRECATED'
```

This is required for further deprecations.
2020-01-08 15:02:57 +01:00
078242b55b Add test for ImportObject's allow_missing_functions 2020-01-07 12:04:50 -05:00
d544f5a80f Run formatting 2020-01-07 16:14:58 +01:00
59945a8875 Use detault 2020-01-07 16:13:33 +01:00
3b9cdc396d Recovered deleted tests 2020-01-07 16:13:33 +01:00
8cff1adf5c Fix wasmer binary 2020-01-07 16:12:39 +01:00
d36d883528 Fix lint 2020-01-07 16:12:39 +01:00
e57677b63f Make cranelift optional for middleware 2020-01-07 16:12:39 +01:00
ac0c5c93ce Fixed lint 2020-01-07 16:12:39 +01:00
71be5bea16 Improved syntax 2020-01-07 16:12:39 +01:00
18421e3623 Make all tests pass 2020-01-07 16:12:39 +01:00
d7154fe791 Remove Backend dependency 2020-01-07 16:12:39 +01:00
d4e964519d Move requires pre validation into the ModuleCodeGenerator 2020-01-07 16:10:46 +01:00
303d44cb0f Remove backend code 2020-01-07 16:10:46 +01:00
0274668675 doc(runtime-c-api) Fix a typo. 2020-01-07 14:21:50 +01:00
81f879565d Add MIT license to crates that were missing it
Ran into a few crates in this repo with our license scanner that didn't have any license attached to them.

Added MIT to be consistent with the other crates. Please adjust if not correct.
2019-12-22 12:28:33 +01:00
1cffb90fea Fix unused import warning, deny more warnings. 2019-12-21 14:35:43 -08:00
ad82beffb4 Fixed tests 2019-12-20 21:11:55 -08:00
a7764a6fd6 Simplified code 2019-12-20 20:49:32 -08:00
1a960a01ae Improved lint 2019-12-20 20:45:10 -08:00
c4d70a6b75 Use Arc instead of Rc 2019-12-20 20:37:47 -08:00
097353d0d4 Fix lint 2019-12-20 19:20:32 -08:00
0f45bd4f0d Fixed tiering docs 2019-12-20 19:12:35 -08:00
c143bc8fc8 Revert emscripten changes 2019-12-20 19:09:07 -08:00
2404203ae4 Improved based on feedback 2019-12-20 19:03:49 -08:00
527d7072b3 Remove unsafe transmute copy 2019-12-20 18:52:30 -08:00
294cc28135 Move inline breakpoint outside of runtime backend
There was some code smell leaking inline breakpoint implementation into the runtime core backend instead of the compiler itself
2019-12-20 18:26:56 -08:00
0419df937e Merge #1095
1095: Update to cranelift 0.52 r=nlewycky a=nlewycky

# Description
Update to cranelift 0.52.

To use our wasmer branch of cranelift, we point to its path on git. Per @syrusakbary , we don't want to push updated wasmer-clif crates until we're ready to release the matching wasmer that will use them.

# Review

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


Co-authored-by: Nick Lewycky <nick@wasmer.io>
Co-authored-by: Mark McCaskey <mark@wasmer.io>
2019-12-21 01:45:45 +00:00
fe969be612 Update wasmparser to version 0.45.0 2019-12-20 17:16:54 -08:00
8cddea341b Update to 0.45.0 wasmparser Operator names in llvm-backend 2019-12-20 17:16:54 -08:00
adecb36d15 Update to 0.45.0 wasmparser Operator names in singlepass-backend 2019-12-20 17:15:38 -08:00
c2f287e65b Update to cranelift 0.51. 2019-12-20 17:10:36 -08:00
d5d82e2508 Merge #1096
1096: Add TBAA labels to initialization (default and copy) of locals. r=nlewycky a=nlewycky



Co-authored-by: Nick Lewycky <nick@wasmer.io>
2019-12-21 01:06:23 +00:00
cca73c0a6f Add TBAA labels to initialization (default and copy) of locals. 2019-12-20 17:02:58 -08:00
bba0129150 Remove comments with register names that might not be right and don't really matter. 2019-12-20 16:20:58 -08:00
e738a9f2b5 Name the magic constants in the singlepass backend. 2019-12-20 16:20:58 -08:00