Replace 'this' by 'ecx'
We've long used a mix of variable names for MiriInterpCx references: on free functions, they'd be called ecx, but in methods on extension traits, they'd be called this. That causes awkward renames when moving code between helpers, and generally just does not seem consistent.
So, we're going to rename all the this. This issue is about all the let this = self.eval_context_ref(); and let this = self.eval_context_mut();; the others (if any) will be dealt with separately. The fix is easy: rename this to ecx, ideally with an IDE auto-rename assist.
The following files have at least one such function that needs to be fixed (some files have been removed to avoid conflicts with ongoing work):
- [x] src/alloc_addresses/mod.rs
- [x] src/borrow_tracker/mod.rs
- [x] src/borrow_tracker/stacked_borrows/mod.rs
- [x] src/borrow_tracker/tree_borrows/mod.rs
- [x] src/concurrency/genmc/global_allocations.rs
- [x] src/concurrency/genmc/shims.rs
- [x] src/concurrency/sync.rs
- [x] src/diagnostics.rs
- [x] src/helpers.rs
- [x] src/intrinsics/aarch64.rs
- [x] src/intrinsics/loongarch.rs
- [x] src/intrinsics/math.rs
- [x] src/intrinsics/mod.rs
- [x] src/intrinsics/simd.rs
- [x] src/intrinsics/x86/aesni.rs
- [x] src/intrinsics/x86/avx.rs
- [x] src/intrinsics/x86/avx2.rs
- [x] src/intrinsics/x86/bmi.rs
- [x] src/intrinsics/x86/gfni.rs
- [x] src/intrinsics/x86/mod.rs
- [x] src/intrinsics/x86/sha.rs
- [x] src/intrinsics/x86/sse.rs
- [x] src/intrinsics/x86/sse2.rs
- [x] src/intrinsics/x86/sse3.rs
- [x] src/intrinsics/x86/sse41.rs
- [x] src/intrinsics/x86/sse42.rs
- [x] src/intrinsics/x86/ssse3.rs
- [x] src/operator.rs
- [x] src/provenance_gc.rs
- [x] src/shims/alloc.rs
- [x] src/shims/backtrace.rs
- [x] src/shims/cpu_affinity.rs
- [x] src/shims/env.rs
- [x] src/shims/files.rs
- [x] src/shims/io_error.rs
- [x] src/shims/math.rs
- [x] src/shims/native_lib/mod.rs
- [x] src/shims/os_str.rs
- [x] src/shims/panic.rs
- [x] src/shims/readiness.rs
- [x] src/shims/sig.rs
- [x] src/shims/time.rs
- [x] src/shims/unix/env.rs
- [x] src/shims/unix/fd.rs
- [x] src/shims/unix/freebsd/sync.rs
- [x] src/shims/unix/macos/sync.rs
- [x] src/shims/unix/mem.rs
- [x] src/shims/unix/poll.rs
- [x] src/shims/unix/sync.rs
- [x] src/shims/unix/thread.rs
- [x] src/shims/unwind.rs
You may take some files by posting here, and then make a PR. Do not grab more than 5 files at a time.
I will take the first 5 files. I will take the second 5 files.
I will take the third 5 batch :)
@programskillforverification please don't edit your comments to add new information. Make a new comment instead. Edits do not generate notifications so I will not see them.
@programskillforverification please don't edit your comments to add new information. Make a new comment instead. Edits do not generate notifications so I will not see them.
got it
I'd like to take sse3.rs, bmi.rs, ssse3.rs, gfni.rs, and sha.rs from src/intrinsics/x86/ .
Id like to take these five files:
src/shims/cpu_affinity.rssrc/shims/io_error.rssrc/shims/os_str.rssrc/shims/panic.rssrc/shims/sig.rs
In the future, please pick files that are adjacent in the list, it's kind of a pain to hunt for their checkboxes otherwise. ;)
I'd like to take:
- src/intrinsics/x86/avx.rs
- src/intrinsics/x86/avx2.rs
- src/intrinsics/x86/mod.rs
- src/intrinsics/x86/sse.rs
- src/intrinsics/x86/sse2.rs
I'd like to take env.rs, fd.rs, freebsd/sync.rs, macos/sync.rs, and mem.rs from src/shims/unix/.
I'd like to take the last four:
- src/shims/unix/poll.rs
- src/shims/unix/sync.rs
- src/shims/unix/thread.rs
- src/shims/unwind.rs
i will claim these,
src/operator.rs src/provenance_gc.rs src/shims/alloc.rs src/shims/backtrace.rs
I'd like to take these five next:
src/shims/env.rssrc/shims/files.rssrc/shims/math.rssrc/shims/native_lib/mod.rssrc/shims/readiness.rs
I'd like to pick up the rest
That's
- src/intrinsics/x86/sse41.rs
- src/intrinsics/x86/sse42.rs
- src/shims/time.rs
Go for it :)
There are two files left, where I am waiting for PRs to land to avoid conflicts:
- https://github.com/rust-lang/miri/pull/5604
- https://github.com/rust-lang/miri/pull/5414
There are two files left, where I am waiting for PRs to land to avoid conflicts:
#5414 has renamed
Indeed, so feel free to make a PR for src/shims/unix/fs.rs which should be the last remaining file. :)
Indeed, so feel free to make a PR for
src/shims/unix/fs.rswhich should be the last remaining file. :)
I can take it
All this have been replaced -- thanks a lot to everyone involved. :)