Commit Graph

6 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
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
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
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