Skip to content

Commit

Permalink
commit missing file
Browse files Browse the repository at this point in the history
  • Loading branch information
guipublic committed Jan 17, 2025
1 parent 0ce7133 commit 3db55aa
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions compiler/noirc_evaluator/src/ssa.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,19 @@ use crate::errors::{RuntimeError, SsaReport};
use acvm::{
acir::{
circuit::{
brillig::BrilligBytecode, Circuit, ErrorSelector, ExpressionWidth,
Program as AcirProgram, PublicInputs,
brillig::BrilligBytecode, AcirOpcodeLocation, Circuit, ErrorSelector, ExpressionWidth,
OpcodeLocation, Program as AcirProgram, PublicInputs,
},
native_types::Witness,
},
FieldElement,
};

use ir::instruction::ErrorType;
use noirc_errors::debug_info::{DebugFunctions, DebugInfo, DebugTypes, DebugVariables};
use noirc_errors::{
call_stack::CallStackId,
debug_info::{DebugFunctions, DebugInfo, DebugTypes, DebugVariables},
};

use noirc_frontend::ast::Visibility;
use noirc_frontend::{hir_def::function::FunctionSignature, monomorphization::ast::Program};
Expand Down Expand Up @@ -354,11 +357,17 @@ fn convert_generated_acir_into_circuit(
return_values,
assert_messages: assert_messages.into_iter().collect(),
};

let acir_location_map: BTreeMap<AcirOpcodeLocation, CallStackId> = location_map
.iter()
.map(|(k, v)| match k {
OpcodeLocation::Acir(index) => (AcirOpcodeLocation::new(*index), *v),
OpcodeLocation::Brillig { .. } => unreachable!("Expected ACIR opcode"),
})
.collect();
let location_tree = generated_acir.call_stacks.to_location_tree();
let mut debug_info = DebugInfo::new(
brillig_locations,
location_map,
acir_location_map,
location_tree,
debug_variables,
debug_functions,
Expand Down

0 comments on commit 3db55aa

Please sign in to comment.