-
Notifications
You must be signed in to change notification settings - Fork 13.3k
interpret: simplify SIMD type handling #130215
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ use rustc_middle::ty::{ | |
}; | ||
use tracing::debug; | ||
|
||
use super::{throw_inval, InterpCx, MPlaceTy, MemPlaceMeta, MemoryKind}; | ||
use super::{throw_inval, InterpCx, MPlaceTy, MemoryKind}; | ||
use crate::const_eval::{CompileTimeInterpCx, CompileTimeMachine, InterpretationResult}; | ||
|
||
/// Checks whether a type contains generic parameters which must be instantiated. | ||
|
@@ -103,5 +103,5 @@ pub(crate) fn create_static_alloc<'tcx>( | |
assert_eq!(ecx.machine.static_root_ids, None); | ||
ecx.machine.static_root_ids = Some((alloc_id, static_def_id)); | ||
assert!(ecx.memory.alloc_map.insert(alloc_id, (MemoryKind::Stack, alloc)).is_none()); | ||
Ok(ecx.ptr_with_meta_to_mplace(Pointer::from(alloc_id).into(), MemPlaceMeta::None, layout)) | ||
Ok(ecx.ptr_to_mplace(Pointer::from(alloc_id).into(), layout)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. does this change have anything to do w the pr? it seems unrelated lol There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. oh, i see you changed the privacy of that fn. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, I had to add |
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tiif this method should also come handy in rust-lang/miri#3852 to deal with the alignment problem in eventfd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, thanks!