@@ -309,16 +309,15 @@ where
309309 InterpretedInstance :: new_metered ( & self . inventory , exe, executor_idx_to_air_idx)
310310 }
311311
312- // Creates an instance of the AotInstance specialized for metered execution of the given
313- /// `exe`.
314- pub fn aot_metered_instance (
312+ // Creates an AOT instance for metered execution of the given `exe`.
313+ pub fn metered_cost_aot_instance (
315314 & self ,
316315 exe : & VmExe < F > ,
317316 executor_idx_to_air_idx : & [ usize ] ,
318- ) -> Result < AotInstance < F , MeteredCtx > , StaticProgramError > {
317+ ) -> Result < AotInstance < F , MeteredCostCtx > , StaticProgramError > {
319318 #[ cfg( all( target_arch = "x86_64" , not( feature = "tco" ) ) ) ]
320319 {
321- AotInstance :: new_metered ( & self . inventory , exe, executor_idx_to_air_idx)
320+ AotInstance :: new_metered_cost ( & self . inventory , exe, executor_idx_to_air_idx)
322321 }
323322 #[ cfg( any( not( target_arch = "x86_64" ) , feature = "tco" ) ) ]
324323 {
@@ -543,6 +542,20 @@ where
543542 . metered_cost_instance ( exe, & executor_idx_to_air_idx)
544543 }
545544
545+ // Metered Cost AOT execution
546+ pub fn get_metered_cost_aot_instance (
547+ & self ,
548+ exe : & VmExe < Val < E :: SC > > ,
549+ ) -> Result < AotInstance < Val < E :: SC > , MeteredCostCtx > , StaticProgramError >
550+ where
551+ Val < E :: SC > : PrimeField32 ,
552+ <VB :: VmConfig as VmExecutionConfig < Val < E :: SC > > >:: Executor : MeteredExecutor < Val < E :: SC > > ,
553+ {
554+ let executor_idx_to_air_idx = self . executor_idx_to_air_idx ( ) ;
555+ self . executor ( )
556+ . metered_cost_aot_instance ( exe, & executor_idx_to_air_idx)
557+ }
558+
546559 pub fn preflight_interpreter (
547560 & self ,
548561 exe : & VmExe < Val < E :: SC > > ,
0 commit comments