Skip to content

Commit

Permalink
Take references to SsaEvaluatorOptions
Browse files Browse the repository at this point in the history
  • Loading branch information
asterite committed Jun 24, 2024
1 parent 7153c0e commit 9884ae4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion compiler/noirc_driver/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ pub fn compile_no_check(
};

let SsaProgramArtifact { program, debug, warnings, names, error_types, .. } =
create_program(program, ssa_evaluator_options)?;
create_program(program, &ssa_evaluator_options)?;

let abi = abi_gen::gen_abi(context, &main_function, return_visibility, error_types);
let file_map = filter_relevant_files(&debug, &context.file_manager);
Expand Down
6 changes: 3 additions & 3 deletions compiler/noirc_evaluator/src/ssa.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ pub mod ssa_gen;
/// and Brillig functions for unconstrained execution.
pub(crate) fn optimize_into_acir(
program: Program,
options: SsaEvaluatorOptions,
options: &SsaEvaluatorOptions,
) -> Result<Artifacts, RuntimeError> {
let ssa_gen_span = span!(Level::TRACE, "ssa_generation");
let ssa_gen_span_guard = ssa_gen_span.enter();
Expand Down Expand Up @@ -168,7 +168,7 @@ pub struct SsaEvaluatorOptions {
#[tracing::instrument(level = "trace", skip_all)]
pub fn create_program(
program: Program,
options: SsaEvaluatorOptions,
options: &SsaEvaluatorOptions,
) -> Result<SsaProgramArtifact, RuntimeError> {
let debug_variables = program.debug_variables.clone();
let debug_types = program.debug_types.clone();
Expand All @@ -177,7 +177,7 @@ pub fn create_program(
let func_sigs = program.function_signatures.clone();

let recursive = program.recursive;
let (generated_acirs, generated_brillig, error_types) = optimize_into_acir(program, options)?;
let (generated_acirs, generated_brillig, error_types) = optimize_into_acir(program, &options)?;
assert_eq!(
generated_acirs.len(),
func_sigs.len(),
Expand Down

0 comments on commit 9884ae4

Please sign in to comment.