Commit Graph

2814 Commits

Author SHA1 Message Date
89d8b5a41c Fixes for aarch64. 2019-09-28 17:31:10 +08:00
871310a851 Improve docs from feedback 2019-09-27 10:15:40 -07:00
dc1744560c Add lots of rustdocs and clean up one line of code 2019-09-26 17:17:50 -07:00
008a1d7369 Update to published cranelift fork version 0.44.0 2019-09-26 08:43:12 -05:00
9fdaf0cd4f chore(cargo) Remove patches from version contraints. 2019-09-26 15:05:22 +02:00
87f61ab226 feat(interface-types) Add attributes. 2019-09-26 15:02:20 +02:00
63b13914c3 feat(interface-types) Let the type inference engine do the work. 2019-09-26 14:37:29 +02:00
a047e68ad0 Merge branch 'master' into feat-interface-types 2019-09-26 14:28:00 +02:00
c35395bd94 feat(interface-types) Rename a variable. 2019-09-26 14:18:30 +02:00
f537b4dfa3 chore(interface-types) Simplify the executable_instruction macro. 2019-09-26 14:17:43 +02:00
fce270a8e7 feat(interface-types) Split the interpreter into multiple modules/files. 2019-09-26 14:14:46 +02:00
c69cdeca9b Update cranelift backend to fork version 0.44.0 2019-09-25 23:37:39 -05:00
ade098b815 fix(interface-types) Fix typos in error messages. 2019-09-26 01:02:29 +02:00
5ce18fc447 feat(interface-types) Create vectors with specific capacity when possible. 2019-09-26 01:00:17 +02:00
49a7587f33 feat(interface-types) Implement the write-utf8 executable instruction. 2019-09-26 00:55:26 +02:00
981692ec15 chore(interface-types) Re-order match arms. 2019-09-25 23:30:41 +02:00
ef568ca8c4 feat(interface-types) Update Instruction. 2019-09-25 23:29:08 +02:00
8d75db9018 test(interface-types) Use macros to reduce test boilerplate. 2019-09-25 23:13:26 +02:00
4d9dacb482 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
4266926e90 Add ImportObject maybe_with_namespace example 2019-09-25 12:37:27 -07:00
fdc486c53d Merge branch 'master' into feature/runtime-abi-delete 2019-09-25 10:21:20 -07:00
b45a228e84 Merge branch 'master' into ventuzelo/fix-800-index-oob-backing 2019-09-25 09:30:33 +02:00
fec90b570b Delete unused runtime-abi 2019-09-24 22:10:03 -07:00
392a61ff12 Merge branch 'master' into nlewycky/singlepass-add-zero 2019-09-24 13:58:27 -07:00
7bf306eb27 Use flat-square style in downloads button 2019-09-24 13:42:17 -07:00
621ef56ab6 lmproved READMEs to use Azure Pipelines badges and better lgo 2019-09-24 13:36:31 -07:00
588a77d2af Merge branch 'master' into feature/merge-cranelift-0-43-1 2019-09-24 11:41:14 -07:00
b6d55b0b85 Update to published fork version 2019-09-24 13:30:52 -05:00
d7562c17ef Merge branch 'master' into nlewycky/singlepass-add-zero 2019-09-24 10:57:57 -07:00
be181f9119 Correct this test and simplify. 2019-09-24 10:54:23 -07:00
ac321846e3 Merge branch 'master' into ventuzelo/fix-653-panic-memorydescriptor 2019-09-24 09:10:45 +02:00
79ff3709cc fix cargo check fail build 2019-09-24 09:08:55 +02:00
07b5991080 No need to emit add of constant zero. 2019-09-23 15:01:19 -07:00
8c5ccdb497 Merge #807
807: Implement Send for Instance r=MarkMcCaskey a=MarkMcCaskey

# Review

- [x] Create a short description of the the change in the CHANGELOG.md file

Resolves #748 

WIP

## List of changes
### Commit 1
- `Global`s use Arc instead of RC
- Export `Context` and `FuncPointer` manually implement Send
- `ImportObject` uses `Arc<Mutex<HashMap<...>>>` Instead of `Rc<RefCell<HashMap<...>>>`; removed `get_namespace` method in favor of continuation style to deal with locking the Mutex
- `Func` manually implements `Send` (TODO: this change needs to be checked in depth)
### Commit 2
- `unsafe impl Send for Export {}` (temporary to allow Memory to be not Send)
- RefCell -> Mutex in Global and Table
- Rc -> Arc in Table
- Namespace's `IsExport`s must be `Send` (Done to avoid touching much more of the code (i.e. `trait IsExport: Send` requires a lot -- maybe this is what we should do though)
- Make `Host` and `Wasm` `Func`s Send (manual implementation)
- Manual implementation for `LocalTable` and `AnyFunc`
### Commit 3
- rm placeholder `unsafe impl Send for Export {}`
- Manual implementation for `LocalBacking` and `ImportBacking` (both seemed to be not Send due to direct ownership of mutable pointers in their containers)
- ImportObject's state creator Fn trait object is now ` + Send + Sync + 'static` (required because it's in an Arc)
- Manually implement Send for `InstanceInner` because it holds a raw pointer, `LocalBacking` and `ImportBacking` are marked Send separately 
- Memory: All Rc -> Arc (including unshared memory); All RefCell -> Mutex (including unshared memory)
- Manual implementation of Send and Sync on `UnsharedMemoryInternal`
- Manual implementation of Send and Sync on `SharedMemoryInternal`
- Change `runtime-core::unix::memory::Memory.fd` from `Option<Rc<Rawfd>>` to `Option<Arc<Rawfd>>` (not strictly required for this change because Memory has manual implementations of Send and Sync, but Arc seems more correct here and there's no comment justifying the use of Rc)
- Manual implementation of Send for `ImportedFunc`

Co-authored-by: Mark McCaskey <mark@wasmer.io>
Co-authored-by: Mark McCaskey <markmccaskey@users.noreply.github.com>
2019-09-23 21:20:01 +00:00
9cab6d721f Merge branch 'feature/make-instance-send' of github.com:wasmerio/wasmer into feature/make-instance-send 2019-09-23 13:43:48 -07:00
c4818f12dc Update spectests to work with new Instance; use Arc<Mutex<>> 2019-09-23 13:43:01 -07:00
eed033021b Merge pull request #825 from Hywan/doc-runtime-core-memory-view
doc(runtime-core) Replace `map(|cell| cell.get())` by `map(Cell::get)`.
2019-09-23 11:34:00 -07:00
705287c317 Merge branch 'master' into feature/make-instance-send 2019-09-23 11:06:00 -07:00
1e637badc4 Merge remote-tracking branch 'origin/master' into feature/make-instance-send 2019-09-23 11:05:00 -07:00
05ad1aaea4 Add test for Instance, fix tests for ImportObject 2019-09-23 11:04:31 -07:00
3dadbc15c9 Integer subset done. 2019-09-23 22:30:08 +08:00
be5624e28b 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
f289cb2ba9 doc(runtime-core) Replace map(|cell| cell.get()) by map(Cell::get).
Because it's simpler :-p.
2019-09-23 15:15:06 +02:00
5ace7a0af3 fix failing test 2019-09-23 11:17:02 +02:00
9942d3ae98 Improved Emscripten / WASI autodetection 2019-09-22 18:23:22 -07:00
8e2f526f73 Added cpp example 2019-09-22 17:42:19 -07:00
009c123332 Fixed emscripten main functions 2019-09-22 17:29:12 -07:00
a1a88c6eb8 Use the default features for wasmparser 2019-09-21 13:59:08 -05:00
f48d6f6690 Cranelift backend update to fork of clif version 0.43.1 2019-09-21 13:06:54 -05:00
7d9e6d8caa Merge #821
821: Remove patch version in deps when not necessary r=MarkMcCaskey a=MarkMcCaskey

This allows wasmer library users to have more control over the exact versions of deps that Wasmer uses.

# Review

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


Co-authored-by: Mark McCaskey <mark@wasmer.io>
2019-09-20 23:44:37 +00:00