@@ -36,7 +36,7 @@ impl RunContext {
3636 ///
3737 /// - If the operand is a constant, it returns the constant.
3838 /// - If it's a memory location, it computes the address relative to `fp` and fetches the value from memory.
39- pub fn get_value < F > (
39+ pub fn get_value_from_mem_or_constant < F > (
4040 & self ,
4141 operand : & MemOrConstant < F > ,
4242 memory : & MemoryManager ,
@@ -131,11 +131,13 @@ mod tests {
131131 // A constant operand with field element 42.
132132 let operand = MemOrConstant :: Constant ( F :: from_u64 ( 42 ) ) ;
133133
134- // Run `get_value ` with an unused memory manager (memory is not needed for constants).
134+ // Run `get_value_from_mem_or_constant ` with an unused memory manager (memory is not needed for constants).
135135 let memory = MemoryManager :: default ( ) ;
136136
137137 // It should return the wrapped constant as a MemoryValue::Int.
138- let result = ctx. get_value ( & operand, & memory) . unwrap ( ) ;
138+ let result = ctx
139+ . get_value_from_mem_or_constant ( & operand, & memory)
140+ . unwrap ( ) ;
139141 assert_eq ! ( result, MemoryValue :: Int ( F :: from_u64( 42 ) ) ) ;
140142 }
141143
@@ -171,8 +173,10 @@ mod tests {
171173 // The operand asks to read memory at fp + 2.
172174 let operand = MemOrConstant :: MemoryAfterFp { shift : 2 } ;
173175
174- // Call get_value, which should fetch the value we inserted.
175- let result = ctx. get_value ( & operand, & memory) . unwrap ( ) ;
176+ // Call get_value_from_mem_or_constant, which should fetch the value we inserted.
177+ let result = ctx
178+ . get_value_from_mem_or_constant ( & operand, & memory)
179+ . unwrap ( ) ;
176180 assert_eq ! ( result, expected_val) ;
177181 }
178182
@@ -197,8 +201,10 @@ mod tests {
197201 fp,
198202 ) ;
199203
200- // Calling get_value should return a VirtualMachineError::MemoryError::UninitializedMemory.
201- let err = ctx. get_value ( & operand, & memory) . unwrap_err ( ) ;
204+ // Calling get_value_from_mem_or_constant should return a VirtualMachineError::MemoryError::UninitializedMemory.
205+ let err = ctx
206+ . get_value_from_mem_or_constant ( & operand, & memory)
207+ . unwrap_err ( ) ;
202208
203209 match err {
204210 VirtualMachineError :: Memory ( MemoryError :: UninitializedMemory ( addr) ) => {
0 commit comments