Rollup merge of #134055 - RalfJung:interpret-alloc-dedup, r=oli-obk
interpret: clean up deduplicating allocation functions The "align" and "kind" arguments would be largely ignored in the "dedup" case, so let's move that to entirely separate function. Let's also remove support for old-style miri_resolve_frame while we are at it. The docs have already said for a while that this must be set to 1.
This commit is contained in:
commit
e0bec9dabb
8 changed files with 23 additions and 137 deletions
|
@ -1479,7 +1479,7 @@ impl<'tcx> TyCtxt<'tcx> {
|
|||
self.mk_adt_def_from_data(ty::AdtDefData::new(self, did, kind, variants, repr))
|
||||
}
|
||||
|
||||
/// Allocates a read-only byte or string literal for `mir::interpret`.
|
||||
/// Allocates a read-only byte or string literal for `mir::interpret` with alignment 1.
|
||||
/// Returns the same `AllocId` if called again with the same bytes.
|
||||
pub fn allocate_bytes_dedup(self, bytes: &[u8], salt: usize) -> interpret::AllocId {
|
||||
// Create an allocation that just contains these bytes.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue