Skip to content
This repository was archived by the owner on Feb 4, 2025. It is now read-only.

Commit 32dfd6d

Browse files
authored
0.10 release (#471)
* Update changelog for 0.10 * Bump cranelift to 0.64 * Bump version number
2 parents 63862fd + e27d056 commit 32dfd6d

File tree

2 files changed

+50
-5
lines changed

2 files changed

+50
-5
lines changed

CHANGELOG.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,51 @@
33
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
44
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
55

6+
## [0.10.0] - 2020-06-07
7+
8+
### Changed
9+
10+
- `rcc` has been renamed to `saltwater`! See https://github.com/jyn514/rcc/pull/460 for details on why. The new binary name is `swcc`.
11+
- `saltwater` no longer requires a `Files` and `FileId` struct to construct a preprocessor.
12+
Instead, the preprocessor has a new `into_files()` method which allows you to recover the files for later use,
13+
and the main `compile` method returns a `Program` struct which contains the files.
14+
This makes it significantly easier to use the API if you don't need the files.
15+
- `saltwater` now uses `lasso` instead of `string-interner`. lasso is ~50% faster than string-interner ([benchmarks](https://docs.rs/lasso/0.2.2/lasso/#benchmarks)) and does not have the UB that string-interner currently does ([string-interner#15](https://github.com/Robbepop/string-interner/issues/15)). Giant thanks to @kixiron for not only making the PR, but writing lasso from scratch!
16+
- `cranelift` has been updated from 0.63 to 0.64.
17+
18+
### Added
19+
20+
- The `Analyzer` has been separated out into `Analyzer` and `PureAnalyzer`. `Analyzer` is an iterator, while `PureAnalyzer` is not. The pure version is useful if you want to compile a single expression or statement instead of many at once.
21+
- `saltwater` now has whitespace tokens! This means that `-E` will keep all whitespace from the original file. Thank you to @hdamron for designing and implementing this!
22+
- `InternedStr::is_empty` has been added.
23+
- There is now a `replace` module separate from the preprocessor itself.
24+
This allows replacing specific tokens without preprocessing the entire file. In particular, it means you can input `Token`s instead of needing the original `&str`.
25+
26+
### Fixed
27+
28+
- The semver requirements have been fixed. `saltwater` now states that it requires `proptest >= 0.9.6`.
29+
- Don't give warnings when compiling with `--no-default-features`.
30+
- Don't loop forever on mutual recursion in function macros ([#399](https://github.com/jyn514/saltwater/issues/399), [#427](https://github.com/jyn514/saltwater/issues/427))
31+
- Don't give an error for `1.0/0` and `0.0/0`,
32+
which should evaluated to `INF` and `NaN`, respectively.
33+
- Don't give an error for function macros with no arguments ([#450](https://github.com/jyn514/saltwater/issues/450)).
34+
- Correctly give an error when an `#if` expression has trailing tokens. For example, this code would previously compile without warnings:
35+
```c
36+
#if 1+2;
37+
#endif
38+
<stdin>:2:4 error: invalid macro: trailing tokens in `#if` expression
39+
#if 1+2;
40+
^^^^^
41+
```
42+
- Correctly give an error when a macro is redefined. For example, this code would previously compile without warnings:
43+
```c
44+
#define a b
45+
#define a c
46+
<stdin>:2:2 error: invalid macro: redefinition of 'a' does not match original definition
47+
#define a c
48+
^^^^^^^^^^
49+
```
50+
651
## [0.9.0] - 2020-05-11
752

853
### Added

Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "saltwater"
3-
version = "0.9.0"
3+
version = "0.10.0"
44
authors = [
55
"Joshua Nelson <[email protected]>",
66
"Graham Scheaffer <[email protected]>",
@@ -23,10 +23,10 @@ documentation = "https://docs.rs/saltwater"
2323
[dependencies]
2424
lazy_static = "1"
2525
ansi_term = { version = "0.12", optional = true }
26-
cranelift = { version = "0.63", optional = true }
27-
cranelift-module = { version = "0.63", optional = true }
28-
cranelift-object = { version = "0.63", optional = true }
29-
cranelift-simplejit = { version = "0.63", optional = true }
26+
cranelift = { version = "0.64", optional = true }
27+
cranelift-module = { version = "0.64", optional = true }
28+
cranelift-object = { version = "0.64", optional = true }
29+
cranelift-simplejit = { version = "0.64", optional = true }
3030
hexponent = "0.3"
3131
thiserror = "^1.0.10"
3232
target-lexicon = "0.10"

0 commit comments

Comments
 (0)