Commit Graph

539 Commits

Author SHA1 Message Date
Syrus Akbary
adee7d42db Improved debug! in all emscripten calls 2018-11-28 22:02:25 -08:00
Lachlan Sneff
1db0306b8b implmented mmap2 2018-11-29 00:11:36 -05:00
Syrus Akbary
c9ae2f25b9 Fixed all warnings 2018-11-28 13:29:50 -08:00
Syrus Akbary
80ddc759a1 Formatted files 2018-11-28 13:25:56 -08:00
Syrus Akbary
02477b6e5e Added support for conditional emscripten 2018-11-28 13:25:17 -08:00
Syrus Akbary
1f49f0358f Merge branch 'master' into feature/compile-and-run-nginx-wasm
# Conflicts:
#	src/bin/wasmer.rs
#	src/recovery.rs
2018-11-27 23:47:13 -08:00
Syrus Akbary
30f79554e5 Added unwind spectests 2018-11-27 23:38:35 -08:00
Syrus Akbary
836f6c70af Added memory_trap spectests 💪 2018-11-27 23:35:53 -08:00
Syrus Akbary
4d41cbbac6 Merge branch 'master' into self-update
# Conflicts:
#	src/bin/wasmer.rs
2018-11-27 21:53:33 -08:00
losfair
319bd08905 Install signal handler only once. 2018-11-28 13:21:03 +08:00
losfair
b9714e1ce1 Fix a few warnings 2018-11-28 13:18:23 +08:00
losfair
3815eaf13a Allow using wasmer as a library. 2018-11-28 13:15:33 +08:00
Steve Akinyemi
f7e3f128d3 Refactor code 2018-11-28 02:10:09 +01:00
Lachlan Sneff
88589a9cbc Add sig* syscalls 2018-11-27 19:10:43 -05:00
Steve Akinyemi
ad426fb5e3 Resolve REUSEADDR issue 2018-11-27 15:19:10 +01:00
Syrus Akbary
cf64cc8e04 Added ___syscall12 and ___syscall192 implementations 2018-11-26 23:28:37 -08:00
Syrus Akbary
4fb01c87ec Improved import functions casting readability 2018-11-26 21:23:23 -08:00
Syrus Akbary
c2ede37a72 Improved formatting 2018-11-26 20:29:26 -08:00
Syrus Akbary
50f6ea3bd4 Fixed all Rust warnings 2018-11-26 20:28:13 -08:00
Lachlan Sneff
30d4688fe3 Runs up to socket/ioctl/sigaction functions 2018-11-26 22:48:19 -05:00
Steve Akinyemi
c460ddd325 Merge branch 'feature/compile-and-run-nginx-wasm' of https://github.com/wafoundation/wasmer into feature/compile-and-run-nginx-wasm 2018-11-27 01:15:25 +01:00
Steve Akinyemi
1a08c19b5d Add __syscall340 2018-11-27 01:15:20 +01:00
Syrus Akbary
3fc759df63 Merge branch 'feature/compile-and-run-nginx-wasm' of github.com:wasmerio/wasmer into feature/compile-and-run-nginx-wasm 2018-11-26 14:30:55 -08:00
Syrus Akbary
adad0a0be2 Improved debug calls 2018-11-26 14:30:28 -08:00
Steve Akinyemi
5d64349894 Merge branch 'feature/compile-and-run-nginx-wasm' of https://github.com/wafoundation/wasmer into feature/compile-and-run-nginx-wasm 2018-11-26 23:28:01 +01:00
Steve Akinyemi
be07767faf Add GuestTm 2018-11-26 23:27:56 +01:00
Syrus Akbary
0ba5f1ecb7 Added mock for _strftime 2018-11-26 14:16:51 -08:00
Syrus Akbary
ac51a33d5e Improved utils from pritnln! to debug! 2018-11-26 14:06:05 -08:00
Syrus Akbary
8876ade624 Added emscripten ___syscall201 and ___syscall202 2018-11-26 13:59:18 -08:00
Syrus Akbary
c3813fedea Removed _localtime emscripten mock 2018-11-26 13:51:24 -08:00
Syrus Akbary
bef9f075f0 Removed duplicated emscripten time functions 2018-11-26 13:45:38 -08:00
Syrus Akbary
28c5afabfa Make happy path 2018-11-26 13:42:44 -08:00
Syrus Akbary
ab740aa37c Merge branch 'feature/compile-and-run-nginx-wasm' of github.com:wasmerio/wasmer into feature/compile-and-run-nginx-wasm
# Conflicts:
#	src/apis/emscripten/mod.rs
2018-11-26 13:30:55 -08:00
Syrus Akbary
7a2920f75b Use debug instead of println for emscripten mocks 2018-11-26 13:21:11 -08:00
Steve Akinyemi
27f642a891 Merge changes 2018-11-26 22:20:10 +01:00
Syrus Akbary
9f511f3994 Added emscripten ___syscall64 and import ___syscall122 2018-11-26 13:17:44 -08:00
Steve Akinyemi
3f819e3a79 Move some functions to utils 2018-11-26 22:15:49 +01:00
Lachlan Sneff
3be1bdba30 Fix build errors 2018-11-26 16:11:01 -05:00
Lachlan Sneff
bd3b78ccc8 Add several more syscalls 2018-11-26 16:07:42 -05:00
Lachlan Sneff
ec9e83eca6 Add a few more syscalls 2018-11-26 16:07:30 -05:00
Steve Akinyemi
b1ba24e99d Add _localtimeand _time functions 2018-11-26 22:01:15 +01:00
Syrus Akbary
5907bcc0f4 Added emscripten syscall20 implementation 2018-11-26 12:48:39 -08:00
Syrus Akbary
5911ac58c0 Added _clock_gettime emscripten implementation 2018-11-26 12:28:20 -08:00
Syrus Akbary
cb7c7fd475 Added _gettimeofday to emscripten 2018-11-26 12:02:29 -08:00
Syrus Akbary
444d85f9c9 Added debug release 2018-11-26 11:47:33 -08:00
Syrus Akbary
057e1ead18 Mock all the functions
Based on the suggestion from @lachlansneff
2018-11-26 11:16:09 -08:00
Lachlan Sneff
76c9107e48 Added a few more syscalls 2018-11-26 01:17:56 -05:00
Syrus Akbary
f186ed8534 Added self-update command 2018-11-25 21:31:32 -08:00
Syrus Akbary
5a81c501be
Merge branch 'master' into feature/compile-and-run-nginx-wasm 2018-11-25 21:28:20 -08:00
losfair
dad50f6f2c Add the SA_ONSTACK flag to SigAction so that stack overflow doesn't prevent unwinding. 2018-11-26 13:13:52 +08:00
Lachlan Sneff
c4b2e87c19 Finish merging 2018-11-26 00:08:33 -05:00
Lachlan Sneff
a8b62ae8a5 Hack together enough emscripten stack stuff to make it happy 2018-11-26 00:06:50 -05:00
Steve Akinyemi
ecc8199855 Remove failing impl 2018-11-26 00:05:36 -05:00
Steve Akinyemi
399f72df94 Add some syscalls 2018-11-26 00:05:36 -05:00
Lachlan Sneff
75ef87824e Segfault-based memory bounds-checking. (#29)
* Mostly working

* Improve CircleCI releases

* Recover safely from WebAssembly-generated traps

* Add notes about async signal safety

* Improved trap catching with call_protected macro

* Improved test assert_trap code using call_protected macro

* Mostly working
2018-11-26 00:02:59 -05:00
Syrus Akbary
5feda6b524 Improved test assert_trap code using call_protected macro 2018-11-26 00:01:30 -05:00
Syrus Akbary
a44a3b0456 Improved trap catching with call_protected macro 2018-11-26 00:01:30 -05:00
losfair
6d09fab498 Add notes about async signal safety 2018-11-26 00:01:30 -05:00
losfair
227a3ee6d6 Recover safely from WebAssembly-generated traps 2018-11-26 00:01:30 -05:00
Lachlan Sneff
4015fb6193 Hack together enough emscripten stack stuff to make it happy 2018-11-25 23:56:21 -05:00
Lachlan Sneff
399d253bc1 Segfault-based memory bounds-checking. (#29)
* Mostly working

* Improve CircleCI releases

* Recover safely from WebAssembly-generated traps

* Add notes about async signal safety

* Improved trap catching with call_protected macro

* Improved test assert_trap code using call_protected macro

* Mostly working
2018-11-25 10:51:21 -08:00
Syrus Akbary
6b75580749 Improved test assert_trap code using call_protected macro 2018-11-24 10:52:17 -08:00
Syrus Akbary
e258875d4b Improved trap catching with call_protected macro 2018-11-24 10:50:48 -08:00
Steve Akinyemi
88235eab37 Remove failing impl 2018-11-24 18:38:51 +01:00
Steve Akinyemi
6a72d942fd Update to use new varargs impl 2018-11-24 18:31:38 +01:00
Steve Akinyemi
c639bf850e Add some syscalls 2018-11-24 18:07:45 +01:00
Steve Akinyemi
2486ac96a3 Add existing syscalls impl 2018-11-24 18:07:08 +01:00
Steve Akinyemi
44429aae74 Add legend to emscripten readme 2018-11-24 18:06:30 +01:00
Steve Akinyemi
c7ac71b0e4 Reafactor varargs macro 2018-11-24 18:06:30 +01:00
losfair
a316253b94 Add notes about async signal safety 2018-11-24 22:25:32 +08:00
losfair
5de9f0f7b4 Recover safely from WebAssembly-generated traps 2018-11-24 19:40:29 +08:00
Lachlan Sneff
6121370656 Fix debug macro warnings 2018-11-23 00:13:20 -05:00
Lachlan Sneff
587fb92de6 Add VarArgs type 2018-11-23 00:13:01 -05:00
Syrus Akbary
ad562ddc35 Remove debug statements on release 2018-11-21 21:22:27 -08:00
Syrus Akbary
e59b95d95e Removed unused code 2018-11-21 21:07:01 -08:00
Syrus Akbary
38f045da3c run cargo fmt 2018-11-21 20:59:23 -08:00
Syrus Akbary
ccdabd26b5 pypyjs.wasm is finally working 🎉 2018-11-21 20:58:32 -08:00
Syrus Akbary
a50e846f9b Refactored host code 2018-11-21 15:10:03 -08:00
Syrus Akbary
1f6e640054 Improved emscripten integration 2018-11-21 14:31:55 -08:00
Syrus Akbary
5ad5606b39 Added APIs to support conditional emscripten instantiation 2018-11-20 20:51:11 -08:00
Syrus Akbary
0ad10a4900 Make emscripten “work” 2018-11-20 19:24:23 -08:00
Syrus Akbary
fca2eb3884 Merge branch 'master' into feature/add-emscripten-compatible-apis
# Conflicts:
#	Cargo.lock
#	cranelift
#	src/webassembly/instance.rs
2018-11-20 19:07:51 -08:00
Syrus Akbary
f3833dc237 Merge branch 'master' into parallel-compilation
# Conflicts:
#	src/webassembly/instance.rs
2018-11-20 16:30:25 -08:00
Steve Akinyemi
771dae7feb Refactor api code and doc 2018-11-21 00:45:57 +01:00
Steve Akinyemi
70e3262bf8 Add some other emscripten apis 2018-11-20 00:43:07 +01:00
Syrus Akbary
3fa01be0bb Remove offsets print 2018-11-19 13:21:11 -08:00
Syrus Akbary
3b878620cc Added support for mocking globals and tables by default 2018-11-19 13:09:16 -08:00
Syrus Akbary
12dc70d497 Added support for global references 2018-11-19 10:27:55 -08:00
Syrus Akbary
f2d2c9b9f8 Use rayon for easy parallel compilation 2018-11-18 23:51:56 -08:00
Syrus Akbary
9680d586c3 Use iterator map for compilation 2018-11-18 22:12:22 -08:00
Syrus Akbary
39e1f59311 Merge branch 'master' into features/global-value-offset 2018-11-18 21:05:55 -08:00
Syrus Akbary
a7e1775255 Added mocking back into instance 2018-11-18 21:05:26 -08:00
Syrus Akbary
60b1520808 Improved naming of Exportable to ImportableExportable 2018-11-18 20:23:01 -08:00
Syrus Akbary
9f561db90b Added support for global value offsets
This commit depends on this PR landing on cranelift:
https://github.com/CraneStation/cranelift/pull/612
2018-11-18 20:22:18 -08:00
Steve Akinyemi
cb77e89c45 Add some syscalls 2018-11-19 01:12:29 +01:00
Steve Akinyemi
ab570e8be6 Add syscall function sig 2018-11-19 01:12:29 +01:00
Steve Akinyemi
79b74567b2 Update with link to top 2018-11-19 01:12:29 +01:00
Steve Akinyemi
f8eae09110 Add emscripten printf example and list of emscripten syscalls 2018-11-19 01:12:29 +01:00
Syrus Akbary
998d7294f0 Fix table element size 2018-11-18 15:41:31 -08:00
Syrus Akbary
f3cbfc0e09 Fixed return_mode 2018-11-18 15:23:38 -08:00
Syrus Akbary
91875fef06 Merge branch 'master' into cranelift-upgrade
# Conflicts:
#	src/webassembly/module.rs
2018-11-18 13:09:34 -08:00
Steve Akinyemi
e7923d3b32 Add memory_grow.wast test file. 2018-11-17 22:13:59 +01:00
Steve Akinyemi
ba6bc71019 Fix LinearMemory.current update bug 2018-11-17 19:56:15 +01:00
Syrus Akbary
7977d09fc7 Merge branch 'master' into fix/table-import-memory-repr-rebased
# Conflicts:
#	.circleci/config.yml
#	install.sh
#	src/build_spectests.rs
#	src/linkers/emscripten/abort.rs
#	src/linkers/emscripten/mod.rs
#	src/linkers/mod.rs
#	src/main.rs
#	src/webassembly/instance.rs
#	src/webassembly/memory.rs
#	src/webassembly/mod.rs
#	src/webassembly/module.rs
2018-11-17 01:01:47 -08:00
Syrus Akbary
84b9847456 Improved offsets in module using pointer size rather than fixed numbers
# Conflicts:
#	src/webassembly/module.rs
2018-11-17 00:46:27 -08:00
Syrus Akbary
e4ed4cc532 Improved instance & module data pointers location
# Conflicts:
#	src/webassembly/instance.rs
#	src/webassembly/module.rs
2018-11-17 00:42:31 -08:00
Syrus Akbary
ac2d605472 Added Instance options, automatically mock missing imports
# Conflicts:
#	src/webassembly/instance.rs
#	src/webassembly/mod.rs
2018-11-17 00:37:45 -08:00
Syrus Akbary
b16fceb9d3 Added emscripten abort function
# Conflicts:
#	src/linkers/emscripten/mod.rs
2018-11-17 00:10:41 -08:00
Syrus Akbary
7bd2af98b3 Refactored emscripten integratoin
# Conflicts:
#	src/integrations/mod.rs
2018-11-17 00:09:52 -08:00
Syrus Akbary
c452ff1c04 Improved error messaging 2018-11-17 00:07:18 -08:00
Syrus Akbary
fd8feedb51 Added token spectests 2018-11-17 00:06:15 -08:00
Syrus Akbary
c5c033c02b Added traps spectests 2018-11-17 00:06:05 -08:00
Syrus Akbary
a96c106b17 Improved debug statements
Same commit as aba907cbc4 but without using the log debug macro (as causes fail)
2018-11-17 00:05:41 -08:00
Steve Akinyemi
df482667aa Fix table and memory import and improve memory storage 2018-11-16 16:55:49 +01:00
Syrus Akbary
a9e46a02d3 Merge branch 'master' into cranelift-upgrade
# Conflicts:
#	Cargo.lock
#	Cargo.toml
#	src/webassembly/mod.rs
#	src/webassembly/module.rs
2018-11-15 19:40:45 -08:00
Syrus Akbary
5c0e404d96 Refactored math intrinsics into its own module 2018-11-15 15:06:12 -08:00
Syrus Akbary
1faaad7f72 Autoformat files with cargo fmt 2018-11-15 13:31:37 -08:00
Syrus Akbary
bb9c9f7d0a Updated spectests based on latest wabt 2018-11-15 13:30:44 -08:00
Syrus Akbary
2dcd25bebd Make wasmer work with stable Rust 2018-11-15 13:30:32 -08:00
Syrus Akbary
459d5f376d Improved signal error messages 2018-11-15 01:22:44 -08:00
Syrus Akbary
cdbd27275c Improved errors formatting 2018-11-15 00:51:18 -08:00
Syrus Akbary
ef09889df9 Improved offsets in module using pointer size rather than fixed numbers 2018-11-14 23:56:02 -08:00
Syrus Akbary
adf6d298b6 Trying to upgrade Cranelift to 0.23 2018-11-14 23:10:35 -08:00
Syrus Akbary
6bfd7d9081 Improved instance & module data pointers location 2018-11-14 11:05:57 -08:00
Syrus Akbary
278dff0fa6 Added Instance options, automatically mock missing imports 2018-11-13 19:44:24 -08:00
Syrus Akbary
aa5a5549f2 Added emscripten abort function 2018-11-13 19:42:36 -08:00
Syrus Akbary
d56da9c80c Refactored emscripten integratoin 2018-11-13 19:19:23 -08:00
Syrus Akbary
219bd68256 Improved error messaging 2018-11-13 18:41:51 -08:00
Syrus Akbary
dd1553154c Added token spectests 2018-11-13 17:41:29 -08:00
Syrus Akbary
75bcc5e0bd Added traps spectests 2018-11-13 17:40:38 -08:00
Syrus Akbary
aba907cbc4 Improved debug statements 2018-11-13 17:21:03 -08:00
Steve Akinyemi
73eba2e357 Fix wrong for bit mask canonical nan 2018-11-07 19:03:52 +01:00
Syrus Akbary
58c6822359 Fixed warnings 2018-11-07 14:44:17 +01:00
Steve Akinyemi
2fe528aa57 Add utility print function 2018-11-07 13:52:31 +01:00
Steve Akinyemi
5699b46566 Add todo notes 2018-11-07 11:57:28 +01:00
Steve Akinyemi
df0feb9b7f Update spectests 2018-11-07 11:57:28 +01:00
Steve Akinyemi
ffe383e611 Add updated upstream tests 2018-11-07 11:56:37 +01:00
Steve Akinyemi
3a65bdbac5 Fix memory grow issues 2018-11-07 11:55:48 +01:00
Syrus Akbary
702ea931b4 Fixed grow_memory call 2018-11-06 16:54:43 +01:00
Syrus Akbary
e7b4d06ec0 Fixed all Rust code warnings 2018-11-06 15:51:01 +01:00
Syrus Akbary
0045d263d2 Added support for assert_trap in spectests 2018-11-06 11:17:16 +01:00
Syrus Akbary
52614de22f Added signal handler to handle WebAssembly traps properly
Please read more about this here: https://github.com/CraneStation/wasmtime/issues/15
Code inspired by: 625a2b6c08
2018-11-06 11:15:40 +01:00
Syrus Akbary
4e435e5ae1 Implemented spectests assert trap 2018-11-06 01:32:38 +01:00
Syrus Akbary
f44466d1a3 Improved Instance docs 2018-11-02 11:37:45 +01:00
Steve Akinyemi
0bde1c2d00 Fix assert_return_canonical_nan and assert_return_arithmetic__nan for tests 2018-11-02 10:03:44 +01:00
Syrus Akbary
1f8a9d931c Improved speed of tests with a special feature flag 2018-10-30 17:35:11 +01:00
Syrus Akbary
a3f880b67e Deleted unused files 2018-10-30 15:58:24 +01:00
Syrus Akbary
d0ad33bdb9 Fixed support for non-deterministic NaNs
This got fixed by using f32,f64::from_bits rather than the canonical NaN representation
2018-10-30 13:28:00 +01:00
Syrus Akbary
82ac069c57 Added typecheck spectests 2018-10-30 12:25:31 +01:00
Syrus Akbary
c3849f44f5 Added store_retval spectests 2018-10-30 12:23:37 +01:00
Syrus Akbary
2a53858951 Added nop spectests 2018-10-30 12:19:45 +01:00
Syrus Akbary
ca6bc6b3b4 Added int_literals spectests 2018-10-30 12:15:47 +01:00
Syrus Akbary
13e9a7c9f5 Added int_exprs spectests 2018-10-30 12:13:15 +01:00
Syrus Akbary
17519d8cd7 Added forward spectests 2018-10-30 12:10:48 +01:00
Syrus Akbary
c9b6ee5a97 Added float_misc spectests 2018-10-30 12:09:07 +01:00
Syrus Akbary
d7f2dbb352 Added float_memory spectests 2018-10-30 12:07:00 +01:00
Syrus Akbary
43f0d7594f Added custom spectests 2018-10-30 12:05:00 +01:00
Syrus Akbary
25c90856e5 Added float_exprs spectests 2018-10-30 12:02:50 +01:00
Syrus Akbary
0cb3c9365f Added fac spectests 2018-10-30 11:59:51 +01:00
Syrus Akbary
b105a4583f Refactored visit_action to allow trap / panic catches 2018-10-30 11:57:53 +01:00
Syrus Akbary
e8b67d2e65 Added func spectests 2018-10-30 00:39:26 +01:00
Syrus Akbary
266ff13764 Added comments spectests 2018-10-30 00:34:46 +01:00
Syrus Akbary
ef345a5b45 Added binary spectests 2018-10-30 00:32:53 +01:00
Syrus Akbary
44d70a615e Added start spectests 2018-10-29 23:44:43 +01:00
Syrus Akbary
0aa26455b7 Automatically start modules first. Documented SKIP_MUTABLE_GLOBALS case 2018-10-29 23:40:20 +01:00
Syrus Akbary
df35bb5e06 Added if_ spectests 2018-10-29 16:16:39 +01:00
Syrus Akbary
49ca36435d Merge branch 'master' into tests/add-more-spectests
# Conflicts:
#	src/build_spectests.rs
#	src/spectests/mod.rs
#	src/spectests/switch.rs
#	src/spectests/tee_local.rs
2018-10-29 15:31:38 +01:00
Syrus Akbary
77457ea116 Added left_to_right spectests 2018-10-29 15:18:57 +01:00
Syrus Akbary
beafb5035c Allow multiple commands per spectest line 2018-10-29 15:18:16 +01:00
Steve Akinyemi
91bd5b27ba Add more wasm spectests 2018-10-29 14:36:26 +01:00
Syrus Akbary
2357f0ed13 Added memory_redundancy spectests 2018-10-29 14:33:36 +01:00
Syrus Akbary
572aa89bff Added support for PerformAction spectest command 2018-10-29 14:33:00 +01:00
Syrus Akbary
de8a93e30d Added loop spectests 2018-10-29 14:17:46 +01:00
Syrus Akbary
6217b2defa Added conversions spectest 2018-10-29 14:08:47 +01:00
Syrus Akbary
b519dc043e Improved documentation for manually skipped spec cases 2018-10-29 14:08:14 +01:00
Syrus Akbary
f9550c845c Added tee_local spectest 2018-10-29 13:27:52 +01:00
Syrus Akbary
c29a41f48f Added get_local spectests 2018-10-29 13:23:56 +01:00
Syrus Akbary
33b8757e90 Get env printf basic example working 2018-10-29 12:29:44 +01:00
Syrus Akbary
c97312345e Test 'tee_local' and 'set_global' in more operators
Based on this commit from the WebAssembly spec tests: c90bc9686f
2018-10-29 09:53:48 +01:00
Syrus Akbary
d772cacc98 Fixed globals to a correct func pointer. Added globals spectest
Also fixed f32, f64 to i64 conversion (from mem::transmute to byte type casting)
2018-10-28 21:50:57 +01:00
Syrus Akbary
c9725ecb8b Added stack spectest 2018-10-28 14:05:52 +01:00
Syrus Akbary
f4ce2c72ba Added switch spectest 2018-10-28 13:59:06 +01:00
Syrus Akbary
b94049f949 Fixed heap reference to memory. Added address spectest 2018-10-27 13:33:08 +02:00
Syrus Akbary
0e1dc88d9c Improved call_indirect tests and instance error message on mutable memories 2018-10-26 15:14:51 +02:00
Syrus Akbary
79506c4983 Make align partially pass 2018-10-26 14:53:33 +02:00
Syrus Akbary
6c18701f9d Improved tests to use a common vm_context for same modules 2018-10-26 12:49:29 +02:00
Syrus Akbary
d32422c2be Improved memory access to use the vm_context 2018-10-26 12:49:02 +02:00
Syrus Akbary
1882aa8fd6 Added excute function debug print statements 2018-10-25 19:22:52 +02:00
Syrus Akbary
ca6050e18b Fixed instantiate_streaming references 2018-10-24 12:36:43 +02:00
Syrus Akbary
dfa50ddc53 Remove unused code 2018-10-24 12:35:54 +02:00
Syrus Akbary
d4a21c0343 Added unimplemented instantiateStreaming function 2018-10-24 11:56:42 +02:00
Syrus Akbary
6db2d9f696 Documented the import module 2018-10-24 11:54:06 +02:00
Syrus Akbary
fe9fb9fe42 Improved memory documentation 2018-10-24 11:47:12 +02:00
Syrus Akbary
bcad000cc2 Improved utility functions docs 2018-10-24 11:44:33 +02:00
Syrus Akbary
1c6f677a78 Cleanup “module” module 2018-10-24 11:43:18 +02:00
Syrus Akbary
67b0d156a3 Refactored relocation code 2018-10-24 11:39:00 +02:00
Syrus Akbary
76850eed96 Fixed grow_memory function 2018-10-24 02:32:06 +02:00
Syrus Akbary
d797808d4b Improved Instance docs and removed unused code 2018-10-24 02:17:05 +02:00
Syrus Akbary
e9a968b4b0 Improved formatting 2018-10-24 02:01:46 +02:00
Syrus Akbary
48f7c46020 Set spectests to be only imported in testing 2018-10-24 02:01:16 +02:00
Syrus Akbary
c4b0261336 Added f64_cmp spectest 2018-10-24 02:00:59 +02:00
Syrus Akbary
3727d6e3de Added f64_bitwise spectest 2018-10-24 01:57:37 +02:00
Syrus Akbary
0c6d76bbba Added f32_cmp spectest 2018-10-24 01:55:08 +02:00
Syrus Akbary
36326007c5 Added f32_bitwise spectest. Improved f32, f64 NaN assertions 2018-10-24 01:51:52 +02:00
Syrus Akbary
f6a5bfaeee Added f64 spectest 2018-10-24 01:22:16 +02:00
Syrus Akbary
e8e7111e3f Added f32 spectest 2018-10-24 01:15:20 +02:00
Syrus Akbary
bb3e5dcfbe Allow LibCalls in the relocator 2018-10-24 01:14:59 +02:00
Syrus Akbary
363fb9894f Added exports spectest 2018-10-24 00:41:32 +02:00
Syrus Akbary
459be45480 Added data spectest 2018-10-24 00:27:15 +02:00
Syrus Akbary
a0a8e7512b Added labels spectest 2018-10-24 00:25:11 +02:00
Syrus Akbary
1b728e8903 Removed unused file 2018-10-24 00:25:02 +02:00
Syrus Akbary
a5da22aa64 Added break_drop spectest 2018-10-24 00:22:07 +02:00
Syrus Akbary
596c1ef72c Added const spectest 2018-10-24 00:17:36 +02:00
Syrus Akbary
d28b29ccc0 Fixed start function 2018-10-24 00:17:17 +02:00
Syrus Akbary
a3343a2ffb Added i64 spectest 2018-10-24 00:04:30 +02:00
Syrus Akbary
c8acc46e1f Formatted file 2018-10-24 00:02:35 +02:00
Syrus Akbary
1311057fd7 Added block spectest 2018-10-24 00:02:19 +02:00
Syrus Akbary
8b6b6152f4 Added br spectest 2018-10-23 23:58:13 +02:00
Syrus Akbary
98df45a7dd Improved spectest generator 2018-10-23 23:54:07 +02:00
Syrus Akbary
6653eeca4f Improved testing times by 5-10x
This is done via grouping of module/instance creation calls. This way the assert return calls are grouped to be tested in the same thread (therefore only one module creation is required rather than n=one for each test)
2018-10-23 15:43:44 +02:00
Syrus Akbary
8671025d97 Commented build_spectests file 2018-10-23 13:26:21 +02:00
Syrus Akbary
099b4ac1ac Added func_ptrs spectests 2018-10-23 13:13:03 +02:00
Syrus Akbary
10eff5f3c3 Fixed slice public pointers 2018-10-23 11:55:54 +02:00
Syrus Akbary
138d5a6bf4 Restored integration tests back as it was before 2018-10-23 11:49:26 +02:00
Syrus Akbary
3f5091780d Improved formatting 2018-10-23 11:43:43 +02:00
Syrus Akbary
837e67999f Show result 2018-10-23 11:41:55 +02:00
Syrus Akbary
46742c9aaf Call indirect fully working 2018-10-23 11:40:17 +02:00
Syrus Akbary
a796056c5f Improved module docs 2018-10-23 11:09:57 +02:00
Syrus Akbary
81ab8951c9 Working fully with the context pointer 2018-10-23 01:52:03 +02:00
Syrus Akbary
975b106731 Improved pointers 2018-10-23 01:44:19 +02:00
Syrus Akbary
2a118930c2 Table now working properly 2018-10-23 01:15:18 +02:00
Syrus Akbary
037f76e3b1 Improved context data 2018-10-22 21:03:43 +02:00
Syrus Akbary
4ab26226f9 Revert "Improved function pointers"
This reverts commit a625382158.
2018-10-22 18:56:29 +02:00
Syrus Akbary
a625382158 Improved function pointers 2018-10-22 18:36:51 +02:00
Syrus Akbary
7444837d09 Moved memories, tables and globals to be Unchecked slices 2018-10-22 18:31:12 +02:00
Syrus Akbary
7e7d230441 Fixed main function generate context 2018-10-22 12:59:21 +02:00
Syrus Akbary
6c9087a73d Added set_local tests 2018-10-19 12:44:19 +02:00
Syrus Akbary
617b66aad7 Documented the relocation module 2018-10-19 11:31:10 +02:00
Syrus Akbary
f95863964d Improved test banner 2018-10-19 11:31:02 +02:00
Syrus Akbary
76d9b2602e Added spectests autogenerated banner 2018-10-19 02:18:01 +02:00
Syrus Akbary
da492d9cec Improved build test script to only execute if necessary 2018-10-19 02:15:27 +02:00
Syrus Akbary
2953cf7836 Improved tests build script 2018-10-19 02:11:27 +02:00
Syrus Akbary
4029357d31 Added i32 tests 2018-10-19 01:44:48 +02:00
Syrus Akbary
0e50e09fc6 Added f32/f64 br_if tests 2018-10-19 01:31:31 +02:00
Syrus Akbary
a932fef217 Added automatic test generator from wasm spec 2018-10-19 01:29:12 +02:00
Syrus Akbary
5c5fbd309d Fixed memory issues 2018-10-19 01:28:16 +02:00
Syrus Akbary
6fce21e4d5 Added first tests for the vmctx (memory usage) 2018-10-18 19:01:09 +02:00
Syrus Akbary
80f3bf161e Removed unnecesary function 2018-10-18 12:05:00 +02:00
Syrus Akbary
96f2440960 Added working mock for memory (grow and size) 2018-10-18 00:09:04 +02:00
Syrus Akbary
6534939005 Make import object non optional 2018-10-17 17:14:35 +02:00
Syrus Akbary
ba050f35cc Improved wasmer script 2018-10-17 16:45:24 +02:00
Syrus Akbary
e97b47e147 Added ImportObject structure. Added integration tests 2018-10-17 16:08:51 +02:00
Syrus Akbary
c834f6b33e Function imports now fully working 2018-10-17 11:23:41 +02:00
Syrus Akbary
606afda496 Moved macros to common mod 2018-10-16 17:01:47 +02:00
Syrus Akbary
2cc93ddc38 Added basic identity function benchmark 2018-10-16 17:01:36 +02:00
Syrus Akbary
daefac46bb Improved tests coverage 2018-10-16 11:18:58 +02:00
Syrus Akbary
1879a14938 All function calls are now working 2018-10-16 03:24:36 +02:00
Syrus Akbary
7f7eff788d Function relocations are now working 2018-10-16 00:04:05 +02:00
Syrus Akbary
fade076fa4 Better reuse of function pointers in Instance 2018-10-15 20:45:16 +02:00
Syrus Akbary
b2d0968e49 Improved invoke function 2018-10-15 18:33:26 +02:00
Syrus Akbary
c989a61ce3 Improved tests 2018-10-15 15:58:23 +02:00
Syrus Akbary
dd0f1b1a2d Improved instance functions 2018-10-15 15:58:06 +02:00
Syrus Akbary
1482648219 Added module.info.exports for O(1) retrieval 2018-10-15 13:45:44 +02:00
Syrus Akbary
4c1e450c7f Added function pointer to the instance functions 2018-10-15 12:51:34 +02:00
Syrus Akbary
7685746655 Fixed Instance functions memory offsets 2018-10-15 12:44:24 +02:00
Syrus Akbary
714c27b502 Fixed used architecture 2018-10-15 12:44:07 +02:00
Syrus Akbary
ad31e295dd Fixed issue when there are no WebAssembly functions to allocate in memory 2018-10-15 11:52:36 +02:00
Syrus Akbary
69efaaaddd Fixed duplicated signature 2018-10-15 11:46:13 +02:00
Syrus Akbary
432ed4cdbf Make instance code more readable. 2018-10-15 11:46:04 +02:00
Syrus Akbary
69a6cd35f7 Improved debug macro 2018-10-15 11:45:40 +02:00
Syrus Akbary
8d790d78f9 Improved formatting 2018-10-15 03:03:00 +02:00
Syrus Akbary
78cf7800e5 Added function compilation 2018-10-15 02:48:59 +02:00
Syrus Akbary
e7788645d7 Added Module.verify function 2018-10-15 00:25:11 +02:00
Syrus Akbary
a9a580acee Formatted files 2018-10-14 23:48:59 +02:00
Syrus Akbary
48fbc850ea Improved runnable options 2018-10-14 23:47:35 +02:00
Syrus Akbary
6af9d0464a Improved main module 2018-10-14 23:17:24 +02:00
Syrus Akbary
3aaba4861f Improved errors module 2018-10-14 23:14:00 +02:00
Syrus Akbary
adbcf89470 Refactored instantiate function to return Module and Instance 2018-10-14 22:23:48 +02:00
Syrus Akbary
59e9c7fe29 Improved module structure. Removed unnecessary files 2018-10-14 22:10:53 +02:00
Syrus Akbary
e16dcfe232 Renamed from ModuleInstance to Module 2018-10-14 21:41:59 +02:00
Syrus Akbary
cc9caff8d5 Improved ModuleInstance automatic compilation 2018-10-14 21:13:19 +02:00
Syrus Akbary
8bd6657e84 environment fully working 2018-10-14 20:37:42 +02:00
Syrus Akbary
ac9edf39e6 Improved instance 2018-10-14 13:59:11 +02:00
Syrus Akbary
2febd4edde Improved make_table fn 2018-10-14 01:49:50 +02:00
Syrus Akbary
47215837fa Trying to port functions over 2018-10-13 19:22:57 +02:00
Syrus Akbary
39bf85e0ea Improved tests 2018-10-13 15:31:56 +02:00
Syrus Akbary
c8d4efaada Added ExecFunc 2018-10-12 12:39:33 +02:00
Syrus Akbary
b4a09a2e94 Improved tests 2018-10-12 02:45:09 +02:00
Syrus Akbary
9bca6940b3 First working version of the interpreter 2018-10-11 21:29:36 +02:00