Commit Graph

86 Commits

Author SHA1 Message Date
Dan Gohman
91477d21c8 Add an as_u32() member to entity_impl types.
This allows us to avoid a lot of casting indices back to u32.
2018-12-11 15:40:24 -05:00
Dan Gohman
5d7ece3d15 Fix clippy warning namespaces. 2018-12-06 20:50:38 -05:00
Dan Gohman
5adab629f2 Update to the rustfmt in rust 1.31, which is now stable. 2018-12-06 16:15:48 -05:00
Dan Gohman
30654a6a7d Bump version to 0.25.0 2018-11-26 22:31:07 -08:00
Dan Gohman
c17579e7ec Bump version to 0.24.0 2018-11-26 22:18:36 -08:00
Benjamin Bouvier
e13b0886dc SimpleJIT: Ignore result of writeln! to avoid a compiler warning when writing the perf map; 2018-11-08 11:41:04 -08:00
Dan Gohman
14dfc0d1b6 Bump version to 0.23.0. 2018-11-07 16:18:04 -08:00
Dan Gohman
38e8667f97 Adjust whitespace to match the upstream exception text.
This is a whitespace-only change.
2018-11-07 16:07:51 -08:00
Dan Gohman
b476f823d4 Update to target_lexicon 0.2.0. 2018-11-07 16:01:15 -08:00
Dan Gohman
d4f8eb7453 Introduce a TargetFrontendConfig type. (#570)
* Introduce a `TargetFrontendConfig` type.

`TargetFrontendConfig` is information specific to the target which is
provided to frontends to allow them to produce Cranelift IR for the
target. Currently this includes the pointer size and the default calling
convention.

The default calling convention is now inferred from the target, rather
than being a setting. cranelift-native is now just a provider of target
information, rather than also being a provider of settings, which gives
it a clearer role.

And instead of having cranelift-frontend routines require the whole
`TargetIsa`, just require the `TargetFrontendConfig`, and add a way to
get the `TargetFrontendConfig` from a `Module`.

Fixes #529.
Fixes #555.
2018-11-02 13:51:42 -07:00
bjorn3
6f8c3012c6 SimpleJit perf map (#571)
* SimpleJit perf map
2018-11-02 12:57:14 -07:00
Dan Gohman
9471c06da4 Update to use newer Rust features.
This re-introduces several cleanups that we previously deferred for not
supporting Rust 1.25.
2018-10-31 12:54:16 -07:00
Boris-Chengbiao Zhou
b288c6001a Fix all clippy warnings (#564)
* Fix all clippy warnings

* Revert usage of inclusive ranges

* Remove redundant function argument

* Revert use of unavailable pointer methods

* Introduce ContiguousCaseRange
2018-10-22 21:52:35 -07:00
bjorn3
c2069762ef Declare br_table otherwise ebb as predecessor (#551)
* Declare br_table otherwise ebb as predecessor (fixes #545)
2018-10-09 15:38:16 -07:00
Dan Gohman
dc9221a70c Fix unused variable warnings. 2018-10-04 10:44:04 -07:00
Dan Gohman
ab99720959 Bump version to 0.22.0 2018-09-21 21:39:41 -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
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
53a0c6c67f Update to the rustfmt in rust 1.29, which is now stable. 2018-09-13 12:59:25 -07:00
Dan Gohman
9e65b694bd Minor code simplification; avoid an unneeded match. 2018-09-12 16:07:14 -07:00
Dan Gohman
40bcd613cd Merge branch 'master' into simplejit-example-improvements 2018-09-11 09:45:43 -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
Dan Gohman
f3c46ad2a2 Add more documentation about Module and Backend. 2018-09-05 15:19:37 -07:00
Dan Gohman
e8878ba504 Bump version to 0.21.0 2018-09-04 22:04:22 -07:00
Dan Gohman
7fa0a38793 Bump version to 0.20.0 2018-08-28 16:37:52 -07:00
Dan Gohman
d2943ec32d Add a minimal SimpleJIT example program.
This minimally demonstrates usage of the API, and serves as a very small
testcase to test that the basic JIT mechanisms are working.
2018-08-28 16:13:23 -07:00
Dan Gohman
9ada394d11 [SimpleJIT] When finalizing multiple functions, make them all executable at the end. (#474)
Add `publish()` function to cranelift-module's `Backend` trait, which
allows `finalize_all()` to defer making memory executable until it
has finished all of the patching it needs to do.
2018-08-28 15:27:52 -07:00
Dan Gohman
2c9b7fd73a Add "no-std" category to crates supporting no-std.
And add "wasm" category to cranelift-wasm.
2018-08-22 12:51:54 -07:00
Dan Gohman
77eb38c41f [Module] Remove DataDescription's writable field.
It was redundant, as data object declarations also have a writable
field, so just use that, avoiding the need for users to declare the
same thing twice.

Fixes #456.
2018-08-20 16:17:46 -07:00
ms2300
30d09cf6b0 Fixing a couple clippy warnings : #392 2018-08-20 13:35:02 -07:00
Dan Gohman
ae1a17f6b3 [SimpleJIT] Fix allocation of readonly memory.
Fixes #457.
2018-08-16 18:15:22 -07:00
Dan Gohman
6a07c72867 Bump version to 0.19.0 2018-08-14 12:55:34 -07:00
Dan Gohman
cc4bf1c7fb Deny unstable_features in "std" builds. 2018-08-13 12:51:49 -07:00
Daniel Keep
60c2cad06e Add SimpleJIT internal symbol table.
Allows for host programs to directly expose symbols to jitted code without
needing to deal with platform-specific linker arguments, or dynamic
dispatch.
2018-08-13 12:19:31 -07:00
Dan Gohman
cd02010a78 Bump version to 0.18.1 2018-08-02 20:10:23 -07:00
Dan Gohman
c4a056a7a0 Bump version to 0.18.0 2018-08-02 18:34:22 -07:00
Dan Gohman
cd75176f10 Update to the rustfmt in rust 1.28, which is now stable.
Also, rustfmt's --write-mode=check is now named --check.
2018-08-02 09:55:40 -07:00
Dan Gohman
d6d1e7253d Bump version to 0.17.0 2018-07-23 16:57:51 -07:00
Dan Gohman
6cb03a873d Bump version to 0.17.0-alpha 2018-07-23 16:15:53 -07:00
Dan Gohman
c068721964 Bump version to 0.16.1 2018-07-18 13:33:15 -07:00
Dan Gohman
ce27b2a74f Bump version to 0.16.0 2018-07-17 15:49:04 -07:00
Dan Gohman
17db4e6be8 Add a LICENSE file to each crate.
The individual crates are published separately from the main repository
on crates.io. To ensure that a copy of the LICENSE file accompanies all
published copies of the code, give each crate its own LICENSE file.
2018-07-17 12:48:27 -07:00
Dan Gohman
a28a3c3ea9 Bump version to 0.15.0 2018-07-14 07:27:35 -07:00
Dan Gohman
8930cb1b5d Update dependency versions. 2018-07-13 16:34:34 -07:00
Dan Gohman
262689908e Bump version to 0.14.0 2018-07-13 09:26:46 -07:00
Dan Gohman
401c872c52 Update more paths for the CraneStation/cranelift rename. 2018-07-13 09:22:15 -07:00
Dan Gohman
f4dbd38a4c Rename Cretonne to Cranelift! 2018-07-13 09:15:16 -07:00