3556 Commits

Author SHA1 Message Date
Ivan Enderlin
f537b4dfa3 chore(interface-types) Simplify the executable_instruction macro. 2019-09-26 14:17:43 +02:00
Ivan Enderlin
fce270a8e7 feat(interface-types) Split the interpreter into multiple modules/files. 2019-09-26 14:14:46 +02:00
Ivan Enderlin
ade098b815 fix(interface-types) Fix typos in error messages. 2019-09-26 01:02:29 +02:00
Ivan Enderlin
5ce18fc447 feat(interface-types) Create vectors with specific capacity when possible. 2019-09-26 01:00:17 +02:00
Ivan Enderlin
49a7587f33 feat(interface-types) Implement the write-utf8 executable instruction. 2019-09-26 00:55:26 +02:00
Ivan Enderlin
981692ec15 chore(interface-types) Re-order match arms. 2019-09-25 23:30:41 +02:00
Ivan Enderlin
ef568ca8c4 feat(interface-types) Update Instruction. 2019-09-25 23:29:08 +02:00
Ivan Enderlin
8d75db9018 test(interface-types) Use macros to reduce test boilerplate. 2019-09-25 23:13:26 +02:00
Ivan Enderlin
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
Ivan Enderlin
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
Ivan Enderlin
aea18f6250 test(interface-types) Test calling a void exported function. 2019-09-20 14:59:18 +02:00
Ivan Enderlin
8557e83ce6 feat(interface-types) Better error message when calling an exported function failed. 2019-09-20 14:55:37 +02:00
Ivan Enderlin
56afb4da63 feat(interface-types) Check signature of the exported function to call. 2019-09-20 14:31:15 +02:00
Ivan Enderlin
b7b37d2e99 feat(interface-types) The interpreter stack contains Wasm values. 2019-09-20 14:07:56 +02:00
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
Ivan Enderlin
2f3c37fbd5 feat(interface-types) Continue. 2019-09-19 00:25:28 +02:00
Ivan Enderlin
dc3c72ea19 feat(interface-types) Draft instruction interpreter. 2019-09-19 00:18:36 +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
bors[bot]
174cc9f0ec
Merge #802
802: This is no longer referring to the correct line. r=nlewycky a=nlewycky

It's supposed to be 352 which is already there. Three lines were deleted in #785.


Co-authored-by: Nick Lewycky <nick@wasmer.io>
2019-09-17 21:48:18 +00: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
Syrus Akbary
90dfb0f7a7
Merge pull request #801 from wasmerio/feature/osr-exclude
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:16:18 -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
Syrus
298a2f8534 Added system info to tests 2019-09-16 12:14:09 -07:00
bors[bot]
de7c5dc578
Merge #790
790: Switch llvm-backend from PIC+Default (small) to Static+Large. r=nlewycky a=nlewycky

# Description

Should fix flaky test failure:
```
spectest-a277b7d051ac0dde: /home/nick/llvm-8.0.1.src/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp:304: void llvm::RuntimeDyldELF::resolveX86_64Relocation(const llvm::SectionEntry&, uint64_t, uint64_t, uint32_t, int64_t, uint64_t): Assertion `isInt<32>(RealOffset)' failed.
```
(with assertions-enabled LLVM). The relocation in question is a `R_X86_64_PC32` with small offset against `.rodata`.

The switch from Default (small, JITDefault is a different default that we weren't using which is medium) to Large should fix the bug. Once we're using large code model, I think we can switch from PIC to static as either an optimization or a no-op.

# Review

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


Co-authored-by: Nick Lewycky <nick@wasmer.io>
2019-09-16 17:55:13 +00:00
Nick Lewycky
53db1d44fa Add changelog entry. 2019-09-16 10:49:39 -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
bors[bot]
56c571465e
Merge #798
798: Replace panics in codegen_x64 by CodegenError r=nlewycky a=pventuzelo

Replace panics! inside `lib/singlepass-backend/src/codegen_x64.rs` by CodegenError

Co-authored-by: Patrick Ventuzelo <ventuzelo.patrick@gmail.com>
2019-09-16 17:10:03 +00: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
bors[bot]
9068777aaf
Merge #782
782: Turn this unreachable into a panic with an error message. r=nlewycky a=nlewycky

# Description
All errors with messages in this file are `panic!`s. Give this `unreachable!` a message (so I can debug when I hit it, only possible due to local changes) and turn it into a `panic!`.

# Review

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

Too minor for changelog.


Co-authored-by: Nick Lewycky <nick@wasmer.io>
Co-authored-by: nlewycky <nick@wasmer.io>
2019-09-14 01:10:46 +00:00
nlewycky
e0baf68e25
Merge branch 'master' into nlewycky/panic 2019-09-13 17:07:36 -07:00
bors[bot]
991cbfb6b5
Merge #788
788: Use union merge on the changelog file. r=MarkMcCaskey a=nlewycky

# Description
This keeps both sides of a conflict. It's essentially the same as removing the
conflict markers.

# Review

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


Co-authored-by: Nick Lewycky <nick@wasmer.io>
2019-09-13 22:15:59 +00:00