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