Jakub Konka
5c555406ca
Add Rust impl of wasmtime_ssp_fd_prestat_get
...
In more detail, this commit:
* makes fd_prestat_get safe
* rewrites fd_prestats_get_entry in (safe) Rust
* creates helper macros for rwlock read lock and unlock
2019-05-01 15:32:28 -07:00
Dan Gohman
b0eab7398d
Don't decode the incoming events to poll_oneoff. ( #113 )
...
The events array is an output-only array, so we don't need to decode its
contents.
2019-04-30 06:42:48 -07:00
bjorn3
abf0048972
Merge data alignment
2019-04-30 14:06:34 +02:00
bjorn3
8216b83c65
Make alignment magic number constants
2019-04-30 14:06:34 +02:00
bjorn3
556d5d45e9
Rustfmt
2019-04-30 14:06:34 +02:00
bjorn3
cb6268118c
Make it possible to define data alignment
2019-04-30 14:06:34 +02:00
Benjamin Bouvier
443e48aee1
[wasm] Raise an error instead of panicking for unhandled function local types;
2019-04-30 13:58:18 +02:00
Benjamin Bouvier
3ce5d2057d
[wasm] Add the ability to provide a user-defined error;
2019-04-30 13:58:18 +02:00
Benjamin Bouvier
02e114cf3d
[wasm] Make FuncEnvironment functions fallible ( fixes #752 );
2019-04-30 13:58:18 +02:00
Benjamin Bouvier
efdb7d86b3
Fixes #607 : Use a wrapping multiply when computing div/rem magic numbers; ( #757 )
2019-04-30 11:46:54 +02:00
Dan Gohman
ce3c0d98d3
Don't rewrite EBUSY to EINVAL in path_rename.
2019-04-29 23:36:21 -07:00
Dan Gohman
049c926e08
Handle set-size rights correctly when truncating a file.
...
If a path_open call is requesting __WASI_RIGHT_FD_FILESTAT_SET_SIZE,
interpret that as a request for write privleges. If it is requesting
O_TRUNC, require __WASI_RIGHT_PATH_FILESTAT_SET_SIZE, since this is
a path operation rather than a FD operation.
2019-04-29 23:34:34 -07:00
Dan Gohman
e62607e552
When path_open fails, set the output fd to -1.
2019-04-29 23:34:13 -07:00
Jakub Konka
86b7a52009
Port host::__wasi_errno_t errors to Rust
...
They are now blacklisted in the bindgen.
2019-04-29 23:33:40 -07:00
Jakub Konka
a51ffb6b6d
Add Rust impl of wasmtime_ssp_sched_yield
...
Also, add Rust implementation of errno and convert_errno.
2019-04-29 23:33:40 -07:00
antoyo
79d6978e29
cranelift-simplejit: add a translation mechanism for LibCalls ( #747 )
2019-04-29 16:58:39 +02:00
Dan Gohman
26cbbaab41
Clarify that path_open's path is a relative path.
2019-04-29 07:34:28 -07:00
Dan Gohman
29c2616484
Update the documentation about C/C++ toolchain limitations.
...
Document that `setjmp`/`longjmp` and C++ exceptions are unsupported, and
update the documentation about the function signature mismatch bug to
reflect that it's now just a warning rather than a fatal error.
2019-04-28 16:41:58 -07:00
Antoni Boucher
d8d573208b
Remove unwrap() for branch folding
2019-04-28 16:32:01 -07:00
Antoni Boucher
4ee2747c5b
Fix cranelift_preopt panic
...
Fix #611
2019-04-28 16:32:01 -07:00
Jakub Konka
69e44caa29
Add Rust impl of wasmtime_ssp_proc_exit
2019-04-27 09:06:41 -07:00
Dan Gohman
e906370661
Make path_open return ELOOP on O_NOFOLLOW|O_DIRECTORY on a symlink.
2019-04-26 14:09:12 -07:00
Dan Gohman
f10cd2f4b1
Don't allow a preopened file descriptor to be renamed over.
...
This is consistent with fd_close's behavior, and is likely temporary
until other options are designed.
2019-04-26 13:06:42 -07:00
Pat Hickey
75ec950a12
Merge pull request #743 from CraneStation/expose-function-definitions
...
Expose function definitions, populate FaerieCompiledFunction
2019-04-25 14:58:36 -07:00
Benjamin Bouvier
95e6fc9efc
Avoid inserting checks during div/rem legalization when the input is a constant immediate;
2019-04-25 16:58:41 +02:00
Benjamin Bouvier
e3e66acfb1
[meta] Generate legalizations in the Rust crate;
2019-04-25 11:44:56 +02:00
Benjamin Bouvier
1f21349c4b
[meta] Add CPU modes to the meta crate;
2019-04-25 11:44:56 +02:00
Benjamin Bouvier
d00e42ede3
[meta] Port shared and x86 legalizations to the Rust crate;
2019-04-25 11:44:56 +02:00
Benjamin Bouvier
494f3abf1d
[meta] Add type inference, transforms and AST helpers for legalization;
2019-04-25 11:44:56 +02:00
Benjamin Bouvier
dfb27c3402
[meta] Make TypeVar shareable and mutable;
...
... since its type set can change over time during type inference. Use a
Rc<RefCell> to achieve this.
2019-04-25 11:44:56 +02:00
Benjamin Bouvier
b85146e945
[meta] Add helper methods and tests to TypeSet;
2019-04-25 11:44:56 +02:00
Benjamin Bouvier
e71ae7b02f
[meta] Add instruction predicates;
2019-04-25 11:44:56 +02:00
Benjamin Bouvier
d92778a19e
[meta] Add Instruction helpers and change its representation to make it easily copiable;
...
- adds helpers used by other parts of the code
- allows cheap copies by having Instruction be a lightweight ref-cloned
wrapper of the actual instruction's content.
2019-04-25 11:44:56 +02:00
iximeow
45013a1d2b
Expose function definitions and populate FaerieCompiledFunction with function lengths
2019-04-24 14:54:29 -07:00
Jef
21cdd55cd2
Fix various panics and miscompilations
2019-04-24 15:00:15 +02:00
Benjamin Bouvier
6acf9be540
Refactor simple-preopt to make it slightly simpler to read;
...
- don't use camel case but snake casing;
- longer variable names;
- more whitespace;
- add/wrap comments;
2019-04-24 14:14:44 +02:00
Jef
745d9ae162
Implement rem in backend - not every backend will act like x86
2019-04-24 12:32:17 +02:00
Benjamin Bouvier
00429ebe99
[meta] Fix outdented_line in srcgen;
2019-04-24 10:47:26 +02:00
Benjamin Bouvier
d2d2cdcd78
[meta] Rejigger comments in cdsl/formats;
2019-04-24 10:47:26 +02:00
Benjamin Bouvier
faa9b25691
[meta-python] Simplify Var ctor since it never is given a typevar argument;
2019-04-24 10:47:26 +02:00
Benjamin Bouvier
b3a950b589
[meta] Fix condition codes in immediates;
2019-04-24 10:47:26 +02:00
Jef
ea1ec9491e
Don't use cmov (no need)
2019-04-24 09:16:38 +02:00
Dan Gohman
7813cc9d2d
Fix a trace logging message.
2019-04-23 12:08:06 -07:00
Jake Lang
a2eafd400f
Document using wasmtime as a dependency in the README
2019-04-19 15:09:59 -07:00
Joel Martin
b8fbae29e1
WASI-api.md: fix fsync -> fcntl
2019-04-18 13:25:40 -07:00
Jef
a2ef962ed7
Fix shift's incorrect register freeing logic
2019-04-17 16:06:51 +02:00
Jef
82e810c8d2
Avoid emitting tests on select
2019-04-17 15:47:22 +02:00
Benjamin Bouvier
274415d5ee
Fixes #738 : Check ebbs used in jump tables in the verifier;
2019-04-17 15:37:27 +02:00
Jef
ced654f907
Allow register allocation to fail
2019-04-17 15:13:38 +02:00
Tyler McMullen
3b1583ebb7
Style changes in response to code review.
2019-04-17 13:15:41 +02:00