Commit Graph

3528 Commits

Author SHA1 Message Date
losfair
1477062474 Add test case for PR 486 fix. 2019-06-08 22:55:24 +08:00
laizy
1780d57df1 add Mechine::release_locations_keep_state test 2019-06-08 22:25:20 +08:00
laizy
8105c0c16f fix stack offset check 2019-06-08 15:03:56 +08:00
bors[bot]
5db8c13465 Merge #450
450: Metering. r=bjfish a=losfair

TODO
- [x] Add test to verify points used after function call
- [x] Add test to verify function call will trap
- [x] Add documentation

Co-authored-by: losfair <zhy20000919@hotmail.com>
Co-authored-by: Brandon Fish <brandon.j.fish@gmail.com>
2019-06-07 20:44:41 +00:00
Brandon Fish
f6ecfa40cb
Merge branch 'master' into feature/metering 2019-06-06 23:33:31 -05:00
Brandon Fish
e87d507162 Add black_box to benchmarking 2019-06-06 23:30:31 -05:00
Brandon Fish
418764a15f Add get/set gas used for benchmark 2019-06-06 23:25:11 -05:00
Syrus Akbary
98e04193af
Merge branch 'master' into feature/better-memory-access-for-emscripten 2019-06-06 18:03:55 -07:00
Mark McCaskey
811acd7e68 probably actually fix the wasi ptr array bug now 2019-06-06 16:19:15 -07:00
bors[bot]
ade70c6e1a Merge #484
484: fix bugs in emscripten socket syscalls r=MarkMcCaskey a=MarkMcCaskey

resolves #482 
This PR fixes:
- incorrect argument order
  - which cascaded in to a casting issue 
  - which cascaded in to misaligning the arguments of a function
  - which cascaded in to attempting to access an OOB pointer
- sets fd limit to 1024, rather than emscripten's 64
- updates `prlimit64` to return the correct result for `RLIMIT_NOFILE`
- fixes bug in `prlimit64` due to a mistransaltion of the emscripten javascript

Co-authored-by: Mark McCaskey <mark@wasmer.io>
2019-06-06 22:50:06 +00:00
Mark McCaskey
d7ea46bab7 add wasmptr memory abstraction to emscripten; update wasi array access 2019-06-06 15:45:19 -07:00
Mark McCaskey
6f633cee6f fix pointer casting lint in emscripten syscall191 2019-06-06 12:07:19 -07:00
Mark McCaskey
8df63b1b6e fix bugs in emscripten socket syscalls 2019-06-06 11:55:05 -07:00
Jesús Leganés-Combarro 'piranna
a9bcb7d932 Merge branch 'master' into command/pyodide 2019-06-06 18:41:06 +02:00
losfair
c6cd49a370 Support getting/setting metering points and internal fields with a Ctx. 2019-06-06 14:10:57 +08:00
Brandon Fish
27eacf0c4f Add metering benchmark 2019-06-06 00:37:04 -05:00
bors[bot]
4913cfaff4 Merge #481
481: Added context trampoline into runtime r=losfair a=syrusakbary

Based on #450 

Co-authored-by: losfair <zhy20000919@hotmail.com>
2019-06-05 11:36:54 +00:00
Brandon Fish
f832c8d315 Try to fix unused import error 2019-06-04 23:25:19 -05:00
losfair
f5243aff5e Cargo fmt 2019-06-05 11:52:25 +08:00
losfair
f2d8aad73a Support checking the execution limit exceeded error. 2019-06-05 11:51:33 +08:00
losfair
0867208e0c Implement {get,set}_points_used. 2019-06-05 02:28:19 +08:00
losfair
69944c1dc2 Fix ctx layout in LLVM. 2019-06-05 02:13:10 +08:00
losfair
66dcec91c4 Add comments for trampoline_x64. 2019-06-05 01:59:20 +08:00
losfair
f4df568e41 Naming fixes and documentation for trampoline API. 2019-06-05 01:38:35 +08:00
losfair
f1b27d5774 Cargo fmt 2019-06-05 01:26:35 +08:00
losfair
669f76025c Add callinfo trampoline into the C API. 2019-06-05 01:25:37 +08:00
losfair
b2869e181c Cargo fmt 2019-06-05 01:11:54 +08:00
losfair
8a74399c6e Add callinfo trampoline support. 2019-06-05 01:11:10 +08:00
losfair
06280e225e Fix unused_imports error on lazy_static. 2019-06-03 15:31:42 -07:00
losfair
0a44add31c Fix clippy errors. 2019-06-03 15:31:42 -07:00
losfair
d70cb9695e Add trampoline-related functions to C API. 2019-06-03 15:31:42 -07:00
losfair
7808c68cb2 Cargo fmt 2019-06-03 15:31:42 -07:00
losfair
ae19e7f71b Trampoline for calling with context. 2019-06-03 15:31:42 -07:00
Brandon Fish
66f9049a06 Reset LLVM related code to master 2019-06-02 19:36:26 -05:00
Brandon Fish
151af82e31 Remove debugging println 2019-06-02 15:51:52 -05:00
Brandon Fish
605c0dc399 Fix indentation in Makefile 2019-06-02 15:45:43 -05:00
Brandon Fish
0c3109fb55 Update Makefile and test configuration 2019-06-02 15:43:02 -05:00
Brandon Fish
8fdc4f9bc2 Start documenting Metering 2019-06-02 15:42:25 -05:00
Brandon Fish
f9c8f41232 Remove points_limit and update tests 2019-06-02 13:37:51 -05:00
Brandon Fish
c020c39193 Move get/set points used to middleware 2019-06-02 13:21:00 -05:00
Brandon Fish
e533a8a7b5 Add tests for metering, add option to compiler config 2019-06-02 11:37:02 -05:00
Brandon Fish
995ecefa92 Cargo fmt 2019-06-02 09:49:21 -05:00
Brandon Fish
f029ea6231 Merge branch 'master' into feature/metering 2019-06-02 09:31:34 -05:00
Jesús Leganés-Combarro 'piranna
222b582207 Merge remote-tracking branch 'origin/master' into command/pyodide 2019-06-02 14:10:25 +02:00
bors[bot]
df486b7beb Merge #437
437: Use the new code generator API for Cranelift backend. r=bjfish a=bjfish

Refactor for Cranelift backend to use new code generator API
- [x] Add initial stubbed code generators
- [x] Implement code generators
- [x] Remove old compiler code
- [x] Re-enable warnings
- [x] Cleanup expect/unwrap debug usages

Co-authored-by: Brandon Fish <brandon.j.fish@gmail.com>
Co-authored-by: Brandon Fish <bjfish@users.noreply.github.com>
2019-06-02 04:51:48 +00:00
Brandon Fish
6a5e7051b2 Fix workaround 2019-06-01 23:39:43 -05:00
Brandon Fish
6acf854052 Try workaround to force cranelift_wasm to rebuild to try to fix CI issue 2019-06-01 23:26:17 -05:00
Brandon Fish
910653750c Re-enable cache 2019-06-01 19:12:23 -05:00
Brandon Fish
a56e0f22ad Resetting Cargo.lock 2019-06-01 18:22:23 -05:00
Brandon Fish
5fd8598fd1 Temporary disable cache for test 2019-06-01 18:14:03 -05:00