Lachlan Sneff
276e5125b5
Filter out -fno-exceptions from llvm-config --cxxflags
2019-03-05 13:23:26 -08:00
Lachlan Sneff
c86c910054
Add partiality to float truncation
2019-03-05 11:50:56 -08:00
Ivan Enderlin
8ed340b6f1
fix(runtime-c-api) Update cbindgen
.
...
When requiring `wasmer-runtime-c-api`, I get the following conflicts:
```
error: failed to select a version for `serde_derive`.
... required by package `cbindgen v0.7.1`
... which is depended on by `wasmer-runtime-c-api v0.2.1`
... which is depended on by `foo v0.1.0 (/private/tmp/foo)`
versions that meet the requirements `= 1.0.58` are: 1.0.58
all possible versions conflict with previously selected packages.
previously selected package `serde_derive v1.0.89`
... which is depended on by `wasmer-runtime-core v0.2.1`
... which is depended on by `wasmer-runtime-c-api v0.2.1`
... which is depended on by `foo v0.1.0 (/private/tmp/foo)`
failed to select a version for `serde_derive` which could resolve this conflict
```
This issue resolves by updating `cbindgen` to 0.8.
2019-03-05 14:28:35 +01:00
Ivan Enderlin
25feef7384
chore(runtime-c-api) Regenerate the header files.
2019-03-05 10:07:08 +01:00
Ivan Enderlin
86c41264a3
chore(runtime-c-api) Fix CS.
2019-03-05 10:07:08 +01:00
Ivan Enderlin
59de57e075
fix(runtime-c-api) Fix Clippy notes.
...
This patch fixes warnings raised by Clippy.
2019-03-05 10:07:08 +01:00
Ivan Enderlin
053e5c40f4
fix(runtime-c-api) Avoid mutable bindings as much as possible.
...
This patch cleans several warnings where mutable bindings are declared
but used only as immutable bindings.
It's a little bit opinionated patch. I think it's interesting to use
`const` pointers as much as possible.
2019-03-05 10:07:08 +01:00
Ivan Enderlin
5ace3cfa2b
fix(runtime-c-api) Remove unsafe blocks inside unsafe function.
...
This patch removes `unsafe { … }` blocks inside `unsafe` functions.
This patch also removes some warnings about camel case. All structures
with a C representation are automatically not mangle, and allow non
camel case.
2019-03-05 10:07:08 +01:00
Lachlan Sneff
f2b927bcd8
Remove debug print
2019-03-04 20:00:56 -08:00
Lachlan Sneff
fe8f8a0132
Add illegal arithmetic runtime error
2019-03-04 19:56:02 -08:00
Lachlan Sneff
3be7144892
Some cleanup
2019-03-04 17:37:05 -08:00
Lachlan Sneff
2969409ca7
Add hacky reinterpret instructions and pop used arguments off the value stack
2019-03-04 16:44:46 -08:00
Lachlan Sneff
25c0cef5f7
Up to 1242 passing spectests
2019-03-04 15:51:45 -08:00
Lachlan Sneff
7ef2c0dece
Fix execute after free issue with llvm (and presumably cranelift?)
2019-03-04 14:41:56 -08:00
Mackenzie Clark
84c8be6b33
Merge branch 'master' into feature/emscripten-for-bundling
2019-03-04 13:16:01 -08:00
Lachlan Sneff
039ebdcf75
Fix merge errors and update llvm to use the new runtime error type.
2019-03-04 13:10:28 -08:00
Lachlan Sneff
4e198bca8b
merge upstream/master into wasmer-private/feature/llvm-backend
2019-03-04 13:03:32 -08:00
Lachlan Sneff
65ec10961b
Change RuntimeError type ( #234 )
...
* Change RuntimeError type and fix codebase to use it
* Fix spectests to work with new runtime error type
* Fix windows signal handler in the clif-backend
* Add missing conversion
* final windows fix
2019-03-04 12:57:26 -08:00
Mackenzie Clark
970758dd69
Merge branch 'master' into feature/emscripten-for-bundling
2019-03-04 12:51:12 -08:00
Syrus Akbary
2d987982d6
Merge pull request #231 from Hywan/fix-clif-backend-module-new
...
fix(clif-backend) `Module::new` does not use its argument
2019-03-04 11:42:36 -08:00
Syrus Akbary
c1400d8c85
Merge pull request #227 from wasmerio/fix/c-api-fix-imports
...
Fix C API table/global/memory imports
2019-03-04 11:41:37 -08:00
Lachlan Sneff
deea9e98a4
Add import names, whoops.
2019-03-04 10:19:38 -08:00
Mackenzie Clark
b3c60bce14
Merge branch 'master' into fix-clif-backend-module-new
2019-03-04 08:14:44 -08:00
Mackenzie Clark
71d7fe7d08
Merge branch 'master' into fix/c-api-fix-imports
2019-03-04 08:14:14 -08:00
Mackenzie Clark
4eb6ad238e
lint
2019-03-04 08:11:36 -08:00
Mackenzie Clark
65100d19fc
add __exit
2019-03-04 08:10:37 -08:00
Mackenzie Clark
00e3ec1446
add execvp
2019-03-04 08:10:37 -08:00
Mackenzie Clark
2ea9d0b09b
add __syscall42 (pipe)
2019-03-04 08:10:37 -08:00
Mackenzie Clark
cf2909f5f3
add alternative assert function for emscripten
2019-03-04 08:10:37 -08:00
Mackenzie Clark
ddc385a4ac
git ignore vscode directory
2019-03-04 08:10:37 -08:00
Syrus Akbary
ba8b7580ba
Merge pull request #230 from Hywan/fix-clif-backend-resolver-compiled-functions
...
fix(clif-backend) Remove an unused variable declaration
2019-03-04 08:10:11 -08:00
Syrus Akbary
436c4bffcb
Merge pull request #228 from Hywan/fix-runtime-core-unused-import
...
fix(runtime-core) Remove an unused import
2019-03-04 07:13:21 -08:00
Syrus Akbary
133203897b
Merge pull request #229 from Hywan/fix-runtime-core-mut-variable
...
fix(runtime-core) `hasher` does not need to be mutable
2019-03-04 06:50:45 -08:00
Ivan Enderlin
5744f6896f
fix(clif-backend) Module::new
does not use its argument.
...
The `Module::new` method requires an argument (`wasm: &[u8]`) that is
never used.
This patch removes the argument, and updates the code accordingly.
2019-03-04 14:03:07 +01:00
Ivan Enderlin
42c9bdf8c2
fix(clif-backend) Remove an unused variable declaration.
...
The `compiled_functions` variable is declared twice. The first
declaration is never used. This patch removes it.
2019-03-04 13:59:37 +01:00
Ivan Enderlin
d9073c03c6
fix(runtime-core) hasher
does not need to be mutable.
...
This patch updates the `hasher` variable. It is declared as mutable,
but it's never mutated.
2019-03-04 13:53:41 +01:00
Ivan Enderlin
ec4e476cc6
fix(runtime-core) Remove an unused import.
...
This patch removes an unused import, namely `crate::sys::Memory`.
2019-03-04 13:51:13 +01:00
Lachlan Sneff
3f9dbca17f
List specific supported features for validator.
2019-03-03 22:47:34 -08:00
Lachlan Sneff
ab550f46fc
Fix bug resulting from comparing the memory base instead of the memory offset to the memory bounds.
2019-03-03 22:11:40 -08:00
Lachlan Sneff
ae3b2b2a42
Add bounds checking for memory accesses on dynamic memories
2019-03-03 21:56:30 -08:00
Lachlan Sneff
87c453a0ec
Add check for table bounds on call_indirect.
2019-03-03 21:38:35 -08:00
Lachlan Sneff
801979c40d
Add dynamic sigindices to the vm context.
2019-03-03 21:26:34 -08:00
Lachlan Sneff
51cf9dde05
Move SSA value caches to the entry block.
...
The supporting framework around LLVM will make sure to only compute values once if they
are known to never change. Previously, these values were attempted to be reused from places where
the users may not dominate the creation of the value. To avoid that, they are always created
in the entry block now.
2019-03-03 21:13:37 -08:00
Brandon Fish
c07298e58e
Make capstone optional with a feature
2019-03-03 16:02:20 -06:00
Brandon Fish
aae256b407
Add tag to fix cast ptr lint error
2019-03-03 15:34:20 -06:00
Brandon Fish
3f345b41c2
Fix emscripten lib compilation
2019-03-03 15:18:16 -06:00
Brandon Fish
97a70327d0
Fix compilation of test example
2019-03-03 15:13:20 -06:00
Brandon Fish
2c765c87c5
Update locals reading to use count
2019-03-03 12:55:29 -06:00
Lachlan Sneff
e362b56b07
Turns out we can just throw an exception from the signal handler
...
without any fancy tricks.
This has been tested on macos, hopefully it works on linux too.
2019-03-03 02:15:53 -08:00
Brandon Fish
2077fb448a
Fix C API table/global/memory imports
2019-03-02 22:28:00 -06:00