|
2 | 2 |
|
3 | 3 | use core::any::Any; |
4 | 4 |
|
5 | | -use cairo_lang_casm::hints::Hint; |
6 | 5 | use cairo_lang_executable::executable::{EntryPointKind, Executable, ExecutableEntryPoint}; |
7 | 6 |
|
8 | 7 | use crate::{ |
9 | 8 | hint_processor::hint_processor_definition::{HintProcessor, HintReference}, |
10 | | - serde::deserialize_program::{ |
11 | | - ApTracking, Attribute, FlowTrackingData, HintParams, Identifier, InstructionLocation, |
12 | | - }, |
| 9 | + serde::deserialize_program::{Attribute, HintParams, Identifier, InstructionLocation}, |
13 | 10 | stdlib::{ |
14 | 11 | collections::{BTreeMap, HashMap, HashSet}, |
15 | 12 | mem, |
@@ -72,6 +69,7 @@ impl CairoRunner2 { |
72 | 69 | instruction_locations: Option<HashMap<usize, InstructionLocation>>, |
73 | 70 | identifiers: HashMap<String, Identifier>, |
74 | 71 | reference_manager: Vec<HintReference>, |
| 72 | + hints: BTreeMap<usize, Vec<HintParams>>, |
75 | 73 | ) -> Result<Self, RunnerError> { |
76 | 74 | let entrypoint = find_entrypoint_of_kind(&executable.entrypoints, entrypoint_kind.clone()); |
77 | 75 |
|
@@ -176,7 +174,8 @@ impl CairoRunner2 { |
176 | 174 | .validate_existing_memory() |
177 | 175 | .map_err(RunnerError::MemoryValidationError)?; |
178 | 176 |
|
179 | | - let hint_collection = build_hint_collection(&executable.program.hints, bytecode.len()); |
| 177 | + let hint_collection = |
| 178 | + HintsCollection::new(&hints, bytecode.len()).expect("failed to build hint collection"); |
180 | 179 |
|
181 | 180 | Ok(Self { |
182 | 181 | executable, |
|
0 commit comments