-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cranelift: Stop consuming allocations (#8581)
The `next` and `next_writable` methods on `AllocationConsumer` are identity functions now, so replace each call with its argument and then clean up the resulting mess. Most of this commit was generated with these commands: - `git grep -lF allocs.next cranelift/codegen/src/isa/ | xargs sed -i 's/allocs\.next\(_writable\)\?//'` - `cargo fix -p cranelift-codegen --features all-arch --allow-dirty --allow-staged` - `git diff --name-only HEAD | xargs sed -i '/let \([^ ]*\) = \1;/d'` - `cargo fmt` I used sed to delete `allocs.next` but left the following parentheses alone (since matching balanced parentheses is not a regular language). Then I used `cargo fix` to remove those parentheses and also add underscores to newly-unused `AllocationConsumer` arguments. Next I used sed again to delete trivial assignments like `let x = x`, leaving more complicated cases as future work to clean up, and finally `cargo fmt` to delete blank lines and braces that are no longer necessary. Last, I deleted the newly-unused definitions of `next` and `next_writable` themselves.
- Loading branch information
1 parent
7f699b8
commit 3308a2b
Showing
12 changed files
with
240 additions
and
726 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.