@@ -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
@@ -130,10 +130,10 @@ struct StoreElement {
130130 /// The timestamp of the storing thread when it performed the store
131131 timestamp : VTimestamp ,
132132 /// The value of this store
133- // FIXME: this means the store is either fully initialized or fully uninitialized ;
133+ // FIXME: this means the store must be fully initialized;
134134 // we will have to change this if we want to support atomics on
135- // partially initialized data.
136- val : ScalarMaybeUninit < Provenance > ,
135+ // ( partially) uninitialized data.
136+ val : Scalar < Provenance > ,
137137
138138 /// Timestamp of first loads from this store element by each thread
139139 /// Behind a RefCell to keep load op take &self
@@ -180,7 +180,7 @@ impl StoreBufferAlloc {
180180 fn get_or_create_store_buffer < ' tcx > (
181181 & self ,
182182 range : AllocRange ,
183- init : ScalarMaybeUninit < Provenance > ,
183+ init : Scalar < Provenance > ,
184184 ) -> InterpResult < ' tcx , Ref < ' _ , StoreBuffer > > {
185185 let access_type = self . store_buffers . borrow ( ) . access_type ( range) ;
186186 let pos = match access_type {
@@ -205,7 +205,7 @@ impl StoreBufferAlloc {
205205 fn get_or_create_store_buffer_mut < ' tcx > (
206206 & mut self ,
207207 range : AllocRange ,
208- init : ScalarMaybeUninit < Provenance > ,
208+ init : Scalar < Provenance > ,
209209 ) -> InterpResult < ' tcx , & mut StoreBuffer > {
210210 let buffers = self . store_buffers . get_mut ( ) ;
211211 let access_type = buffers. access_type ( range) ;
@@ -226,7 +226,7 @@ impl StoreBufferAlloc {
226226}
227227
228228impl < ' mir , ' tcx : ' mir > StoreBuffer {
229- fn new ( init : ScalarMaybeUninit < Provenance > ) -> Self {
229+ fn new ( init : Scalar < Provenance > ) -> Self {
230230 let mut buffer = VecDeque :: new ( ) ;
231231 buffer. reserve ( STORE_BUFFER_LIMIT ) ;
232232 let mut ret = Self { buffer } ;
@@ -259,7 +259,7 @@ impl<'mir, 'tcx: 'mir> StoreBuffer {
259259 is_seqcst : bool ,
260260 rng : & mut ( impl rand:: Rng + ?Sized ) ,
261261 validate : impl FnOnce ( ) -> InterpResult < ' tcx > ,
262- ) -> InterpResult < ' tcx , ( ScalarMaybeUninit < Provenance > , LoadRecency ) > {
262+ ) -> InterpResult < ' tcx , ( Scalar < Provenance > , LoadRecency ) > {
263263 // Having a live borrow to store_buffer while calling validate_atomic_load is fine
264264 // because the race detector doesn't touch store_buffer
265265
@@ -284,7 +284,7 @@ impl<'mir, 'tcx: 'mir> StoreBuffer {
284284
285285 fn buffered_write (
286286 & mut self ,
287- val : ScalarMaybeUninit < Provenance > ,
287+ val : Scalar < Provenance > ,
288288 global : & DataRaceState ,
289289 thread_mgr : & ThreadManager < ' _ , ' _ > ,
290290 is_seqcst : bool ,
@@ -375,7 +375,7 @@ impl<'mir, 'tcx: 'mir> StoreBuffer {
375375 /// ATOMIC STORE IMPL in the paper (except we don't need the location's vector clock)
376376 fn store_impl (
377377 & mut self ,
378- val : ScalarMaybeUninit < Provenance > ,
378+ val : Scalar < Provenance > ,
379379 index : VectorIdx ,
380380 thread_clock : & VClock ,
381381 is_seqcst : bool ,
@@ -421,7 +421,7 @@ impl StoreElement {
421421 & self ,
422422 index : VectorIdx ,
423423 clocks : & ThreadClockSet ,
424- ) -> ScalarMaybeUninit < Provenance > {
424+ ) -> Scalar < Provenance > {
425425 let _ = self . loads . borrow_mut ( ) . try_insert ( index, clocks. clock [ index] ) ;
426426 self . val
427427 }
@@ -464,10 +464,10 @@ pub(super) trait EvalContextExt<'mir, 'tcx: 'mir>:
464464
465465 fn buffered_atomic_rmw (
466466 & mut self ,
467- new_val : ScalarMaybeUninit < Provenance > ,
467+ new_val : Scalar < Provenance > ,
468468 place : & MPlaceTy < ' tcx , Provenance > ,
469469 atomic : AtomicRwOrd ,
470- init : ScalarMaybeUninit < Provenance > ,
470+ init : Scalar < Provenance > ,
471471 ) -> InterpResult < ' tcx > {
472472 let this = self . eval_context_mut ( ) ;
473473 let ( alloc_id, base_offset, ..) = this. ptr_get_alloc_id ( place. ptr ) ?;
@@ -492,9 +492,9 @@ pub(super) trait EvalContextExt<'mir, 'tcx: 'mir>:
492492 & self ,
493493 place : & MPlaceTy < ' tcx , Provenance > ,
494494 atomic : AtomicReadOrd ,
495- latest_in_mo : ScalarMaybeUninit < Provenance > ,
495+ latest_in_mo : Scalar < Provenance > ,
496496 validate : impl FnOnce ( ) -> InterpResult < ' tcx > ,
497- ) -> InterpResult < ' tcx , ScalarMaybeUninit < Provenance > > {
497+ ) -> InterpResult < ' tcx , Scalar < Provenance > > {
498498 let this = self . eval_context_ref ( ) ;
499499 if let Some ( global) = & this. machine . data_race {
500500 let ( alloc_id, base_offset, ..) = this. ptr_get_alloc_id ( place. ptr ) ?;
@@ -529,10 +529,10 @@ pub(super) trait EvalContextExt<'mir, 'tcx: 'mir>:
529529
530530 fn buffered_atomic_write (
531531 & mut self ,
532- val : ScalarMaybeUninit < Provenance > ,
532+ val : Scalar < Provenance > ,
533533 dest : & MPlaceTy < ' tcx , Provenance > ,
534534 atomic : AtomicWriteOrd ,
535- init : ScalarMaybeUninit < Provenance > ,
535+ init : Scalar < Provenance > ,
536536 ) -> InterpResult < ' tcx > {
537537 let this = self . eval_context_mut ( ) ;
538538 let ( alloc_id, base_offset, ..) = this. ptr_get_alloc_id ( dest. ptr ) ?;
@@ -576,7 +576,7 @@ pub(super) trait EvalContextExt<'mir, 'tcx: 'mir>:
576576 & self ,
577577 place : & MPlaceTy < ' tcx , Provenance > ,
578578 atomic : AtomicReadOrd ,
579- init : ScalarMaybeUninit < Provenance > ,
579+ init : Scalar < Provenance > ,
580580 ) -> InterpResult < ' tcx > {
581581 let this = self . eval_context_ref ( ) ;
582582
0 commit comments