Uh oh!
There was an error while loading. Please reload this page.
miri: use AllocId instead of u64. - #47205
Conversation
oli-obk
commented
Jan 5, 2018
Ha. That was on my list. Thanks for doing it. Lgtm |
eddyb
commented
Jan 5, 2018
@bors delegate=oli-obk |
bors
commented
Jan 5, 2018
✌️ @oli-obk can now approve this pull request |
| /// | ||
| /// The pointers are to the beginning of an `alloc_by_id` allocation | ||
| alloc_cache: FxHashMap<interpret::GlobalId<'tcx>, interpret::Pointer>, | ||
| alloc_cache: FxHashMap<interpret::GlobalId<'tcx>, interpret::AllocId>, |
There was a problem hiding this comment.
The idea was that you could have globals which are located inside other locals in the future. So if a constant's value is obtained by indexing another constant, we'd just point to the offset in the array constant.
There was a problem hiding this comment.
We do need miri allocations properly exposed for miri alloc -> LLVM global translation, or at least some guarantee that statics don't get optimized like that.
FWIW I think MemoryPointer would be a better fit, eventually.
oli-obk
commented
Jan 5, 2018
@bors r+ Maybe bors doesn't like reviews? |
bors
commented
Jan 5, 2018
📌 Commit 0907494 has been approved by |
This makes @alexreg's miri allocation -> LLVM global translation more straight-forward.
r? @oli-obk