about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-12-01 09:08:06 +0000
committerbors <bors@rust-lang.org>2022-12-01 09:08:06 +0000
commit623b4aba6c83a3aa725dfd722c47eb8e0f468c83 (patch)
treebc20a5aea5b4ff7b4350b9b26a8025bad5061a7f /compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
parent5c2592cd4324973b48011a8a93908612bec9cebf (diff)
parentef5d5e78958f70be656b29a993e4658783919bcb (diff)
downloadrust-623b4aba6c83a3aa725dfd722c47eb8e0f468c83.tar.gz
rust-623b4aba6c83a3aa725dfd722c47eb8e0f468c83.zip
Auto merge of #2699 - RalfJung:schedule-refactor, r=RalfJung
refactor scheduler

Refactors the scheduler to use something akin to a generator -- a callback that will be invoked when the stack of a thread is empty, which has the chance to push a new stack frame or do other things and then indicates whether this thread is done, or should be scheduled again. (Unfortunately I think we [cannot use actual generators](https://rust-lang.zulipchat.com/#narrow/stream/213817-t-lang/topic/Generators.20that.20borrow.20on.20each.20resume.3F) here.) The interpreter loop is now a proper infinite loop, the only way to leave it is for some kind of interrupt to be triggered (represented as `InterpError`) -- unifying how we handle 'exit when calling `process::exit`' and 'exit when main thread quits'.

The last commit implements an alternative approach to https://github.com/rust-lang/miri/pull/2660 using this new structure. Fixes https://github.com/rust-lang/miri/issues/2629.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp')
0 files changed, 0 insertions, 0 deletions