Commit Graph

2765 Commits

Author SHA1 Message Date
Bruce Mitchener
81d6731e76 clippy: Remove explicit return statements. 2018-09-24 09:40:32 -07:00
Bruce Mitchener
c8a65a721c clippy: Remove useless format call. 2018-09-24 09:40:32 -07:00
Bruce Mitchener
e07e159bda filetests: run_passes can take &str, not &String. 2018-09-24 09:40:32 -07:00
Sergey Pepyakin
2a7cc7e644 Bump wabt version to 0.6. 2018-09-23 16:35:33 -07:00
Aaron Power
09f2b78b14 Added FunctionBuilder::{call_memcpy, call_memset, call_memmove} 2018-09-23 11:25:39 +01:00
Dan Gohman
3e996c198f Remove the scroll 0.9.0 dependency.
Scroll 0.9.2 is now published which fixes the issue in 0.9.1, so
we can drop our fixed dependency on 0.9.0.
2018-09-22 22:24:29 -07:00
Aaron Power
c187e7a345 Replaced LibCall's fmt::Display implementation 2018-09-22 21:43:31 -07:00
Dan Gohman
15a237520e Depend on scroll 0.9.0 to fix Rust 1.25 compatibility. 2018-09-22 20:59:54 -07:00
Dan Gohman
ab99720959 Bump version to 0.22.0 2018-09-21 21:39:41 -07:00
Dan Gohman
10edc1b6ab Format src/wasm.rs with newer rustfmt. 2018-09-21 21:29:14 -07:00
Dan Gohman
cb6b1a76db Add a use std::vec::Vec; to fix the no_std build. 2018-09-21 21:14:06 -07:00
Dan Gohman
46beddecde Update to capstone 0.5.0. 2018-09-21 20:58:22 -07:00
Dan Gohman
8055abf90d Add a mention of simplejit-demo to the README. 2018-09-21 20:52:59 -07:00
Dan Gohman
ea0c196c11 More introductory documentation (#520)
* Add a comment to .rustfmt.toml explaning why it's here.

* Use `<details>` for specialized information in README.md.

* Describe a more elaborate issue-labelling system.
2018-09-21 20:16:55 -07:00
Dan Gohman
8d6a8e9069 Remove Module's finalize_function and finalize_data. (#519)
* Remove `Module`'s `finalize_function` and `finalize_data`.

Remove the ability to finalize individiual functions and data objects,
and instead just provide a way to finalize everything that's been
defined but not yet finalized. This allows SimpleJIT to share an
allocation between multiple functions without having to worry about
individual functions being finalized and needing to be published
without the other functions in the same allocation.

Users of the return values of `Module`'s `finalize_function` and
`finalize_data` should now use `get_finalized_function` and
`get_finalized_data` to obtain these values.
2018-09-21 20:13:33 -07:00
Dan Gohman
fd081f2af8 Update README.md to mention the actual version of Rust supported. 2018-09-21 19:50:05 -07:00
Dan Gohman
e7565a8893 Mention the Windows x64 calling convention support in README.md. 2018-09-21 19:49:24 -07:00
Dan Gohman
c840fb2f08 Move tests/moduletests.rs into lib/simplejit/tests.
These tests depend on cranelift-simplejit, which is higher-level than the
other crates they depend on, so lib/simplejit is a good place for them.
2018-09-19 20:19:57 -07:00
Dan Gohman
6e9c33a1ef Mark JIT memory as readable in addition to executable.
While we don't currently need this, we will for jump tables and constant
pools.
2018-09-19 20:11:37 -07:00
Dan Gohman
d514cec065 Avoid unneeded '&'s in let patterns. 2018-09-19 20:11:37 -07:00
Dan Gohman
3228d73f33 Add more content to cranelift-entity's README.md. (#515)
* Add more content to cranelift-entity's README.md.

Summarize what cranelift-entity provides, and how it differs from
similar systems such as slotmap, which was recently highlighted in the
RustConf 2018 Closing Keynote.
2018-09-19 13:49:59 -07:00
Dan Gohman
2fe96c30a6 Check in the Crane and Ferris drawing so that people can remix it :-).
Fixes #514.
2018-09-13 15:30:39 -07:00
Dan Gohman
53a0c6c67f Update to the rustfmt in rust 1.29, which is now stable. 2018-09-13 12:59:25 -07:00
Dan Gohman
f23ea04242 Fix a panic when splitting a critical edge on a jump_table with nulls.
This fixes #505.
2018-09-12 16:59:03 -07:00
Dan Gohman
f6519c87a4 Improve the assertion failure message for sealing a block twice. 2018-09-12 16:58:36 -07:00
Dan Gohman
f2177deec1 Improve assertion messages in Module finalization.
When an object being finalized references an object declared as needing
a definition, the definition needs to be available. Add asserts to catch
this specific case.
2018-09-12 16:07:43 -07:00
Dan Gohman
9e65b694bd Minor code simplification; avoid an unneeded match. 2018-09-12 16:07:14 -07:00
Dan Gohman
d0f703a6ff Fix the type of table bounds in DummyEnvironment.
Also, fix the wasm testsuite harness to run the verifier with a
TargetIsa so that it catches problems like this.
2018-09-12 14:40:20 -07:00
Maddy
52e6b07058 Update the reload pass to replace copies with fill/spill instructions. 2018-09-12 14:15:45 -07:00
Nick Fitzgerald
ea85018ccf clif-util: fix clif-util pass subcommand arguments
Because of the way that the `pass` subcommand orders its arguments, the
positional "single-file" input cannot be optional with a default value, because
it is followed by required positional arguments. If it were optional, that would
result in argument ambiguity where `clap` cannot tell if the optional positional
argument is supplied, or if the given argument is the next required positional
argument.

Before this commit:

```
$ cargo run --bin clif-util -- pass ./filetests/dce/basic.clif dce
   Compiling cranelift-tools v0.21.0 (file:///Users/fitzgen/src/cranelift)
    Finished dev [unoptimized + debuginfo] target(s) in 4.38s
     Running `target/debug/clif-util pass ./filetests/dce/basic.clif dce`
thread 'main' panicked at 'Found positional argument which is not required with a lower index than a required positional argument: "single-file" index 1', /Users/fitzgen/.cargo/registry/src/github.com-1ecc6299db9ec823/clap-2.32.0/src/app/parser.rs:612:21
note: Run with `RUST_BACKTRACE=1` for a backtrace.
```

After this commit:

```
$ cargo run --bin clif-util -- pass ./filetests/dce/basic.clif dce
   Compiling cranelift-filetests v0.21.0 (file:///Users/fitzgen/src/cranelift/lib/filetests)
   Compiling cranelift-tools v0.21.0 (file:///Users/fitzgen/src/cranelift)
    Finished dev [unoptimized + debuginfo] target(s) in 5.96s
     Running `target/debug/clif-util pass ./filetests/dce/basic.clif dce`
1 tests
```
2018-09-11 10:16:14 -07:00
Dan Gohman
9ebe1cc26c Merge pull request #503 from joshuawarner32/simplejit-example-improvements
Improve simplejit-example
2018-09-11 09:49:07 -07:00
Dan Gohman
40bcd613cd Merge branch 'master' into simplejit-example-improvements 2018-09-11 09:45:43 -07:00
Dan Gohman
cadb76ef71 Rename "Cretonne" to "Cranelift" in image files. 2018-09-10 10:00:45 -07:00
Dan Gohman
b4c7451ae5 Bump version to 0.21.1 2018-09-10 10:00:45 -07:00
Joshua Warner
f012bd8500 Demonstrate arguments, returns, and adds in example 2018-09-06 22:29:44 -07:00
Joshua Warner
e051e9f4c8 Fix std feature propagation 2018-09-06 22:29:43 -07:00
Nick Fitzgerald
90756a8a01 clif-util: Default to reading input files from stdin
Fixes #495
2018-09-06 17:35:26 -07:00
Nick Fitzgerald
8fb681b86d clif-util wasm: don't panic when terminal colors are unsupported
This breaks inside of Emacs' `M-x shell` and `compilation-mode`.
2018-09-06 17:35:26 -07:00
Dan Gohman
da0243b0ab Update docs to reflect that saturating fp-to-int conversion is now implemented. 2018-09-05 16:35:41 -07:00
Dan Gohman
f3c46ad2a2 Add more documentation about Module and Backend. 2018-09-05 15:19:37 -07:00
Dan Gohman
437a657899 Document tables. 2018-09-05 14:30:34 -07:00
Dan Gohman
8d41d2cc43 Add more documentation for special parameters. 2018-09-05 14:30:34 -07:00
Dan Gohman
608e74d8cb Document that b8 etc. are intended for use as SIMD elements. 2018-09-05 14:23:03 -07:00
Dan Gohman
1e0c9b546b Move simplejit after the umbrella crate in publish-all.sh.
Simplejit's example program uses the umbrella, so publish it after the
umbrella crate to preserve the topological ordering.
2018-09-05 13:49:10 -07:00
Dan Gohman
e8878ba504 Bump version to 0.21.0 2018-09-04 22:04:22 -07:00
Dan Gohman
112e4a6083 Add a use std::vec::Vec; to fix the no_std build. 2018-09-04 21:57:32 -07:00
Dan Gohman
d4b8622393 Rename the VOID type to INVALID and clean up obsolete comments.
The VOID type isn't used for anything resembling what "void" means in C,
so rename it to INVALID to avoid confusion.
2018-09-04 21:46:22 -07:00
Dan Gohman
18900df4d5 Clean up obsolete comments. 2018-09-04 21:22:50 -07:00
Dan Gohman
ca9da7702e Reorganize the global value kinds. (#490)
* Reorganize the global value kinds.

This:
 - renames "deref" global values to "load" and gives it a offset that works
   like the "load" instructions' does
 - adds an explicit "iadd_imm" global value kind, which replaces the
   builtin iadd in "vmctx" and "deref" global values.
 - also renames "globalsym" to "symbol"
2018-09-04 21:09:04 -07:00
Caroline Cullen
59b83912ba Adds pass command to clif-util. (#487)
* Adds pass command to clif-util.
2018-09-04 16:31:24 -07:00