Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

s/eval_usize/eval_target_usize/ for clarity #108029

Merged
merged 1 commit into from
Feb 14, 2023
Merged

Conversation

oli-obk
Copy link
Contributor

@oli-obk oli-obk commented Feb 14, 2023

r? @nnethercote

as discussed in https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/.60Const.60.20and.20.60usize.60.2F.60u64.60 it is unclear what usize means and why we use a u64 for something talking about usize. This renaming should make it clear that we're talking about usizes on the target platform, irrespective of the compiler host platform.

@rustbot
Copy link
Collaborator

rustbot commented Feb 14, 2023

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @nnethercote (or someone else) soon.

Please see the contribution instructions for more information.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Feb 14, 2023
@rustbot
Copy link
Collaborator

rustbot commented Feb 14, 2023

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

Some changes occurred to the CTFE / Miri engine

cc @rust-lang/miri

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

Some changes occurred in compiler/rustc_codegen_cranelift

cc @bjorn3

The Miri subtree was changed

cc @rust-lang/miri

Some changes occurred in compiler/rustc_codegen_gcc

cc @antoyo

@RalfJung
Copy link
Member

In the interpreter we use machine_usize for this. Might be better to be consistent? Probably would be best to rename machine → target then, "machine" doesn't make a ton of sense outside the interpreter.

@oli-obk
Copy link
Contributor Author

oli-obk commented Feb 14, 2023

Yea, the Machine naming was never very well motivated. I can pull up a PR for that, but it should land separately from this one, as each one of those changes will be very bitrotty

@RalfJung
Copy link
Member

Fair.
@bors r+ rollup

@bors
Copy link
Contributor

bors commented Feb 14, 2023

📌 Commit 936bf29 has been approved by RalfJung

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 14, 2023
@saethlin
Copy link
Member

It's always been unclear to me if the "machine" there was the usize of the Machine itself, or the target the Machine is simulating. Agree that target is better.

bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 14, 2023
…iaskrgr

Rollup of 10 pull requests

Successful merges:

 - rust-lang#103478 ( Suggest fix for misplaced generic params on fn item rust-lang#103366 )
 - rust-lang#107739 (Check for overflow in evaluate_canonical_goal)
 - rust-lang#108003 (Avoid ICE when the generic_span is empty)
 - rust-lang#108016 ("Basic usage" is redundant for there is just one example)
 - rust-lang#108023 (Shrink size of array benchmarks)
 - rust-lang#108024 (add message to update Cargo.toml when x is changed)
 - rust-lang#108025 (rustdoc: add more tooltips to intra-doc links)
 - rust-lang#108029 (s/eval_usize/eval_target_usize/ for clarity)
 - rust-lang#108035 (Avoid using a dead email address as the main email address)
 - rust-lang#108038 (Remove needless supertrait constraints from Interner projections)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit f68864c into rust-lang:master Feb 14, 2023
@rustbot rustbot added this to the 1.69.0 milestone Feb 14, 2023
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Feb 15, 2023
Use `target` instead of `machine` for mir interpreter integer handling.

The naming of `machine` only makes sense from a mir interpreter internals perspective, but outside users talk about the `target` platform. As per rust-lang#108029 (comment)

r? `@RalfJung`
RalfJung pushed a commit to RalfJung/miri that referenced this pull request Feb 16, 2023
Use `target` instead of `machine` for mir interpreter integer handling.

The naming of `machine` only makes sense from a mir interpreter internals perspective, but outside users talk about the `target` platform. As per rust-lang/rust#108029 (comment)

r? `@RalfJung`
Jarcho pushed a commit to Jarcho/rust-clippy that referenced this pull request Feb 25, 2023
Use `target` instead of `machine` for mir interpreter integer handling.

The naming of `machine` only makes sense from a mir interpreter internals perspective, but outside users talk about the `target` platform. As per rust-lang/rust#108029 (comment)

r? `@RalfJung`
qinheping added a commit to qinheping/kani that referenced this pull request Mar 10, 2023
Remove some superfluous type parameters from layout.rs rust-lang/rust#107163
Introduce -Zterminal-urls to use OSC8 for error codes rust-lang/rust#107838
Unify validity checks into a single query rust-lang/rust#108364
s/eval_usize/eval_target_usize/ for clarity rust-lang/rust#108029
Use target instead of machine for mir interpreter integer handling rust-lang/rust#108047
Switch to EarlyBinder for type_of query rust-lang/rust#107753
Rename interner funcs rust-lang/rust#108250
Optimize mk_region rust-lang/rust#108020
Clarify iterator interners rust-lang/rust#108112
qinheping added a commit to qinheping/kani that referenced this pull request Mar 10, 2023
- Remove some superfluous type parameters from layout.rs rust-lang/rust#107163
- Introduce -Zterminal-urls to use OSC8 for error codes rust-lang/rust#107838
- Unify validity checks into a single query rust-lang/rust#108364
- s/eval_usize/eval_target_usize/ for clarity rust-lang/rust#108029
- Use target instead of machine for mir interpreter integer handling rust-lang/rust#108047
- Switch to EarlyBinder for type_of query rust-lang/rust#107753
- Rename interner funcs rust-lang/rust#108250
- Optimize mk_region rust-lang/rust#108020
- Clarify iterator interners rust-lang/rust#108112
tautschnig pushed a commit to qinheping/kani that referenced this pull request Mar 17, 2023
- Remove some superfluous type parameters from layout.rs rust-lang/rust#107163
- Introduce -Zterminal-urls to use OSC8 for error codes rust-lang/rust#107838
- Unify validity checks into a single query rust-lang/rust#108364
- s/eval_usize/eval_target_usize/ for clarity rust-lang/rust#108029
- Use target instead of machine for mir interpreter integer handling rust-lang/rust#108047
- Switch to EarlyBinder for type_of query rust-lang/rust#107753
- Rename interner funcs rust-lang/rust#108250
- Optimize mk_region rust-lang/rust#108020
- Clarify iterator interners rust-lang/rust#108112
tautschnig pushed a commit to qinheping/kani that referenced this pull request Mar 17, 2023
- Remove some superfluous type parameters from layout.rs rust-lang/rust#107163
- Introduce -Zterminal-urls to use OSC8 for error codes rust-lang/rust#107838
- Unify validity checks into a single query rust-lang/rust#108364
- s/eval_usize/eval_target_usize/ for clarity rust-lang/rust#108029
- Use target instead of machine for mir interpreter integer handling rust-lang/rust#108047
- Switch to EarlyBinder for type_of query rust-lang/rust#107753
- Rename interner funcs rust-lang/rust#108250
- Optimize mk_region rust-lang/rust#108020
- Clarify iterator interners rust-lang/rust#108112
tautschnig pushed a commit to qinheping/kani that referenced this pull request Mar 17, 2023
- Remove some superfluous type parameters from layout.rs rust-lang/rust#107163
- Introduce -Zterminal-urls to use OSC8 for error codes rust-lang/rust#107838
- Unify validity checks into a single query rust-lang/rust#108364
- s/eval_usize/eval_target_usize/ for clarity rust-lang/rust#108029
- Use target instead of machine for mir interpreter integer handling rust-lang/rust#108047
- Switch to EarlyBinder for type_of query rust-lang/rust#107753
- Rename interner funcs rust-lang/rust#108250
- Optimize mk_region rust-lang/rust#108020
- Clarify iterator interners rust-lang/rust#108112
tautschnig pushed a commit to qinheping/kani that referenced this pull request Mar 17, 2023
- Remove some superfluous type parameters from layout.rs rust-lang/rust#107163
- Introduce -Zterminal-urls to use OSC8 for error codes rust-lang/rust#107838
- Unify validity checks into a single query rust-lang/rust#108364
- s/eval_usize/eval_target_usize/ for clarity rust-lang/rust#108029
- Use target instead of machine for mir interpreter integer handling rust-lang/rust#108047
- Switch to EarlyBinder for type_of query rust-lang/rust#107753
- Rename interner funcs rust-lang/rust#108250
- Optimize mk_region rust-lang/rust#108020
- Clarify iterator interners rust-lang/rust#108112
tautschnig added a commit to tautschnig/kani that referenced this pull request Apr 15, 2023
Skip over all the nightlies from 2023-02-06 until 2023-02-15 as those
ICE when trying to build kani with:
```
error: internal compiler error: cannot relate constants (Const { ty: fn() -> usize {std::mem::size_of::<[T; N]>}, kind: Value(Branch([])) }, Const { ty: fn() -> usize {std::mem::size_of::<[T; _]>}, kind: Value(Branch([])) }) of different types: fn() -> usize {std::mem::size_of::<[T; N]>} != fn() -> usize {std::mem::size_of::<[T; _]>}
```

This issue was reported upstream as
rust-lang/rust#107898, and fixed in
rust-lang/rust#107940, which isn't part of any
of the above nightlies.

Doing this multi-day update also requires addressing:

Remove some superfluous type parameters from layout.rs rust-lang/rust#107163
Introduce -Zterminal-urls to use OSC8 for error codes rust-lang/rust#107838
s/eval_usize/eval_target_usize/ for clarity rust-lang/rust#108029

Co-authored-by: Qinheping Hu <[email protected]>
tautschnig added a commit to tautschnig/kani that referenced this pull request Apr 15, 2023
Skip over all the nightlies from 2023-02-06 until 2023-02-15 as those
ICE when trying to build kani with:
```
error: internal compiler error: cannot relate constants (Const { ty: fn() -> usize {std::mem::size_of::<[T; N]>}, kind: Value(Branch([])) }, Const { ty: fn() -> usize {std::mem::size_of::<[T; _]>}, kind: Value(Branch([])) }) of different types: fn() -> usize {std::mem::size_of::<[T; N]>} != fn() -> usize {std::mem::size_of::<[T; _]>}
```

This issue was reported upstream as
rust-lang/rust#107898, and fixed in
rust-lang/rust#107940, which isn't part of any
of the above nightlies.

Doing this multi-day update also requires addressing:

Remove some superfluous type parameters from layout.rs rust-lang/rust#107163
Introduce -Zterminal-urls to use OSC8 for error codes rust-lang/rust#107838
s/eval_usize/eval_target_usize/ for clarity rust-lang/rust#108029

Co-authored-by: Qinheping Hu <[email protected]>
tautschnig added a commit to tautschnig/kani that referenced this pull request Apr 15, 2023
Skip over all the nightlies from 2023-02-06 until 2023-02-15 as those
ICE when trying to build kani with:
```
error: internal compiler error: cannot relate constants (Const { ty: fn() -> usize {std::mem::size_of::<[T; N]>}, kind: Value(Branch([])) }, Const { ty: fn() -> usize {std::mem::size_of::<[T; _]>}, kind: Value(Branch([])) }) of different types: fn() -> usize {std::mem::size_of::<[T; N]>} != fn() -> usize {std::mem::size_of::<[T; _]>}
```

This issue was reported upstream as
rust-lang/rust#107898, and fixed in
rust-lang/rust#107940, which isn't part of any
of the above nightlies.

Doing this multi-day update also requires addressing:

Remove some superfluous type parameters from layout.rs rust-lang/rust#107163
Introduce -Zterminal-urls to use OSC8 for error codes rust-lang/rust#107838
s/eval_usize/eval_target_usize/ for clarity rust-lang/rust#108029

Co-authored-by: Qinheping Hu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants