Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
TomAFrench committed Jan 6, 2025
1 parent b9598bb commit eebf650
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ mod tests {

fn create_test_environment() -> (Ssa, FunctionContext, BrilligContext<FieldElement, Stack>) {
let mut builder = FunctionBuilder::new("main".to_string(), Id::test_new(0));
builder.set_runtime(RuntimeType::Brillig(InlineType::default()), false);
builder.set_runtime(RuntimeType::Brillig(InlineType::default()));

let ssa = builder.finish();
let mut brillig_context = create_context(ssa.main_id);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ mod test {

let main_id = Id::test_new(1);
let mut builder = FunctionBuilder::new("main".into(), main_id);
builder.set_runtime(RuntimeType::Brillig(InlineType::default()), false);
builder.set_runtime(RuntimeType::Brillig(InlineType::default()));

let b1 = builder.insert_block();
let b2 = builder.insert_block();
Expand Down Expand Up @@ -471,7 +471,7 @@ mod test {

let main_id = Id::test_new(1);
let mut builder = FunctionBuilder::new("main".into(), main_id);
builder.set_runtime(RuntimeType::Brillig(InlineType::default()), false);
builder.set_runtime(RuntimeType::Brillig(InlineType::default()));

let b1 = builder.insert_block();
let b2 = builder.insert_block();
Expand Down Expand Up @@ -610,7 +610,7 @@ mod test {

let main_id = Id::test_new(1);
let mut builder = FunctionBuilder::new("main".into(), main_id);
builder.set_runtime(RuntimeType::Brillig(InlineType::default()), false);
builder.set_runtime(RuntimeType::Brillig(InlineType::default()));

let v0 = builder.add_parameter(Type::bool());

Expand Down
4 changes: 2 additions & 2 deletions compiler/noirc_evaluator/src/ssa/opt/inlining.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1164,7 +1164,7 @@ mod test {
// }
let foo_id = Id::test_new(0);
let mut builder = FunctionBuilder::new("foo".into(), foo_id);
builder.set_runtime(RuntimeType::Brillig(InlineType::default()), true);
builder.set_runtime(RuntimeType::Brillig(InlineType::default()));

let bar_id = Id::test_new(1);
let bar = builder.import_function(bar_id);
Expand Down Expand Up @@ -1206,7 +1206,7 @@ mod test {
// }
let foo_id = Id::test_new(0);
let mut builder = FunctionBuilder::new("foo".into(), foo_id);
builder.set_runtime(RuntimeType::Brillig(InlineType::default()), true);
builder.set_runtime(RuntimeType::Brillig(InlineType::default()));

let bar_id = Id::test_new(1);
let bar = builder.import_function(bar_id);
Expand Down
2 changes: 1 addition & 1 deletion compiler/noirc_evaluator/src/ssa/opt/rc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ mod test {
// }
let main_id = Id::test_new(0);
let mut builder = FunctionBuilder::new("foo".into(), main_id);
builder.set_runtime(RuntimeType::Brillig(InlineType::default()), false);
builder.set_runtime(RuntimeType::Brillig(InlineType::default()));

let inner_array_type = Type::Array(Arc::new(vec![Type::field()]), 2);
let v0 = builder.add_parameter(inner_array_type.clone());
Expand Down
3 changes: 1 addition & 2 deletions compiler/noirc_evaluator/src/ssa/parser/into_ssa.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@ impl Translator {
let main_function = parsed_ssa.functions.remove(0);
let main_id = FunctionId::test_new(0);
let mut builder = FunctionBuilder::new(main_function.external_name.clone(), main_id);
let separated = false; // Allow the builder to do anything it wants.
builder.set_runtime(main_function.runtime_type, separated);
builder.set_runtime(main_function.runtime_type);
builder.simplify = simplify;

// Map function names to their IDs so calls can be resolved
Expand Down

0 comments on commit eebf650

Please sign in to comment.