Commit Graph

159 Commits

Author SHA1 Message Date
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
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
Dan Gohman
19a636af96 Change Cretonne's license to "Apache-2.0 WITH LLVM-exception".
This adds the "LLVM-exception" to Cretonne's existing Apache-2.0
license.

https://spdx.org/licenses/LLVM-exception.html
2018-07-13 07:25:32 -07:00
Dan Gohman
112ae6df56 Bump version to 0.13.0 2018-07-02 15:48:18 -07:00
Dan Gohman
cc94adca3b Update to the rustfmt in rust 1.27, which is now stable. (#377) 2018-06-26 13:06:16 -07:00
Dan Gohman
0349270b58 Bump version to 0.12.0 2018-06-16 07:50:27 -07:00
Lachlan Sneff
3686fc2fc7 Fix typos caused by find-and-replace 2018-06-15 18:33:30 -07:00
Lachlan Sneff
5c320a0d30 Change GlobalVar to GlobalValue 2018-06-15 18:33:30 -07:00
Dan Gohman
dfc7065252 Bump version to 0.11.0 2018-06-15 08:46:25 -07:00
Dan Gohman
9542cab5ed Bump version to 0.10.0 2018-06-12 12:29:59 -07:00
Dan Gohman
944251260b Bump version to 0.9.0 2018-06-07 11:46:36 -07:00
Dan Gohman
b2b20a95a1 Fix missing no_std support in cretonne-module.
And, tidy up the extern crate declarations in the std replacement modules.
2018-06-07 11:34:55 -07:00
Dan Gohman
a1fe0f82e1 Update to the latest stable rustfmt, 0.4.2-stable (febbb36 2018-04-12). 2018-05-29 10:37:38 -07:00
Dan Gohman
6b88cd44a8 Update to rustfmt-preview (#348)
* 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.
2018-05-25 11:38:38 -07:00
Dan Gohman
4c150907bf Issue better error messages in use_var and def_var.
Include the name of the variable when diagnosing uses and defs of
undeclared variables. And, add an assert to def_var to check that the
declared type of a variable matches the value type of the def.

With this change, `Variable` implementations must now implement `Debug`.
2018-05-14 20:11:51 -10:00
Dan Gohman
b4f9eb5e55 Bump versino to 0.8.0 2018-05-01 19:54:21 -07:00
Dan Gohman
9c87f3ac87 Fix some warnings in no_std builds.
The dbg! macro expands to nothing in no_std mode, so variables that are
only used for debugging prompt unused variable warnings.

Also, allow unstable_features in no_std builds, since they use
feature(alloc), which is an unstable feature.
2018-04-30 14:04:14 -07:00
Dan Gohman
94a883abae Make settings::Flags::new consume the Builder.
This makes it more clear what the relationship is between the Builder
and the resulting Flags.
2018-04-30 13:53:36 -07:00
Dan Gohman
525f01713b Bump version to 0.7.0 2018-04-27 06:10:15 -07:00
Dan Gohman
e356c742aa Bump version to 0.6.0 2018-04-23 14:35:23 -07:00
Dan Gohman
c5b15c2396 Refactor calling convention settings. (#304)
Add a calling-convention setting to the `Flags` used as part of the
`TargetIsa`. This allows Cretonne code that generates calls to use the
correct convention, such as when emitting libcalls during legalization
or when the wasm frontend is decoding functions. This setting can be
overridden per-function.

This also adds "fast", "cold", and "fastcall" conventions, with "fast"
as the new default. Note that "fast" and "cold" are not intended to be
ABI-compatible across Cretonne versions.

This will also ensure Windows users will get an `unimplemented!` rather
than silent calling-convention mismatches, which reflects the fact that
Windows calling conventions are not yet implemented.

This also renames SpiderWASM, which isn't camel-case, to Baldrdash,
which is, and which is also a more relevant name.
2018-04-22 21:35:18 -07:00
Dan Gohman
5f84afee2c Merge remote-tracking branch 'origin/master' into no_std 2018-04-18 17:20:02 -07:00
Dan Gohman
1ba468b230 Bump version to 0.5.1 2018-04-17 22:18:30 -07:00
Dan Gohman
bf597b7abf Enable and fix several more clippy lints. 2018-04-17 17:05:03 -07:00
morenzg
a10a6a0df0 Merge branch 'master' into no_std 2018-04-17 16:56:33 -04:00
Dan Gohman
1f43ec09f3 Bump version to 0.5.0 2018-04-17 10:58:33 -07:00
Dan Gohman
f43b6aca1a Use lower-case letters for github URLs.
This makes it a little more consistent; now, "cretonne" is never capitalized
in identifier, path, or URL contexts. It is capitalized in natural
language contexts when referring to the project.
2018-04-17 09:47:11 -07:00
Dan Gohman
24fa169e1f Rename the 'cretonne' crate to 'cretonne-codegen'.
This fixes the next part of #287.
2018-04-17 09:46:56 -07:00
Dan Gohman
7767186dd0 Rename 'cton_*' library names to match the 'cretonne_*' crate names.
This renames `cton_frontend` to `cretonne_frontend` and so on.

This fixes the first part of #287.
2018-04-17 07:55:59 -07:00
Dan Gohman
f552c8768e Bump version to 0.4.4 2018-04-16 16:37:00 -07:00
Dan Gohman
a4523cf0b8 Bump version to 0.4.3 2018-04-16 14:48:11 -07:00
Dan Gohman
781d3ee3ff Bump version to 0.4.2 2018-04-03 16:04:54 -07:00
Dan Gohman
07693048f0 Merge remote-tracking branch 'origin/master' into no_std 2018-03-30 15:18:29 -07:00
Dan Gohman
c50675deb8 Format with nightly rustfmt-preview, then with rustfmt-0.9 again. 2018-03-30 13:23:47 -07:00
Dan Gohman
8d5fecd324 Format with stable rustfmt-preview, then with rustfmt-0.9 again. 2018-03-30 13:17:15 -07:00
Dan Gohman
72b7a4b3ef Add iter() and values() functions to PrimaryMap and EntityMap.
`iter()` iterates over both keys and values, while `values()` iterates over
just values. Also add `_mut()` versions.

These replace the otherwise common idiom of iterating with `keys()` and using
indexing to get the values, allowing for simpler code.
2018-03-30 12:45:52 -07:00
Dan Gohman
9e4ab7dc86 Rename CallConv::Native to CallConv::SystemV. (#291)
To keep cross-compiling straightforward, Cretonne shouldn't have any
behavior that depends on the host. This renames the "Native" calling
convention to "SystemV", which has a defined meaning for each target,
so that it's clear that the calling convention doesn't change
depending on what host Cretonne is running on.
2018-03-30 12:32:14 -07:00
Dan Gohman
4af95e37a6 Convert regular comments to documentation comments. 2018-03-28 22:48:30 -07:00
Dan Gohman
57cd69d8b4 Say "IR" instead of "IL".
While the specifics of these terms are debatable, "IR" generally
isn't incorrect in this context, and is the more widely recognized
term at this time.

See also the discussion in #267.

Fixes #267.
2018-03-28 22:07:26 -07:00
Dan Gohman
fc7b0a7e51 Rename the no_std feature to core.
See
https://github.com/yurydelendik/wasmparser.rs/pull/49#issuecomment-375436225
for more details.
2018-03-22 13:43:06 -07:00
Pat Hickey
03ee007624 Use clippy (#276)
* cton-util: fix some clippy unnecessary pass-by-value warnings

* clippy: ignore too many arguments / cyclomatic complexity in module

since these functions are taking args coming from the command line, i
dont think this is actually a valid lint, morally the arguments are all
from one structure

* cton-util: take care of remaining clippy warnings

* cton-reader: fix all non-suspicious clippy warnings

* cton-reader: disable clippy at site of suspicious lint

* cton-frontend: disable clippy at the site of an invalid lint

* cton-frontend: fix clippy warnings, or ignore benign ones

* clippy: ignore the camelcase word WebAssembly in docs

* cton-wasm: fix clippy complaints or ignore benign ones

* cton-wasm tests: fix clippy complaints

* cretonne: starting point turns off all clippy warnings

* cretonne: clippy fixes, or lower allow() to source of problem

* cretonne: more clippy fixes

* cretonne: fix or disable needless_lifetimes lint

this linter is buggy when the declared lifetime is used for another type
constraint.

* cretonne: fix clippy complaint about Pass::NoPass

* rustfmt

* fix prev minor api changes clippy suggested

* add clippy to test-all

* cton-filetests: clippy fixes

* simplify clippy reporting in test-all

* cretonne: document clippy allows better

* cretonne: fix some more clippy lints

* cretonne: fix clippy lints (mostly doc comments)

* cretonne: allow all needless_lifetimes clippy warnings

remove overrides at the false positives

* rustfmt
2018-03-22 13:10:41 -07:00
Dan Gohman
2b3df1a506 Add use declarations for std features.
Merge the `use` parts of the `no_std` branch. This reduces the diffs
between master and the `no_std` branch, making it easier to maintain.

Most of these changes are derived from patches by @lachlansneff in
https://github.com/Cretonne/cretonne/tree/no_std.
2018-03-20 14:07:05 -07:00
Dan Gohman
2d1f9f874c Bump version to 0.4.1 2018-03-18 14:56:30 -07:00
Dan Gohman
921cea2845 Bump version to 0.4.0 2018-03-16 16:12:56 -07:00
Afnan Enayet
9128290fb4 Rename ILBuilder to FunctionBuilderContext (#268)
* Rename `ILBuilder` to `FunctionBuilderContext` and update corresponding
code

* Refactor usages of ILBuilder to become FunctionBuilderContext,
update variable names to reflect this change

* Reformat to ensure that lines stay under 100 char limit

* Apply corrections from `rustfmt` to pass tests

* Rename variables to be more consistent with refactor of ILBuilder
2018-03-14 10:48:06 -07:00
Dan Gohman
e776d987fd Add Cargo.toml badges for published packages.
This adds a basic travis badge, as well as a badge indicating
"experimental" status, since the APIs are still evolving.
2018-03-13 09:34:11 -07:00
Dan Gohman
4a3077d638 Merge remote-tracking branch 'origin/master' into no_std 2018-03-12 12:55:57 -07:00