1987 Commits

Author SHA1 Message Date
Ivan Enderlin
2237e628ab chore(interface-types) Fix clippy warnings. 2019-09-20 12:02:11 +02:00
Ivan Enderlin
39a817817b feat(interface-types) Stack supports Default. 2019-09-20 11:55:19 +02:00
Ivan Enderlin
9d4c983206 feat(interface-types) Implement CallExport executable instruction.
It requires to create the `wasm::Export` trait, plus the `wasm::Type`
and the `wasm::Value` enums.
2019-09-20 11:37:38 +02:00
Ivan Enderlin
62e1f7867b feat(interface-types) Add an abstract Wasm instance and a runtime to the interpreter. 2019-09-20 00:06:15 +02:00
Ivan Enderlin
c63345029e feat(interface-types) Continue. 2019-09-19 23:05:17 +02:00
bors[bot]
0790ebff0c
Merge #803
803: Add method to call function at index on Ctx r=MarkMcCaskey a=MarkMcCaskey

For #638 and #670

```Rust
fn call_guest_fn(ctx: &mut Ctx, guest_fn: u32) -> u32 {
    println!("{}", guest_fn);

    let guest_fn_typed = unsafe { std::mem::transmute(guest_fn) };

    let result = ctx.call_with_table_index(guest_fn_typed, &[]).unwrap();
    println!("  -> {:?}", result);

    0
}
```
is what this looks like from the Host side

See `examples/callback.rs` for an example that doesn't require `transmute`


# Review

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


Co-authored-by: Mark McCaskey <mark@wasmer.io>
Co-authored-by: Mark McCaskey <markmccaskey@users.noreply.github.com>
2019-09-19 20:55:09 +00:00
Ivan Enderlin
9a49fb59e0
Merge branch 'master' into fix-test-typo 2019-09-19 22:15:32 +02:00
bors[bot]
dd1a4a6c10
Merge #805
805: Replace panic! & unimplemented! in runtime-code and llvm-backend r=nlewycky a=pventuzelo

# Description

Replace `unimplemented!` by already used `CodegenError` in `lib/llvm-backend/src/code.rs`
Replace `unimplemented!` by `Err` in `lib/llvm-backend/src/trampolines.rs`
Replace `panic!` by already used `BinaryReaderError` in `lib/runtime-core/src/parse.rs`

# Review

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


Co-authored-by: Patrick Ventuzelo <ventuzelo.patrick@gmail.com>
2019-09-19 19:20:04 +00:00
Johan Andersson
8d0edc61df Merge master 2019-09-19 11:16:14 +02:00
Mark McCaskey
a9d8b22fe7
Merge branch 'master' into feature/call-function-at-index-on-just-ctx 2019-09-18 16:46:08 -07:00
Mark McCaskey
ccd369ff0c Add example, rename Ctx fn, make things pub(crate), misc changes 2019-09-18 16:43:47 -07:00
Mark McCaskey
5741a2cf70 Implement function lookups using the table 2019-09-18 16:06:46 -07:00
Ivan Enderlin
2f3c37fbd5 feat(interface-types) Continue. 2019-09-19 00:25:28 +02:00
Ethan Frey
8ae255b51a Fix issues with testing/linking singlepass in runtime-c-api 2019-09-19 00:19:17 +02:00
Ivan Enderlin
dc3c72ea19 feat(interface-types) Draft instruction interpreter. 2019-09-19 00:18:36 +02:00
Ethan Frey
e8a918e2e5 %lld -> %ld fixes cargo test compile error 2019-09-18 23:25:35 +02:00
Ivan Enderlin
fc9389d932 feat(interface-types) Encode Interfaces to WAT. 2019-09-18 18:02:05 +02:00
Ivan Enderlin
6ec35c8bdc chore(interface-types) Bump to 0.7.0. 2019-09-18 17:14:57 +02:00
Ivan Enderlin
480fe0fb9b chore(interface-types) Update to Wasmer 0.7.0. 2019-09-18 17:14:12 +02:00
Ivan Enderlin
bd3a888452 feat(interface-types) Add new instructions. 2019-09-18 17:12:42 +02:00
Ivan Enderlin
6279b3e915 feat(interface-types) Continue the WAT encoder. 2019-09-18 17:12:42 +02:00
Ivan Enderlin
40613d3d48 feat(interface-types) Draft the WAT encoder. 2019-09-18 17:12:42 +02:00
Ivan Enderlin
4ba9aace64 fix(interface-types) get-field #1 argument is of type InterfaceType. 2019-09-18 17:12:42 +02:00
Ivan Enderlin
a7ffffc8b4 feat(interface-types) Move TryFrom from the ast to the binary module. 2019-09-18 17:12:42 +02:00
Ivan Enderlin
5a8a2b90ed fix(interface-types) Fix visibility of various symbols. 2019-09-18 17:12:42 +02:00
Ivan Enderlin
24ac7a6c41 test(interface-types) Add test cases for higher-level parsers. 2019-09-18 17:12:42 +02:00
Ivan Enderlin
dc254e0845 test(interface-types) Add test case for “unit” parsers. 2019-09-18 17:12:42 +02:00
Ivan Enderlin
1c1b74baa1 feat(interface-types) Split into multiple files. 2019-09-18 17:12:42 +02:00
Ivan Enderlin
45ba77c5e3 feat(interface-types) Continue. 2019-09-18 17:12:42 +02:00
Ivan Enderlin
7ca546e5c5 feat(interface-types) Continue. 2019-09-18 17:12:41 +02:00
Ivan Enderlin
b3af77c92d feat(wasmer-interface-types) Draft. 2019-09-18 17:12:41 +02:00
Patrick Ventuzelo
315b87c718 check index before accessing imports.globals 2019-09-18 10:28:49 +02:00
Mark McCaskey
9c205e05a2 Add comments explaining the unsafe impls and simplify the code, too 2019-09-17 18:35:12 -07:00
Mark McCaskey
83c3909b00 Implement it for memory and make Instance Send 2019-09-17 14:58:26 -07:00
Mark McCaskey
9e9343878d Implement Send for everything except Memory 2019-09-17 11:45:13 -07:00
Mark McCaskey
17a0e78cef Implement Send for Instance 2019-09-17 10:37:37 -07:00
Patrick Ventuzelo
374f81972a remove panic from UnsharedMemory 2019-09-17 17:46:36 +02:00
Patrick Ventuzelo
c660aa9fce fix 653 panic in memoryDescriptor 2019-09-17 17:42:06 +02:00
Patrick Ventuzelo
726269a52c fix missing info error 2019-09-17 12:05:00 +02:00
Patrick Ventuzelo
4190f01195 remove panic and unimplemented in llvm-backend and runtime-core 2019-09-17 12:03:03 +02:00
Mark McCaskey
b35a522d28 Add method to call function at index on Ctx 2019-09-16 15:01:18 -07:00
Johan Andersson
ba488adb8f
Merge branch 'master' into remove-colored 2019-09-16 22:17:34 +02:00
Nick Lewycky
05816e3221 This is no longer referring to the correct line.
It's supposed to be 352 which is already there.
2019-09-16 13:13:21 -07:00
Nick Lewycky
2108c908a4 Depending on the micro-arch, this function may trigger emission of a stack realignment. If it does, OSR can't statically prove that it's safe to insert a function call and asserts. 2019-09-16 12:14:10 -07:00
Nick Lewycky
59597b9e83 Switch from PIC+Default (small) to Static+Large. Should fix flaky test failures. 2019-09-16 10:49:39 -07:00
Patrick Ventuzelo
00c2e09f43 fix CodeGen message type 2019-09-16 11:00:03 +02:00
Patrick Ventuzelo
33ba6768bc replace panics by CodeGen Error in codegen_x64 2019-09-16 09:56:41 +02:00
Johan Andersson
21bcac2159 Rustfmt 2019-09-15 03:31:05 +02:00
Johan Andersson
ad70caff83 Remove colored CLI output from runtime-core lib.
When the colored output was originally added in https://github.com/wasmerio/wasmer/pull/489 and there was a discussion then about that it should ideally be in a higher-level crate rather than in the runtime-core library crate.

I agree with that, users of the library shouldn't be required to bring in the colored crate dependency and ideally also not have stdout/stderr output either, that should be controlled by the application that uses wasmer-runtime-core, not the library.

Disabling stdout/stderr output would be more intrusive but I wanted to at least not have colored output and another crate dependency so this change removes the colored output and the "colored" crate.
2019-09-15 03:21:04 +02:00
Nick Lewycky
0387c3ff93 Turn this unreachable into a panic with an error message. 2019-09-13 14:44:54 -07:00