Mark McCaskey
bfc91dc445
Feature gate wasmer::ExternRef
2021-03-16 09:24:13 -07:00
Mark McCaskey
f26de7ea54
Disable dynamic ref counting in compiler-cranelift
...
This will leak extern refs but lets all spec tests pass. We can follow up later
to resolve the leaking of ExternRefs, but most of this PR should land on
master/main now.
2021-03-15 12:51:04 -07:00
Mark McCaskey
6a31e8eb45
Test ref counting with new instructions
2021-03-08 11:13:32 -08:00
Mark McCaskey
64bd472a76
Improve testing of ref counting, fix up some edge cases
2021-03-08 08:30:55 -08:00
Mark McCaskey
3dcba53309
Add wip commit, more ref counting improvements
2021-03-05 11:58:21 -08:00
Mark McCaskey
af3e3e5ff4
Fix up extern ref counting for globals + misc cleanups
2021-03-05 08:01:52 -08:00
Mark McCaskey
473c0f4f9e
Improve extern ref ref counting tests
2021-03-03 08:13:16 -08:00
Mark McCaskey
2dcb56571a
Implement most of extern ref counting in compiler-cranelift
2021-03-02 13:31:34 -08:00
Mark McCaskey
54b76cddfc
Get references passed through globals fully working via top level API
2021-02-23 11:52:31 -08:00
Mark McCaskey
79de368c5c
Improve support for references in Globals at the API level
2021-02-22 13:08:13 -08:00
Mark McCaskey
337bb8aba6
Put ExternRef in Value, remove phantom data
2021-02-19 08:06:18 -08:00
Mark McCaskey
03edab2479
Improve ExternRef API testing
2021-02-17 09:07:48 -08:00
Mark McCaskey
15c3fe6c38
Add improved support for ExternRef in the top level API
2021-02-17 08:57:59 -08:00
Mark McCaskey
12db1e46ca
Update extern ref test to pass back a new extern ref
2021-02-17 08:24:09 -08:00
Mark McCaskey
828d265428
Add basic API tests with reference types with dynamic functions
2021-02-17 08:11:07 -08:00
Mark McCaskey
63f277bce4
Make FuncRef nullable at the API level
2021-02-01 09:41:18 -08:00
Mark McCaskey
6a2116917f
Fix up tests, make WasmerEnv: Send
2020-12-15 13:35:19 -08:00
Simon Warta
69f834a9e8
Accept Into<FunctionType> as signatures
2020-12-14 13:08:15 +01:00
Ivan Enderlin
7973a965fb
Merge branch 'master' into fix-vm-leak
2020-12-01 10:08:21 +01:00
Ivan Enderlin
7621991a9a
test(api) Test that exports work after the instance has been freed.
2020-11-27 10:25:50 +01:00
Mark McCaskey
de6cb9c4c4
Merge branch 'master' into feature/host-env-prototype
2020-11-20 15:54:35 -08:00
Mark McCaskey
84370c7930
Merge branch 'master' into feature/make-env-immutable
2020-11-18 15:40:11 -08:00
Mark McCaskey
655ac093a2
Fix up helpers generated by WasmerEnv; add unchecked variant
2020-11-17 11:19:42 -08:00
Mark McCaskey
75707106d9
Add test initializing and calling host function manually
2020-11-16 17:04:08 -08:00
Mark McCaskey
5b67b2f3dc
Merge branch 'master' into feature/host-env-prototype
2020-10-27 16:24:00 -07:00
bors[bot]
962f3be626
Merge #1772
...
1772: Remove lifetime parameter from `NativeFunc` r=MarkMcCaskey a=MarkMcCaskey
Ran into this as an annoyance on #1739 ; will need to account for this when we fix the memory leak in `InstanceHandle`.
Note: the lifetime wasn't doing anything useful for us, this change doesn't make anything new possible (other than not having to deal with the lifetime parameter)
# Review
- [x] Add a short description of the the change to the CHANGELOG.md file
Co-authored-by: Mark McCaskey <mark@wasmer.io >
2020-10-27 22:13:57 +00:00
Mark McCaskey
608fbdca2a
Remove lifetime parameter from NativeFunc
...
It wasn't doing anything anyways.
2020-10-27 14:37:24 -07:00
Nick Lewycky
c9181e39c7
Enable these tests now that they pass.
...
Also fix a syntax error, use assert_eq! instead of assert! to compare two values for equality.
Also in passing, convert a comment about something not being done into a TODO.
2020-10-27 12:25:12 -07:00
Mark McCaskey
a7abee6fb7
Add lazy abstraction, improve macro, use macro internally
2020-10-23 12:50:36 -07:00
Mark McCaskey
d64908dc83
Fix package tests
2020-10-20 18:03:22 -07:00
Mark McCaskey
e7ba7c1154
Fix remaining tests
2020-10-01 17:25:13 -07:00
Mark McCaskey
dbc1b4e477
Add tests for smaller sizes, change logic to truncate parameters
2020-09-10 16:17:17 -07:00
Mark McCaskey
d23cebfbfa
Remove use of unsafe, add tests for func param conversion
2020-09-08 14:25:27 -07:00
Syrus
b06f021612
Improved Function API
2020-07-21 20:02:01 -07:00
Syrus
80ad395441
Fixed code linting
2020-07-16 12:33:00 -07:00
Syrus
296f0969f0
Fixed tests
2020-07-16 12:28:42 -07:00
Syrus
ffc1e28aa2
Remove all nightly dependencies
2020-07-01 15:11:41 -07:00
Mark McCaskey
ef285aae6c
Merge pull request #110 from wasmerio/feature/functions-own-their-envs
...
Change functions to own their `env`s
2020-06-16 13:36:05 -07:00
Syrus
b00f899913
Update to Cranelift 0.65, wasmparser 0.57
2020-06-15 18:00:48 -07:00
Mark McCaskey
b232b237b5
Fix API tests
2020-06-12 16:56:15 -07:00
Mark McCaskey
5f5c7d6725
Clean up and comment out some NativeFunc tests for now
2020-06-09 12:36:07 -07:00
Mark McCaskey
eb928e739c
Implement host functions in 1 case, optimize NativeFunc::call
...
`NativeFunc::call` is about 8% faster in the case we're benchmarking
by avoiding allocating a vector for the params / returns, instead we
do logic to determine which is larger and use that, conditionally
copying it back to the rets array if needed.
2020-06-09 11:35:58 -07:00
Mark McCaskey
87a28b057e
Move NativeFunc test from api to test/compilers
2020-06-08 16:37:33 -07:00
Mark McCaskey
3c76999925
Implement Exportable for &Ts too (for some T)
2020-06-08 16:26:47 -07:00
Mark McCaskey
e70828eb37
Fix up tests and benchmark to use new get
2020-06-08 16:10:05 -07:00
Mark McCaskey
b46ea5b9cb
Get NativeFunc passing basic tests
2020-06-08 12:53:00 -07:00
Syrus
62fb4f79c1
Moved misc test into api test
2020-05-27 11:55:21 -07:00
Syrus
c0e5c794d6
Added module imports and exports testing
2020-05-27 11:11:00 -07:00
Syrus
3bac7117cb
Added module tests
2020-05-27 10:42:19 -07:00
Syrus
32daf6edfe
Added module tests
2020-05-27 10:30:15 -07:00