@@ -78,7 +78,7 @@ use std::{
7878} ;
7979
8080use rustc_const_eval:: interpret:: {
81- alloc_range, AllocRange , InterpResult , MPlaceTy , ScalarMaybeUninit ,
81+ alloc_range, AllocRange , InterpResult , MPlaceTy , Scalar ,
8282} ;
8383use rustc_data_structures:: fx:: FxHashMap ;
8484
@@ -129,10 +129,10 @@ struct StoreElement {
129129 /// The timestamp of the storing thread when it performed the store
130130 timestamp : VTimestamp ,
131131 /// The value of this store
132- // FIXME: this means the store is either fully initialized or fully uninitialized ;
132+ // FIXME: this means the store must be fully initialized;
133133 // we will have to change this if we want to support atomics on
134- // partially initialized data.
135- val : ScalarMaybeUninit < Provenance > ,
134+ // ( partially) uninitialized data.
135+ val : Scalar < Provenance > ,
136136
137137 /// Timestamp of first loads from this store element by each thread
138138 /// Behind a RefCell to keep load op take &self
@@ -179,7 +179,7 @@ impl StoreBufferAlloc {
179179 fn get_or_create_store_buffer < ' tcx > (
180180 & self ,
181181 range : AllocRange ,
182- init : ScalarMaybeUninit < Provenance > ,
182+ init : Scalar < Provenance > ,
183183 ) -> InterpResult < ' tcx , Ref < ' _ , StoreBuffer > > {
184184 let access_type = self . store_buffers . borrow ( ) . access_type ( range) ;
185185 let pos = match access_type {
@@ -204,7 +204,7 @@ impl StoreBufferAlloc {
204204 fn get_or_create_store_buffer_mut < ' tcx > (
205205 & mut self ,
206206 range : AllocRange ,
207- init : ScalarMaybeUninit < Provenance > ,
207+ init : Scalar < Provenance > ,
208208 ) -> InterpResult < ' tcx , & mut StoreBuffer > {
209209 let buffers = self . store_buffers . get_mut ( ) ;
210210 let access_type = buffers. access_type ( range) ;
@@ -225,7 +225,7 @@ impl StoreBufferAlloc {
225225}
226226
227227impl < ' mir , ' tcx : ' mir > StoreBuffer {
228- fn new ( init : ScalarMaybeUninit < Provenance > ) -> Self {
228+ fn new ( init : Scalar < Provenance > ) -> Self {
229229 let mut buffer = VecDeque :: new ( ) ;
230230 buffer. reserve ( STORE_BUFFER_LIMIT ) ;
231231 let mut ret = Self { buffer } ;
@@ -258,7 +258,7 @@ impl<'mir, 'tcx: 'mir> StoreBuffer {
258258 is_seqcst : bool ,
259259 rng : & mut ( impl rand:: Rng + ?Sized ) ,
260260 validate : impl FnOnce ( ) -> InterpResult < ' tcx > ,
261- ) -> InterpResult < ' tcx , ( ScalarMaybeUninit < Provenance > , LoadRecency ) > {
261+ ) -> InterpResult < ' tcx , ( Scalar < Provenance > , LoadRecency ) > {
262262 // Having a live borrow to store_buffer while calling validate_atomic_load is fine
263263 // because the race detector doesn't touch store_buffer
264264
@@ -283,7 +283,7 @@ impl<'mir, 'tcx: 'mir> StoreBuffer {
283283
284284 fn buffered_write (
285285 & mut self ,
286- val : ScalarMaybeUninit < Provenance > ,
286+ val : Scalar < Provenance > ,
287287 global : & DataRaceState ,
288288 thread_mgr : & ThreadManager < ' _ , ' _ > ,
289289 is_seqcst : bool ,
@@ -374,7 +374,7 @@ impl<'mir, 'tcx: 'mir> StoreBuffer {
374374 /// ATOMIC STORE IMPL in the paper (except we don't need the location's vector clock)
375375 fn store_impl (
376376 & mut self ,
377- val : ScalarMaybeUninit < Provenance > ,
377+ val : Scalar < Provenance > ,
378378 index : VectorIdx ,
379379 thread_clock : & VClock ,
380380 is_seqcst : bool ,
@@ -420,7 +420,7 @@ impl StoreElement {
420420 & self ,
421421 index : VectorIdx ,
422422 clocks : & ThreadClockSet ,
423- ) -> ScalarMaybeUninit < Provenance > {
423+ ) -> Scalar < Provenance > {
424424 let _ = self . loads . borrow_mut ( ) . try_insert ( index, clocks. clock [ index] ) ;
425425 self . val
426426 }
@@ -463,10 +463,10 @@ pub(super) trait EvalContextExt<'mir, 'tcx: 'mir>:
463463
464464 fn buffered_atomic_rmw (
465465 & mut self ,
466- new_val : ScalarMaybeUninit < Provenance > ,
466+ new_val : Scalar < Provenance > ,
467467 place : & MPlaceTy < ' tcx , Provenance > ,
468468 atomic : AtomicRwOrd ,
469- init : ScalarMaybeUninit < Provenance > ,
469+ init : Scalar < Provenance > ,
470470 ) -> InterpResult < ' tcx > {
471471 let this = self . eval_context_mut ( ) ;
472472 let ( alloc_id, base_offset, ..) = this. ptr_get_alloc_id ( place. ptr ) ?;
@@ -491,9 +491,9 @@ pub(super) trait EvalContextExt<'mir, 'tcx: 'mir>:
491491 & self ,
492492 place : & MPlaceTy < ' tcx , Provenance > ,
493493 atomic : AtomicReadOrd ,
494- latest_in_mo : ScalarMaybeUninit < Provenance > ,
494+ latest_in_mo : Scalar < Provenance > ,
495495 validate : impl FnOnce ( ) -> InterpResult < ' tcx > ,
496- ) -> InterpResult < ' tcx , ScalarMaybeUninit < Provenance > > {
496+ ) -> InterpResult < ' tcx , Scalar < Provenance > > {
497497 let this = self . eval_context_ref ( ) ;
498498 if let Some ( global) = & this. machine . data_race {
499499 let ( alloc_id, base_offset, ..) = this. ptr_get_alloc_id ( place. ptr ) ?;
@@ -528,10 +528,10 @@ pub(super) trait EvalContextExt<'mir, 'tcx: 'mir>:
528528
529529 fn buffered_atomic_write (
530530 & mut self ,
531- val : ScalarMaybeUninit < Provenance > ,
531+ val : Scalar < Provenance > ,
532532 dest : & MPlaceTy < ' tcx , Provenance > ,
533533 atomic : AtomicWriteOrd ,
534- init : ScalarMaybeUninit < Provenance > ,
534+ init : Scalar < Provenance > ,
535535 ) -> InterpResult < ' tcx > {
536536 let this = self . eval_context_mut ( ) ;
537537 let ( alloc_id, base_offset, ..) = this. ptr_get_alloc_id ( dest. ptr ) ?;
@@ -575,7 +575,7 @@ pub(super) trait EvalContextExt<'mir, 'tcx: 'mir>:
575575 & self ,
576576 place : & MPlaceTy < ' tcx , Provenance > ,
577577 atomic : AtomicReadOrd ,
578- init : ScalarMaybeUninit < Provenance > ,
578+ init : Scalar < Provenance > ,
579579 ) -> InterpResult < ' tcx > {
580580 let this = self . eval_context_ref ( ) ;
581581
0 commit comments