@@ -4,8 +4,6 @@ use crate::component::matching::InstanceType;
44use crate :: component:: resources:: { HostResourceData , HostResourceIndex , HostResourceTables } ;
55use crate :: component:: { Instance , ResourceType } ;
66use crate :: prelude:: * ;
7- #[ cfg( all( feature = "rr-component" , feature = "rr-validate" ) ) ]
8- use crate :: rr:: component_events:: ResultEvent ;
97#[ cfg( feature = "rr-component" ) ]
108use crate :: rr:: component_hooks:: ReplayLoweringPhase ;
119use crate :: rr:: { ConstMemorySliceCell , MemorySliceCell } ;
@@ -14,7 +12,7 @@ use crate::rr::{
1412 RREvent , RecordBuffer , ReplayError , Replayer , component_events:: ReallocEntryEvent ,
1513} ;
1614#[ cfg( all( feature = "rr-component" , feature = "rr-validate" ) ) ]
17- use crate :: rr:: { Validate , component_events:: ReallocReturnEvent } ;
15+ use crate :: rr:: { ResultEvent , Validate , component_events:: ReallocReturnEvent } ;
1816use crate :: runtime:: vm:: component:: {
1917 CallContexts , ComponentInstance , InstanceFlags , ResourceTable , ResourceTables ,
2018} ;
@@ -139,7 +137,7 @@ impl Options {
139137
140138 // Invoke the wasm malloc function using its raw and statically known
141139 // signature.
142- let result = unsafe { ReallocFunc :: call_raw ( store, realloc_ty, realloc, params) ? } ;
140+ let result = unsafe { ReallocFunc :: call_raw ( store, realloc_ty, realloc, params, None ) ? } ;
143141
144142 if result % old_align != 0 {
145143 bail ! ( "realloc return: result not aligned" ) ;
@@ -560,40 +558,6 @@ impl<'a, T: 'static> LowerContext<'a, T> {
560558 )
561559 }
562560
563- /// Perform a replay of only [`ReallocEntryEvent`] + [`ReallocReturnEvent`] events
564- ///
565- /// Panics if replay not enabled
566- #[ cfg( feature = "rr-component" ) ]
567- pub fn replay_realloc ( & mut self ) -> Result < usize > {
568- let get_event = |cx : & mut Self | cx. store . 0 . replay_buffer_mut ( ) . unwrap ( ) . next_event ( ) ;
569- let ( record_has_validation, _replay_validate) = {
570- let buf = self . store . 0 . replay_buffer_mut ( ) . unwrap ( ) ;
571- ( buf. trace_settings ( ) . add_validation , buf. settings ( ) . validate )
572- } ;
573-
574- let ptr = match get_event ( self ) ? {
575- RREvent :: ComponentReallocEntry ( e) => {
576- self . realloc_inner ( e. old_addr , e. old_size , e. old_align , e. new_size )
577- }
578- _ => bail ! ( ReplayError :: IncorrectEventVariant ) ,
579- } ;
580-
581- if record_has_validation {
582- match get_event ( self ) ? {
583- RREvent :: ComponentReallocReturn ( e) =>
584- {
585- #[ cfg( feature = "rr-validate" ) ]
586- if _replay_validate {
587- e. 0 . validate ( & ptr) ?
588- }
589- }
590- _ => bail ! ( ReplayError :: IncorrectEventVariant ) ,
591- } ;
592- }
593-
594- ptr
595- }
596-
597561 /// Perform a replay of all the type lowering-associated events for this context
598562 ///
599563 /// These typically include all `Lower*` and `Realloc*` event, along with the putting
0 commit comments