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.
Make cretonne-codegen's `result` module private, and instead just export
`CodegenError` and `CodegenResult` at the top level of the
cretonne-codegen crate. This makes them more consistent with Result and
Error types in other cretonne crates.
This switches from a custom list of architectures to use the
target-lexicon crate.
- "set is_64bit=1; isa x86" is replaced with "target x86_64", and
similar for other architectures, and the `is_64bit` flag is removed
entirely.
- The `is_compressed` flag is removed too; it's no longer being used to
control REX prefixes on x86-64, ARM and Thumb are separate
architectures in target-lexicon, and we can figure out how to
select RISC-V compressed encodings when we're ready.
* Update to rustfmt-preview.
* Run "cargo fmt --all" with rustfmt 0.4.1.
rustfmt 0.4.1 is the latest release of rustfmt-preview available on the
stable channel.
* Fix a long line that rustfmt 0.4.1 can't handle.
* Remove unneeded commas left behind by rustfmt.
* test-no_std: use cargo +nightly
assume folks have rustup set to use stable by default
* cretonne-module, -faerie, -simplejit: use new ModuleError enum
CtonError is not really appropriate for use in the module system.
Instead, create a new enum ModuleError, which implements failure::Fail
(works with no_std). Translate existing panics and unimplemented
error cases to return ModuleErrors.
* cretonne-faerie: export FaerieProduct
* cretonne-module: expose FuncOrDataId, and Module::get_name to lookup
This is helpful for looking up a name that has already been declared.
Also, implement FuncOrDataId -> ExternalName conversion.
* cretonne-faerie: depend on faerie 0.3.0
which has bugfix for data relocations
* cretonne-module: change InvalidDefinition to InvalidImportDefinition
per dan's code review. plus another typo fix
* cretonne-faerie: add optional manifest of all traps from codegen
* cretonne-module: provide more context in panics
* cretonne-faerie: updates to docs
* cretonne-faerie: return an Err instead of debug_assert when isa not pic
These are the main obvious place where ExternalName is exposed in the
Module API, so add comments advising users that they can use Module to
call these functions with the appropriate ExternalNames automatically.
This eliminates API confusion and surface area with respect to what state
the `Backend` needs to be in at different points.
Now, API users will construct a `Builder`, and pass it into the `Module`
which uses it to constrct a `Backend`. The `Backend` instance only lives
inside the `Module`. And when finished, the `Module` can return a
`Product` back to the user providing any outputs it has.