Skip to content

Commit 571275a

Browse files
Receive hint map directly
1 parent 23f54c5 commit 571275a

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

vm/src/vm/runners/cairo_runner_2.rs

+4-5
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,11 @@
22

33
use core::any::Any;
44

5-
use cairo_lang_casm::hints::Hint;
65
use cairo_lang_executable::executable::{EntryPointKind, Executable, ExecutableEntryPoint};
76

87
use crate::{
98
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},
1310
stdlib::{
1411
collections::{BTreeMap, HashMap, HashSet},
1512
mem,
@@ -72,6 +69,7 @@ impl CairoRunner2 {
7269
instruction_locations: Option<HashMap<usize, InstructionLocation>>,
7370
identifiers: HashMap<String, Identifier>,
7471
reference_manager: Vec<HintReference>,
72+
hints: BTreeMap<usize, Vec<HintParams>>,
7573
) -> Result<Self, RunnerError> {
7674
let entrypoint = find_entrypoint_of_kind(&executable.entrypoints, entrypoint_kind.clone());
7775

@@ -176,7 +174,8 @@ impl CairoRunner2 {
176174
.validate_existing_memory()
177175
.map_err(RunnerError::MemoryValidationError)?;
178176

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");
180179

181180
Ok(Self {
182181
executable,

0 commit comments

Comments
 (0)