diff --git a/compiler/noirc_evaluator/src/ssa/ssa_gen/tests.rs b/compiler/noirc_evaluator/src/ssa/ssa_gen/tests.rs index db4c0216b07..65ba5e11fe8 100644 --- a/compiler/noirc_evaluator/src/ssa/ssa_gen/tests.rs +++ b/compiler/noirc_evaluator/src/ssa/ssa_gen/tests.rs @@ -107,40 +107,3 @@ fn basic_loop() { assert_normalized_ssa_equals(ssa, expected); } - -#[named] -#[test] -fn databus_no_dead_param_on_empty_array() { - let src = " - fn main(a: (i8, u32, i8), b: call_data(0) [(i8, i8, bool, bool, str<0>); 2]) -> pub [(bool, str<3>, str<0>, u32); 0] { - [] - } - "; - - let ssa = get_initial_ssa(src, function_path!()).unwrap(); - - // We expect that there to be no `array_get` attempting to fetch from v3 - // the empty nested array `[u8; 0]`. - // The databus is only going to be initialized with actual numeric values so keeping - // an empty array in the databus is pointless. - // The databus is not mutated after initialization as well. So if we have instructions - // on the data bus (such as an `array_get` on an empty array) that go unused, it becomes - // more difficult to eliminate those unused instructions. Thus, we just do not generate them. - let expected = " - acir(inline) fn main f0 { - b0(v0: i8, v1: u32, v2: i8, v3: [(i8, i8, u1, u1, [u8; 0]); 2]): - v5 = array_get v3, index u32 0 -> i8 - v7 = array_get v3, index u32 1 -> i8 - v9 = array_get v3, index u32 2 -> u1 - v11 = array_get v3, index u32 3 -> u1 - v13 = array_get v3, index u32 4 -> i8 - v15 = array_get v3, index u32 5 -> i8 - v17 = array_get v3, index u32 6 -> u1 - v19 = array_get v3, index u32 7 -> u1 - v20 = make_array [v5, v7, v9, v11, v13, v15, v17, v19] : [Field; 8] - v21 = make_array [] : [(u1, [u8; 3], [u8; 0], u32); 0] - return v21 - } - "; - assert_normalized_ssa_equals(ssa, expected); -} diff --git a/compiler/noirc_frontend/src/hir_def/types.rs b/compiler/noirc_frontend/src/hir_def/types.rs index 5df60d0ac49..ec3e7cd2804 100644 --- a/compiler/noirc_frontend/src/hir_def/types.rs +++ b/compiler/noirc_frontend/src/hir_def/types.rs @@ -1295,9 +1295,13 @@ impl Type { } Type::Array(length, element) => { - length.is_valid_for_program_input() && element.is_valid_for_program_input() + self.array_or_string_len_is_not_zero() + && length.is_valid_for_program_input() + && element.is_valid_for_program_input() + } + Type::String(length) => { + self.array_or_string_len_is_not_zero() && length.is_valid_for_program_input() } - Type::String(length) => length.is_valid_for_program_input(), Type::Tuple(elements) => elements.iter().all(|elem| elem.is_valid_for_program_input()), Type::DataType(definition, generics) => { if let Some(fields) = definition.borrow().get_fields(generics) { @@ -1314,6 +1318,22 @@ impl Type { } } + /// Empty arrays and strings (which are arrays under the hood) are disallowed + /// as input to program entry points. + /// + /// The point of inputs to entry points is to process input data. + /// Thus, passing empty arrays is pointless and adds extra complexity to the compiler + /// for handling them. + fn array_or_string_len_is_not_zero(&self) -> bool { + match self { + Type::Array(length, _) | Type::String(length) => { + let length = length.evaluate_to_u32(Location::dummy()).unwrap_or(0); + length != 0 + } + _ => panic!("ICE: Expected an array or string type"), + } + } + /// True if this type can be used as a parameter to an ACIR function that is not `main` or a contract function. /// This encapsulates functions for which we may not want to inline during compilation. /// diff --git a/test_programs/execution_success/array_oob_regression_7952/Nargo.toml b/test_programs/compile_failure/array_oob_regression_7952/Nargo.toml similarity index 100% rename from test_programs/execution_success/array_oob_regression_7952/Nargo.toml rename to test_programs/compile_failure/array_oob_regression_7952/Nargo.toml diff --git a/test_programs/execution_success/array_oob_regression_7952/Prover.toml b/test_programs/compile_failure/array_oob_regression_7952/Prover.toml similarity index 100% rename from test_programs/execution_success/array_oob_regression_7952/Prover.toml rename to test_programs/compile_failure/array_oob_regression_7952/Prover.toml diff --git a/test_programs/execution_success/array_oob_regression_7952/src/main.nr b/test_programs/compile_failure/array_oob_regression_7952/src/main.nr similarity index 100% rename from test_programs/execution_success/array_oob_regression_7952/src/main.nr rename to test_programs/compile_failure/array_oob_regression_7952/src/main.nr diff --git a/test_programs/compile_failure/array_oob_regression_7952/stderr.txt b/test_programs/compile_failure/array_oob_regression_7952/stderr.txt new file mode 100644 index 00000000000..e3f391763da --- /dev/null +++ b/test_programs/compile_failure/array_oob_regression_7952/stderr.txt @@ -0,0 +1,8 @@ +error: Only sized types may be used in the entry point to a program + ┌─ src/main.nr:1:12 + │ +1 │ fn main(a: [[u32; 0]; 1], b: bool) -> pub [u32; 0] { + │ ------------- Slices, references, or any type containing them may not be used in main, contract functions, or foldable functions + │ + +Aborting due to 1 previous error \ No newline at end of file diff --git a/test_programs/compile_failure/brillig_slice_to_acir/src/main.nr b/test_programs/compile_failure/brillig_slice_to_acir/src/main.nr index dcf23aac5f5..cce0ac1763b 100644 --- a/test_programs/compile_failure/brillig_slice_to_acir/src/main.nr +++ b/test_programs/compile_failure/brillig_slice_to_acir/src/main.nr @@ -1,4 +1,4 @@ -global DEPTH: Field = 40000; +global DEPTH: u32 = 40000; fn main(x: [u32; DEPTH], y: u32) { let mut new_x = []; diff --git a/test_programs/compile_failure/brillig_slice_to_acir/stderr.txt b/test_programs/compile_failure/brillig_slice_to_acir/stderr.txt index 446d7e9585b..f0afcc54b3c 100644 --- a/test_programs/compile_failure/brillig_slice_to_acir/stderr.txt +++ b/test_programs/compile_failure/brillig_slice_to_acir/stderr.txt @@ -12,20 +12,6 @@ warning: unused variable x │ - unused variable │ -error: The numeric generic is not of type `u32` - ┌─ src/main.nr:3:12 - │ -3 │ fn main(x: [u32; DEPTH], y: u32) { - │ ------------ expected `u32`, found `Field` - │ - -error: The numeric generic is not of type `u32` - ┌─ src/main.nr:8:27 - │ -8 │ unconstrained fn clear(x: [u32; DEPTH], y: u32) -> [u32] { - │ ------------ expected `u32`, found `Field` - │ - error: Call to unconstrained function is unsafe and must be in an unconstrained function or unsafe block ┌─ src/main.nr:5:13 │ @@ -54,4 +40,4 @@ error: No method named 'push_back' found for type '[u32; 0]' │ ----------------- │ -Aborting due to 6 previous errors \ No newline at end of file +Aborting due to 4 previous errors \ No newline at end of file diff --git a/test_programs/compile_failure/brillig_vec_to_acir/src/main.nr b/test_programs/compile_failure/brillig_vec_to_acir/src/main.nr index 8f872f1b903..013900b2be4 100644 --- a/test_programs/compile_failure/brillig_vec_to_acir/src/main.nr +++ b/test_programs/compile_failure/brillig_vec_to_acir/src/main.nr @@ -1,4 +1,4 @@ -global DEPTH: Field = 40000; +global DEPTH: u32 = 40000; fn main(x: [u32; DEPTH], y: u32) { let mut new_x = Vec::new(); diff --git a/test_programs/compile_failure/brillig_vec_to_acir/stderr.txt b/test_programs/compile_failure/brillig_vec_to_acir/stderr.txt index 5de6ac809e9..6849976cd72 100644 --- a/test_programs/compile_failure/brillig_vec_to_acir/stderr.txt +++ b/test_programs/compile_failure/brillig_vec_to_acir/stderr.txt @@ -1,17 +1,3 @@ -error: The numeric generic is not of type `u32` - ┌─ src/main.nr:3:12 - │ -3 │ fn main(x: [u32; DEPTH], y: u32) { - │ ------------ expected `u32`, found `Field` - │ - -error: The numeric generic is not of type `u32` - ┌─ src/main.nr:8:27 - │ -8 │ unconstrained fn clear(x: [u32; DEPTH], y: u32) -> Vec { - │ ------------ expected `u32`, found `Field` - │ - error: Call to unconstrained function is unsafe and must be in an unconstrained function or unsafe block ┌─ src/main.nr:5:13 │ @@ -26,4 +12,4 @@ error: Slices cannot be returned from an unconstrained runtime to a constrained │ ----------- │ -Aborting due to 4 previous errors \ No newline at end of file +Aborting due to 2 previous errors \ No newline at end of file diff --git a/test_programs/execution_success/databus_dead_param/Nargo.toml b/test_programs/compile_failure/databus_dead_param/Nargo.toml similarity index 100% rename from test_programs/execution_success/databus_dead_param/Nargo.toml rename to test_programs/compile_failure/databus_dead_param/Nargo.toml diff --git a/test_programs/execution_success/databus_dead_param/Prover.toml b/test_programs/compile_failure/databus_dead_param/Prover.toml similarity index 100% rename from test_programs/execution_success/databus_dead_param/Prover.toml rename to test_programs/compile_failure/databus_dead_param/Prover.toml diff --git a/test_programs/execution_success/databus_dead_param/src/main.nr b/test_programs/compile_failure/databus_dead_param/src/main.nr similarity index 63% rename from test_programs/execution_success/databus_dead_param/src/main.nr rename to test_programs/compile_failure/databus_dead_param/src/main.nr index 2bd2c51a0d6..8380e8097ed 100644 --- a/test_programs/execution_success/databus_dead_param/src/main.nr +++ b/test_programs/compile_failure/databus_dead_param/src/main.nr @@ -1,7 +1,7 @@ // Regression for issue #8398 (https://github.com/noir-lang/noir/issues/8398) fn main( - a: (i8, u32, i8), - b: call_data(0) [(i8, i8, bool, bool, str<0>); 2], + _a: (i8, u32, i8), + _b: call_data(0) [(i8, i8, bool, bool, str<0>); 2], ) -> pub [(bool, str<3>, str<0>, u32); 0] { [] } diff --git a/test_programs/compile_failure/databus_dead_param/stderr.txt b/test_programs/compile_failure/databus_dead_param/stderr.txt new file mode 100644 index 00000000000..a365752aac0 --- /dev/null +++ b/test_programs/compile_failure/databus_dead_param/stderr.txt @@ -0,0 +1,8 @@ +error: Only sized types may be used in the entry point to a program + ┌─ src/main.nr:4:22 + │ +4 │ _b: call_data(0) [(i8, i8, bool, bool, str<0>); 2], + │ --------------------------------- Slices, references, or any type containing them may not be used in main, contract functions, or foldable functions + │ + +Aborting due to 1 previous error \ No newline at end of file diff --git a/test_programs/execution_success/databus_dead_param/stdout.txt b/test_programs/compile_failure/databus_dead_param/stdout.txt similarity index 100% rename from test_programs/execution_success/databus_dead_param/stdout.txt rename to test_programs/compile_failure/databus_dead_param/stdout.txt diff --git a/test_programs/execution_success/databus_in_fn_with_empty_arr/Nargo.toml b/test_programs/compile_failure/databus_in_fn_with_empty_arr/Nargo.toml similarity index 100% rename from test_programs/execution_success/databus_in_fn_with_empty_arr/Nargo.toml rename to test_programs/compile_failure/databus_in_fn_with_empty_arr/Nargo.toml diff --git a/test_programs/execution_success/databus_in_fn_with_empty_arr/Prover.toml b/test_programs/compile_failure/databus_in_fn_with_empty_arr/Prover.toml similarity index 100% rename from test_programs/execution_success/databus_in_fn_with_empty_arr/Prover.toml rename to test_programs/compile_failure/databus_in_fn_with_empty_arr/Prover.toml diff --git a/test_programs/execution_success/databus_in_fn_with_empty_arr/src/main.nr b/test_programs/compile_failure/databus_in_fn_with_empty_arr/src/main.nr similarity index 100% rename from test_programs/execution_success/databus_in_fn_with_empty_arr/src/main.nr rename to test_programs/compile_failure/databus_in_fn_with_empty_arr/src/main.nr diff --git a/test_programs/compile_failure/databus_in_fn_with_empty_arr/stderr.txt b/test_programs/compile_failure/databus_in_fn_with_empty_arr/stderr.txt new file mode 100644 index 00000000000..fa6745cd3ab --- /dev/null +++ b/test_programs/compile_failure/databus_in_fn_with_empty_arr/stderr.txt @@ -0,0 +1,8 @@ +error: Only sized types may be used in the entry point to a program + ┌─ src/main.nr:1:17 + │ +1 │ fn main(_empty: [u32; 0], value_1: u32, value_2: call_data(0) u32) { + │ -------- Slices, references, or any type containing them may not be used in main, contract functions, or foldable functions + │ + +Aborting due to 1 previous error \ No newline at end of file diff --git a/test_programs/compile_failure/main_with_generics/stderr.txt b/test_programs/compile_failure/main_with_generics/stderr.txt index 4fcada7b909..f4c1d8fca41 100644 --- a/test_programs/compile_failure/main_with_generics/stderr.txt +++ b/test_programs/compile_failure/main_with_generics/stderr.txt @@ -5,4 +5,11 @@ error: `main` entry-point function is not allowed to have generic parameters │ ------ │ -Aborting due to 1 previous error +error: Only sized types may be used in the entry point to a program + ┌─ src/main.nr:1:24 + │ +1 │ fn main(x: [Field; F]) { + │ ---------- Slices, references, or any type containing them may not be used in main, contract functions, or foldable functions + │ + +Aborting due to 2 previous errors \ No newline at end of file diff --git a/test_programs/compile_success_no_bug/noirc_evaluator_ssa_ssa_gen_tests_databus_no_dead_param_on_empty_array/Nargo.toml b/test_programs/compile_success_no_bug/noirc_evaluator_ssa_ssa_gen_tests_databus_no_dead_param_on_empty_array/Nargo.toml deleted file mode 100644 index d0a4e58a9c1..00000000000 --- a/test_programs/compile_success_no_bug/noirc_evaluator_ssa_ssa_gen_tests_databus_no_dead_param_on_empty_array/Nargo.toml +++ /dev/null @@ -1,7 +0,0 @@ - - [package] - name = "noirc_evaluator_ssa_ssa_gen_tests_databus_no_dead_param_on_empty_array" - type = "bin" - authors = [""] - - [dependencies] \ No newline at end of file diff --git a/test_programs/compile_success_no_bug/noirc_evaluator_ssa_ssa_gen_tests_databus_no_dead_param_on_empty_array/src/main.nr b/test_programs/compile_success_no_bug/noirc_evaluator_ssa_ssa_gen_tests_databus_no_dead_param_on_empty_array/src/main.nr deleted file mode 100644 index 5f9fb7bb219..00000000000 --- a/test_programs/compile_success_no_bug/noirc_evaluator_ssa_ssa_gen_tests_databus_no_dead_param_on_empty_array/src/main.nr +++ /dev/null @@ -1,5 +0,0 @@ - - fn main(a: (i8, u32, i8), b: call_data(0) [(i8, i8, bool, bool, str<0>); 2]) -> pub [(bool, str<3>, str<0>, u32); 0] { - [] - } - \ No newline at end of file diff --git a/test_programs/compile_success_no_bug/noirc_evaluator_ssa_ssa_gen_tests_databus_no_dead_param_on_empty_array/src_hash.txt b/test_programs/compile_success_no_bug/noirc_evaluator_ssa_ssa_gen_tests_databus_no_dead_param_on_empty_array/src_hash.txt deleted file mode 100644 index c44009cef2d..00000000000 --- a/test_programs/compile_success_no_bug/noirc_evaluator_ssa_ssa_gen_tests_databus_no_dead_param_on_empty_array/src_hash.txt +++ /dev/null @@ -1 +0,0 @@ -8959072883599795205 \ No newline at end of file diff --git a/test_programs/compile_success_no_bug/regression_8199/src/main.nr b/test_programs/compile_success_no_bug/regression_8199/src/main.nr index 0bdea976505..5902c5b0129 100644 --- a/test_programs/compile_success_no_bug/regression_8199/src/main.nr +++ b/test_programs/compile_success_no_bug/regression_8199/src/main.nr @@ -1,6 +1,6 @@ -global G_C: [[str<0>; 4]; 4] = - [["", "", "", ""], ["", "", "", ""], ["", "", "", ""], ["", "", "", ""]]; -unconstrained fn main(a: [[str<0>; 4]; 4]) { +global G_C: [[str<1>; 4]; 4] = + [["a", "a", "a", "a"], ["a", "a", "a", "a"], ["a", "a", "a", "a"], ["a", "a", "a", "a"]]; +unconstrained fn main(a: [[str<1>; 4]; 4]) { let mut f = a; f[0] = G_C[3]; } diff --git a/test_programs/execution_success/array_oob_regression_7952/stdout.txt b/test_programs/execution_success/array_oob_regression_7952/stdout.txt deleted file mode 100644 index 847825e746d..00000000000 --- a/test_programs/execution_success/array_oob_regression_7952/stdout.txt +++ /dev/null @@ -1 +0,0 @@ -[array_oob_regression_7952] Circuit output: Vec([]) \ No newline at end of file diff --git a/test_programs/execution_success/regression_8261/Prover.toml b/test_programs/execution_success/regression_8261/Prover.toml index 133555e7971..7dfd714ede2 100644 --- a/test_programs/execution_success/regression_8261/Prover.toml +++ b/test_programs/execution_success/regression_8261/Prover.toml @@ -18,7 +18,6 @@ b = [ c = [ [ "0x1eac91250e5e424f9c8b3eb451e0b343131fcf4342053cfad6337e7ca1350adb", - "", false, false, ], diff --git a/test_programs/execution_success/regression_8261/src/main.nr b/test_programs/execution_success/regression_8261/src/main.nr index 3e7f029925b..be6d8b02eca 100644 --- a/test_programs/execution_success/regression_8261/src/main.nr +++ b/test_programs/execution_success/regression_8261/src/main.nr @@ -1,7 +1,7 @@ fn main( a: bool, b: ([bool; 2], [bool; 2], str<2>, (u16, u16), u16), - c: ((Field, str<0>, bool, bool), (u16, str<2>)), + c: ((Field, bool, bool), (u16, str<2>)), ) -> pub u16 { b.4 % if c.0.2 { diff --git a/tooling/nargo_cli/tests/snapshots/execution_success/regression_8261/execute__tests__force_brillig_false_inliner_-9223372036854775808.snap b/tooling/nargo_cli/tests/snapshots/execution_success/regression_8261/execute__tests__force_brillig_false_inliner_-9223372036854775808.snap index d0847e26d24..7bc6106a78c 100644 --- a/tooling/nargo_cli/tests/snapshots/execution_success/regression_8261/execute__tests__force_brillig_false_inliner_-9223372036854775808.snap +++ b/tooling/nargo_cli/tests/snapshots/execution_success/regression_8261/execute__tests__force_brillig_false_inliner_-9223372036854775808.snap @@ -72,10 +72,6 @@ expression: artifact { "kind": "field" }, - { - "kind": "string", - "length": 0 - }, { "kind": "boolean" }, @@ -134,19 +130,19 @@ expression: artifact "BLACKBOX::RANGE [(_13, 16)] []", "BLACKBOX::RANGE [(_14, 8)] []", "BLACKBOX::RANGE [(_15, 8)] []", - "BRILLIG CALL func 0: PREDICATE = EXPR [ (-1, _11, _0) (1, _0) 0 ]", + "BRILLIG CALL func 0: PREDICATE = EXPR [ (-1, _12, _0) (1, _0) 0 ]", "inputs: [Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(8))], q_c: 0 }), Single(Expression { mul_terms: [], linear_combinations: [], q_c: 64485 })], outputs: [Simple(Witness(17)), Simple(Witness(18))]", "BLACKBOX::RANGE [(_17, 1)] []", "BLACKBOX::RANGE [(_18, 16)] []", - "EXPR [ (-1, _0, _11) (1, _0) (1, _18) (-1, _19) 1050 ]", - "EXPR [ (-1, _0, _11) (1, _0) (-1, _20) 0 ]", + "EXPR [ (-1, _0, _12) (1, _0) (1, _18) (-1, _19) 1050 ]", + "EXPR [ (-1, _0, _12) (1, _0) (-1, _20) 0 ]", "EXPR [ (1, _19, _20) (-1, _21) 0 ]", "BLACKBOX::RANGE [(_21, 16)] []", "EXPR [ (1, _8, _20) (-64485, _17, _20) (-1, _18, _20) 0 ]", - "EXPR [ (-1, _11) (-1, _22) 1 ]", - "EXPR [ (37995, _0, _11) (1, _18, _20) (-37995, _0) (-37995, _11) (-1, _23) 37995 ]", - "BRILLIG CALL func 1: inputs: [Single(Expression { mul_terms: [(1, Witness(11), Witness(7)), (1, Witness(22), Witness(23))], linear_combinations: [], q_c: 0 })], outputs: [Simple(Witness(24))]", - "EXPR [ (1, _7, _11) (1, _22, _23) (-1, _25) 0 ]", + "EXPR [ (-1, _12) (-1, _22) 1 ]", + "EXPR [ (37995, _0, _12) (1, _18, _20) (-37995, _0) (-37995, _12) (-1, _23) 37995 ]", + "BRILLIG CALL func 1: inputs: [Single(Expression { mul_terms: [(1, Witness(12), Witness(7)), (1, Witness(22), Witness(23))], linear_combinations: [], q_c: 0 })], outputs: [Simple(Witness(24))]", + "EXPR [ (1, _7, _12) (1, _22, _23) (-1, _25) 0 ]", "EXPR [ (1, _24, _25) -1 ]", "BRILLIG CALL func 0: inputs: [Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(9))], q_c: 0 }), Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(25))], q_c: 0 })], outputs: [Simple(Witness(26)), Simple(Witness(27))]", "BLACKBOX::RANGE [(_26, 16)] []", @@ -160,10 +156,10 @@ expression: artifact "unconstrained func 1", "[Const { destination: Direct(21), bit_size: Integer(U32), value: 1 }, Const { destination: Direct(20), bit_size: Integer(U32), value: 0 }, CalldataCopy { destination_address: Direct(0), size_address: Direct(21), offset_address: Direct(20) }, Const { destination: Direct(2), bit_size: Field, value: 0 }, BinaryFieldOp { destination: Direct(3), op: Equals, lhs: Direct(0), rhs: Direct(2) }, JumpIf { condition: Direct(3), location: 8 }, Const { destination: Direct(1), bit_size: Field, value: 1 }, BinaryFieldOp { destination: Direct(0), op: Div, lhs: Direct(1), rhs: Direct(0) }, Stop { return_data: HeapVector { pointer: Direct(20), size: Direct(21) } }]" ], - "debug_symbols": "jdHLqoMwEAbgd5l1Frkc29pXORSJOpZAiJImhSK+e8dM7WVR6OozGf/RYWbosc3nxoVhvMDxf4Y2Ou/dufFjZ5MbA93Oi4Dt2KSISFfwVqfUZCOGBMeQvRdwtT6Xly6TDcVkI1WlAAw9SQ0H53F9WsQrLb9Hda0fYSOrZ7z6Oa+q7ePGyI/8iU62c/FjYlAVZQSoHbNnDkxd0JJRjGYM88dQF/pvvWP2zIGpC0YyitEMddHLOk10tvX4WMKQQ/e2k3Sbtsq2tSmOHfY54jpNqdF8dw==", + "debug_symbols": "jdHBboMwDAbgd/E5B2Jogb7KNKEApooUBZQmlSbUd5+JYWsPlXr6SMxvsLzCSH26dtZP8w0uXyv0wTpnr52bBxPt7Pl2fSg4jl0MRHwFT3VOLSaQj3DxyTkFd+NSfum2GJ+NJnC1UEB+ZLnhZB1tTw/1ny7eR7Gp9jC29V/89HFeV7jnS8SX/DefzGDDy8SgT5xRoM9CLTRCm8FC0AIKpVAJ3IW/i2ehFhqhzZSFoAUUuMv2l3cTrOkd7UuYkh+edhJ/lqNybG0J80BjCrRNk2s83y8=", "file_map": { "50": { - "source": "fn main(\n a: bool,\n b: ([bool; 2], [bool; 2], str<2>, (u16, u16), u16),\n c: ((Field, str<0>, bool, bool), (u16, str<2>)),\n) -> pub u16 {\n b.4\n % if c.0.2 {\n b.3.0\n } else {\n if (!a) {\n 37995\n } else {\n (b.3.1 % 64485)\n }\n }\n}\n", + "source": "fn main(\n a: bool,\n b: ([bool; 2], [bool; 2], str<2>, (u16, u16), u16),\n c: ((Field, bool, bool), (u16, str<2>)),\n) -> pub u16 {\n b.4\n % if c.0.2 {\n b.3.0\n } else {\n if (!a) {\n 37995\n } else {\n (b.3.1 % 64485)\n }\n }\n}\n", "path": "" } }, diff --git a/tooling/nargo_cli/tests/snapshots/execution_success/regression_8261/execute__tests__force_brillig_false_inliner_0.snap b/tooling/nargo_cli/tests/snapshots/execution_success/regression_8261/execute__tests__force_brillig_false_inliner_0.snap index d0847e26d24..7bc6106a78c 100644 --- a/tooling/nargo_cli/tests/snapshots/execution_success/regression_8261/execute__tests__force_brillig_false_inliner_0.snap +++ b/tooling/nargo_cli/tests/snapshots/execution_success/regression_8261/execute__tests__force_brillig_false_inliner_0.snap @@ -72,10 +72,6 @@ expression: artifact { "kind": "field" }, - { - "kind": "string", - "length": 0 - }, { "kind": "boolean" }, @@ -134,19 +130,19 @@ expression: artifact "BLACKBOX::RANGE [(_13, 16)] []", "BLACKBOX::RANGE [(_14, 8)] []", "BLACKBOX::RANGE [(_15, 8)] []", - "BRILLIG CALL func 0: PREDICATE = EXPR [ (-1, _11, _0) (1, _0) 0 ]", + "BRILLIG CALL func 0: PREDICATE = EXPR [ (-1, _12, _0) (1, _0) 0 ]", "inputs: [Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(8))], q_c: 0 }), Single(Expression { mul_terms: [], linear_combinations: [], q_c: 64485 })], outputs: [Simple(Witness(17)), Simple(Witness(18))]", "BLACKBOX::RANGE [(_17, 1)] []", "BLACKBOX::RANGE [(_18, 16)] []", - "EXPR [ (-1, _0, _11) (1, _0) (1, _18) (-1, _19) 1050 ]", - "EXPR [ (-1, _0, _11) (1, _0) (-1, _20) 0 ]", + "EXPR [ (-1, _0, _12) (1, _0) (1, _18) (-1, _19) 1050 ]", + "EXPR [ (-1, _0, _12) (1, _0) (-1, _20) 0 ]", "EXPR [ (1, _19, _20) (-1, _21) 0 ]", "BLACKBOX::RANGE [(_21, 16)] []", "EXPR [ (1, _8, _20) (-64485, _17, _20) (-1, _18, _20) 0 ]", - "EXPR [ (-1, _11) (-1, _22) 1 ]", - "EXPR [ (37995, _0, _11) (1, _18, _20) (-37995, _0) (-37995, _11) (-1, _23) 37995 ]", - "BRILLIG CALL func 1: inputs: [Single(Expression { mul_terms: [(1, Witness(11), Witness(7)), (1, Witness(22), Witness(23))], linear_combinations: [], q_c: 0 })], outputs: [Simple(Witness(24))]", - "EXPR [ (1, _7, _11) (1, _22, _23) (-1, _25) 0 ]", + "EXPR [ (-1, _12) (-1, _22) 1 ]", + "EXPR [ (37995, _0, _12) (1, _18, _20) (-37995, _0) (-37995, _12) (-1, _23) 37995 ]", + "BRILLIG CALL func 1: inputs: [Single(Expression { mul_terms: [(1, Witness(12), Witness(7)), (1, Witness(22), Witness(23))], linear_combinations: [], q_c: 0 })], outputs: [Simple(Witness(24))]", + "EXPR [ (1, _7, _12) (1, _22, _23) (-1, _25) 0 ]", "EXPR [ (1, _24, _25) -1 ]", "BRILLIG CALL func 0: inputs: [Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(9))], q_c: 0 }), Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(25))], q_c: 0 })], outputs: [Simple(Witness(26)), Simple(Witness(27))]", "BLACKBOX::RANGE [(_26, 16)] []", @@ -160,10 +156,10 @@ expression: artifact "unconstrained func 1", "[Const { destination: Direct(21), bit_size: Integer(U32), value: 1 }, Const { destination: Direct(20), bit_size: Integer(U32), value: 0 }, CalldataCopy { destination_address: Direct(0), size_address: Direct(21), offset_address: Direct(20) }, Const { destination: Direct(2), bit_size: Field, value: 0 }, BinaryFieldOp { destination: Direct(3), op: Equals, lhs: Direct(0), rhs: Direct(2) }, JumpIf { condition: Direct(3), location: 8 }, Const { destination: Direct(1), bit_size: Field, value: 1 }, BinaryFieldOp { destination: Direct(0), op: Div, lhs: Direct(1), rhs: Direct(0) }, Stop { return_data: HeapVector { pointer: Direct(20), size: Direct(21) } }]" ], - "debug_symbols": "jdHLqoMwEAbgd5l1Frkc29pXORSJOpZAiJImhSK+e8dM7WVR6OozGf/RYWbosc3nxoVhvMDxf4Y2Ou/dufFjZ5MbA93Oi4Dt2KSISFfwVqfUZCOGBMeQvRdwtT6Xly6TDcVkI1WlAAw9SQ0H53F9WsQrLb9Hda0fYSOrZ7z6Oa+q7ePGyI/8iU62c/FjYlAVZQSoHbNnDkxd0JJRjGYM88dQF/pvvWP2zIGpC0YyitEMddHLOk10tvX4WMKQQ/e2k3Sbtsq2tSmOHfY54jpNqdF8dw==", + "debug_symbols": "jdHBboMwDAbgd/E5B2Jogb7KNKEApooUBZQmlSbUd5+JYWsPlXr6SMxvsLzCSH26dtZP8w0uXyv0wTpnr52bBxPt7Pl2fSg4jl0MRHwFT3VOLSaQj3DxyTkFd+NSfum2GJ+NJnC1UEB+ZLnhZB1tTw/1ny7eR7Gp9jC29V/89HFeV7jnS8SX/DefzGDDy8SgT5xRoM9CLTRCm8FC0AIKpVAJ3IW/i2ehFhqhzZSFoAUUuMv2l3cTrOkd7UuYkh+edhJ/lqNybG0J80BjCrRNk2s83y8=", "file_map": { "50": { - "source": "fn main(\n a: bool,\n b: ([bool; 2], [bool; 2], str<2>, (u16, u16), u16),\n c: ((Field, str<0>, bool, bool), (u16, str<2>)),\n) -> pub u16 {\n b.4\n % if c.0.2 {\n b.3.0\n } else {\n if (!a) {\n 37995\n } else {\n (b.3.1 % 64485)\n }\n }\n}\n", + "source": "fn main(\n a: bool,\n b: ([bool; 2], [bool; 2], str<2>, (u16, u16), u16),\n c: ((Field, bool, bool), (u16, str<2>)),\n) -> pub u16 {\n b.4\n % if c.0.2 {\n b.3.0\n } else {\n if (!a) {\n 37995\n } else {\n (b.3.1 % 64485)\n }\n }\n}\n", "path": "" } }, diff --git a/tooling/nargo_cli/tests/snapshots/execution_success/regression_8261/execute__tests__force_brillig_false_inliner_9223372036854775807.snap b/tooling/nargo_cli/tests/snapshots/execution_success/regression_8261/execute__tests__force_brillig_false_inliner_9223372036854775807.snap index d0847e26d24..7bc6106a78c 100644 --- a/tooling/nargo_cli/tests/snapshots/execution_success/regression_8261/execute__tests__force_brillig_false_inliner_9223372036854775807.snap +++ b/tooling/nargo_cli/tests/snapshots/execution_success/regression_8261/execute__tests__force_brillig_false_inliner_9223372036854775807.snap @@ -72,10 +72,6 @@ expression: artifact { "kind": "field" }, - { - "kind": "string", - "length": 0 - }, { "kind": "boolean" }, @@ -134,19 +130,19 @@ expression: artifact "BLACKBOX::RANGE [(_13, 16)] []", "BLACKBOX::RANGE [(_14, 8)] []", "BLACKBOX::RANGE [(_15, 8)] []", - "BRILLIG CALL func 0: PREDICATE = EXPR [ (-1, _11, _0) (1, _0) 0 ]", + "BRILLIG CALL func 0: PREDICATE = EXPR [ (-1, _12, _0) (1, _0) 0 ]", "inputs: [Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(8))], q_c: 0 }), Single(Expression { mul_terms: [], linear_combinations: [], q_c: 64485 })], outputs: [Simple(Witness(17)), Simple(Witness(18))]", "BLACKBOX::RANGE [(_17, 1)] []", "BLACKBOX::RANGE [(_18, 16)] []", - "EXPR [ (-1, _0, _11) (1, _0) (1, _18) (-1, _19) 1050 ]", - "EXPR [ (-1, _0, _11) (1, _0) (-1, _20) 0 ]", + "EXPR [ (-1, _0, _12) (1, _0) (1, _18) (-1, _19) 1050 ]", + "EXPR [ (-1, _0, _12) (1, _0) (-1, _20) 0 ]", "EXPR [ (1, _19, _20) (-1, _21) 0 ]", "BLACKBOX::RANGE [(_21, 16)] []", "EXPR [ (1, _8, _20) (-64485, _17, _20) (-1, _18, _20) 0 ]", - "EXPR [ (-1, _11) (-1, _22) 1 ]", - "EXPR [ (37995, _0, _11) (1, _18, _20) (-37995, _0) (-37995, _11) (-1, _23) 37995 ]", - "BRILLIG CALL func 1: inputs: [Single(Expression { mul_terms: [(1, Witness(11), Witness(7)), (1, Witness(22), Witness(23))], linear_combinations: [], q_c: 0 })], outputs: [Simple(Witness(24))]", - "EXPR [ (1, _7, _11) (1, _22, _23) (-1, _25) 0 ]", + "EXPR [ (-1, _12) (-1, _22) 1 ]", + "EXPR [ (37995, _0, _12) (1, _18, _20) (-37995, _0) (-37995, _12) (-1, _23) 37995 ]", + "BRILLIG CALL func 1: inputs: [Single(Expression { mul_terms: [(1, Witness(12), Witness(7)), (1, Witness(22), Witness(23))], linear_combinations: [], q_c: 0 })], outputs: [Simple(Witness(24))]", + "EXPR [ (1, _7, _12) (1, _22, _23) (-1, _25) 0 ]", "EXPR [ (1, _24, _25) -1 ]", "BRILLIG CALL func 0: inputs: [Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(9))], q_c: 0 }), Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(25))], q_c: 0 })], outputs: [Simple(Witness(26)), Simple(Witness(27))]", "BLACKBOX::RANGE [(_26, 16)] []", @@ -160,10 +156,10 @@ expression: artifact "unconstrained func 1", "[Const { destination: Direct(21), bit_size: Integer(U32), value: 1 }, Const { destination: Direct(20), bit_size: Integer(U32), value: 0 }, CalldataCopy { destination_address: Direct(0), size_address: Direct(21), offset_address: Direct(20) }, Const { destination: Direct(2), bit_size: Field, value: 0 }, BinaryFieldOp { destination: Direct(3), op: Equals, lhs: Direct(0), rhs: Direct(2) }, JumpIf { condition: Direct(3), location: 8 }, Const { destination: Direct(1), bit_size: Field, value: 1 }, BinaryFieldOp { destination: Direct(0), op: Div, lhs: Direct(1), rhs: Direct(0) }, Stop { return_data: HeapVector { pointer: Direct(20), size: Direct(21) } }]" ], - "debug_symbols": "jdHLqoMwEAbgd5l1Frkc29pXORSJOpZAiJImhSK+e8dM7WVR6OozGf/RYWbosc3nxoVhvMDxf4Y2Ou/dufFjZ5MbA93Oi4Dt2KSISFfwVqfUZCOGBMeQvRdwtT6Xly6TDcVkI1WlAAw9SQ0H53F9WsQrLb9Hda0fYSOrZ7z6Oa+q7ePGyI/8iU62c/FjYlAVZQSoHbNnDkxd0JJRjGYM88dQF/pvvWP2zIGpC0YyitEMddHLOk10tvX4WMKQQ/e2k3Sbtsq2tSmOHfY54jpNqdF8dw==", + "debug_symbols": "jdHBboMwDAbgd/E5B2Jogb7KNKEApooUBZQmlSbUd5+JYWsPlXr6SMxvsLzCSH26dtZP8w0uXyv0wTpnr52bBxPt7Pl2fSg4jl0MRHwFT3VOLSaQj3DxyTkFd+NSfum2GJ+NJnC1UEB+ZLnhZB1tTw/1ny7eR7Gp9jC29V/89HFeV7jnS8SX/DefzGDDy8SgT5xRoM9CLTRCm8FC0AIKpVAJ3IW/i2ehFhqhzZSFoAUUuMv2l3cTrOkd7UuYkh+edhJ/lqNybG0J80BjCrRNk2s83y8=", "file_map": { "50": { - "source": "fn main(\n a: bool,\n b: ([bool; 2], [bool; 2], str<2>, (u16, u16), u16),\n c: ((Field, str<0>, bool, bool), (u16, str<2>)),\n) -> pub u16 {\n b.4\n % if c.0.2 {\n b.3.0\n } else {\n if (!a) {\n 37995\n } else {\n (b.3.1 % 64485)\n }\n }\n}\n", + "source": "fn main(\n a: bool,\n b: ([bool; 2], [bool; 2], str<2>, (u16, u16), u16),\n c: ((Field, bool, bool), (u16, str<2>)),\n) -> pub u16 {\n b.4\n % if c.0.2 {\n b.3.0\n } else {\n if (!a) {\n 37995\n } else {\n (b.3.1 % 64485)\n }\n }\n}\n", "path": "" } }, diff --git a/tooling/nargo_cli/tests/snapshots/execution_success/regression_8261/execute__tests__force_brillig_true_inliner_-9223372036854775808.snap b/tooling/nargo_cli/tests/snapshots/execution_success/regression_8261/execute__tests__force_brillig_true_inliner_-9223372036854775808.snap index 6206da6e385..8f7eca6e750 100644 --- a/tooling/nargo_cli/tests/snapshots/execution_success/regression_8261/execute__tests__force_brillig_true_inliner_-9223372036854775808.snap +++ b/tooling/nargo_cli/tests/snapshots/execution_success/regression_8261/execute__tests__force_brillig_true_inliner_-9223372036854775808.snap @@ -72,10 +72,6 @@ expression: artifact { "kind": "field" }, - { - "kind": "string", - "length": 0 - }, { "kind": "boolean" }, @@ -124,14 +120,14 @@ expression: artifact "private parameters indices : [_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15]", "public parameters indices : []", "return value indices : [_16]", - "BRILLIG CALL func 0: inputs: [Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(0))], q_c: 0 }), Array([Expression { mul_terms: [], linear_combinations: [(1, Witness(1))], q_c: 0 }, Expression { mul_terms: [], linear_combinations: [(1, Witness(2))], q_c: 0 }]), Array([Expression { mul_terms: [], linear_combinations: [(1, Witness(3))], q_c: 0 }, Expression { mul_terms: [], linear_combinations: [(1, Witness(4))], q_c: 0 }]), Array([Expression { mul_terms: [], linear_combinations: [(1, Witness(5))], q_c: 0 }, Expression { mul_terms: [], linear_combinations: [(1, Witness(6))], q_c: 0 }]), Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(7))], q_c: 0 }), Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(8))], q_c: 0 }), Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(9))], q_c: 0 }), Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(10))], q_c: 0 }), Array([]), Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(11))], q_c: 0 }), Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(12))], q_c: 0 }), Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(13))], q_c: 0 }), Array([Expression { mul_terms: [], linear_combinations: [(1, Witness(14))], q_c: 0 }, Expression { mul_terms: [], linear_combinations: [(1, Witness(15))], q_c: 0 }])], outputs: [Simple(Witness(16))]", + "BRILLIG CALL func 0: inputs: [Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(0))], q_c: 0 }), Array([Expression { mul_terms: [], linear_combinations: [(1, Witness(1))], q_c: 0 }, Expression { mul_terms: [], linear_combinations: [(1, Witness(2))], q_c: 0 }]), Array([Expression { mul_terms: [], linear_combinations: [(1, Witness(3))], q_c: 0 }, Expression { mul_terms: [], linear_combinations: [(1, Witness(4))], q_c: 0 }]), Array([Expression { mul_terms: [], linear_combinations: [(1, Witness(5))], q_c: 0 }, Expression { mul_terms: [], linear_combinations: [(1, Witness(6))], q_c: 0 }]), Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(7))], q_c: 0 }), Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(8))], q_c: 0 }), Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(9))], q_c: 0 }), Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(10))], q_c: 0 }), Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(11))], q_c: 0 }), Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(12))], q_c: 0 }), Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(13))], q_c: 0 }), Array([Expression { mul_terms: [], linear_combinations: [(1, Witness(14))], q_c: 0 }, Expression { mul_terms: [], linear_combinations: [(1, Witness(15))], q_c: 0 }])], outputs: [Simple(Witness(16))]", "unconstrained func 0", - "[Const { destination: Direct(2), bit_size: Integer(U32), value: 1 }, Const { destination: Direct(1), bit_size: Integer(U32), value: 32853 }, Const { destination: Direct(0), bit_size: Integer(U32), value: 3 }, Const { destination: Relative(14), bit_size: Integer(U32), value: 16 }, Const { destination: Relative(15), bit_size: Integer(U32), value: 0 }, CalldataCopy { destination_address: Direct(32836), size_address: Relative(14), offset_address: Relative(15) }, Cast { destination: Direct(32836), source: Direct(32836), bit_size: Integer(U1) }, Cast { destination: Direct(32837), source: Direct(32837), bit_size: Integer(U1) }, Cast { destination: Direct(32838), source: Direct(32838), bit_size: Integer(U1) }, Cast { destination: Direct(32839), source: Direct(32839), bit_size: Integer(U1) }, Cast { destination: Direct(32840), source: Direct(32840), bit_size: Integer(U1) }, Cast { destination: Direct(32841), source: Direct(32841), bit_size: Integer(U8) }, Cast { destination: Direct(32842), source: Direct(32842), bit_size: Integer(U8) }, Cast { destination: Direct(32843), source: Direct(32843), bit_size: Integer(U16) }, Cast { destination: Direct(32844), source: Direct(32844), bit_size: Integer(U16) }, Cast { destination: Direct(32845), source: Direct(32845), bit_size: Integer(U16) }, Cast { destination: Direct(32847), source: Direct(32847), bit_size: Integer(U1) }, Cast { destination: Direct(32848), source: Direct(32848), bit_size: Integer(U1) }, Cast { destination: Direct(32849), source: Direct(32849), bit_size: Integer(U16) }, Cast { destination: Direct(32850), source: Direct(32850), bit_size: Integer(U8) }, Cast { destination: Direct(32851), source: Direct(32851), bit_size: Integer(U8) }, Mov { destination: Relative(1), source: Direct(32836) }, Const { destination: Relative(2), bit_size: Integer(U32), value: 32837 }, Const { destination: Relative(15), bit_size: Integer(U32), value: 2 }, Mov { destination: Relative(14), source: Direct(1) }, Const { destination: Relative(16), bit_size: Integer(U32), value: 3 }, BinaryIntOp { destination: Direct(1), op: Add, bit_size: U32, lhs: Direct(1), rhs: Relative(16) }, IndirectConst { destination_pointer: Relative(14), bit_size: Integer(U32), value: 1 }, BinaryIntOp { destination: Relative(16), op: Add, bit_size: U32, lhs: Relative(14), rhs: Direct(2) }, Mov { destination: Direct(32771), source: Relative(2) }, Mov { destination: Direct(32772), source: Relative(16) }, Mov { destination: Direct(32773), source: Relative(15) }, Call { location: 94 }, Mov { destination: Relative(2), source: Relative(14) }, Const { destination: Relative(3), bit_size: Integer(U32), value: 32839 }, Const { destination: Relative(15), bit_size: Integer(U32), value: 2 }, Mov { destination: Relative(14), source: Direct(1) }, Const { destination: Relative(16), bit_size: Integer(U32), value: 3 }, BinaryIntOp { destination: Direct(1), op: Add, bit_size: U32, lhs: Direct(1), rhs: Relative(16) }, IndirectConst { destination_pointer: Relative(14), bit_size: Integer(U32), value: 1 }, BinaryIntOp { destination: Relative(16), op: Add, bit_size: U32, lhs: Relative(14), rhs: Direct(2) }, Mov { destination: Direct(32771), source: Relative(3) }, Mov { destination: Direct(32772), source: Relative(16) }, Mov { destination: Direct(32773), source: Relative(15) }, Call { location: 94 }, Mov { destination: Relative(3), source: Relative(14) }, Const { destination: Relative(4), bit_size: Integer(U32), value: 32841 }, Const { destination: Relative(15), bit_size: Integer(U32), value: 2 }, Mov { destination: Relative(14), source: Direct(1) }, Const { destination: Relative(16), bit_size: Integer(U32), value: 3 }, BinaryIntOp { destination: Direct(1), op: Add, bit_size: U32, lhs: Direct(1), rhs: Relative(16) }, IndirectConst { destination_pointer: Relative(14), bit_size: Integer(U32), value: 1 }, BinaryIntOp { destination: Relative(16), op: Add, bit_size: U32, lhs: Relative(14), rhs: Direct(2) }, Mov { destination: Direct(32771), source: Relative(4) }, Mov { destination: Direct(32772), source: Relative(16) }, Mov { destination: Direct(32773), source: Relative(15) }, Call { location: 94 }, Mov { destination: Relative(4), source: Relative(14) }, Mov { destination: Relative(5), source: Direct(32843) }, Mov { destination: Relative(6), source: Direct(32844) }, Mov { destination: Relative(7), source: Direct(32845) }, Mov { destination: Relative(8), source: Direct(32846) }, Const { destination: Relative(9), bit_size: Integer(U32), value: 32847 }, Const { destination: Relative(15), bit_size: Integer(U32), value: 0 }, Mov { destination: Relative(14), source: Direct(1) }, BinaryIntOp { destination: Direct(1), op: Add, bit_size: U32, lhs: Direct(1), rhs: Direct(2) }, IndirectConst { destination_pointer: Relative(14), bit_size: Integer(U32), value: 1 }, BinaryIntOp { destination: Relative(16), op: Add, bit_size: U32, lhs: Relative(14), rhs: Direct(2) }, Mov { destination: Direct(32771), source: Relative(9) }, Mov { destination: Direct(32772), source: Relative(16) }, Mov { destination: Direct(32773), source: Relative(15) }, Call { location: 94 }, Mov { destination: Relative(9), source: Relative(14) }, Mov { destination: Relative(10), source: Direct(32847) }, Mov { destination: Relative(11), source: Direct(32848) }, Mov { destination: Relative(12), source: Direct(32849) }, Const { destination: Relative(13), bit_size: Integer(U32), value: 32850 }, Const { destination: Relative(15), bit_size: Integer(U32), value: 2 }, Mov { destination: Relative(14), source: Direct(1) }, Const { destination: Relative(16), bit_size: Integer(U32), value: 3 }, BinaryIntOp { destination: Direct(1), op: Add, bit_size: U32, lhs: Direct(1), rhs: Relative(16) }, IndirectConst { destination_pointer: Relative(14), bit_size: Integer(U32), value: 1 }, BinaryIntOp { destination: Relative(16), op: Add, bit_size: U32, lhs: Relative(14), rhs: Direct(2) }, Mov { destination: Direct(32771), source: Relative(13) }, Mov { destination: Direct(32772), source: Relative(16) }, Mov { destination: Direct(32773), source: Relative(15) }, Call { location: 94 }, Mov { destination: Relative(13), source: Relative(14) }, Call { location: 105 }, Call { location: 106 }, Mov { destination: Direct(32852), source: Relative(1) }, Const { destination: Relative(2), bit_size: Integer(U32), value: 32852 }, Const { destination: Relative(3), bit_size: Integer(U32), value: 1 }, Stop { return_data: HeapVector { pointer: Relative(2), size: Relative(3) } }, BinaryIntOp { destination: Direct(32775), op: Add, bit_size: U32, lhs: Direct(32771), rhs: Direct(32773) }, Mov { destination: Direct(32776), source: Direct(32771) }, Mov { destination: Direct(32777), source: Direct(32772) }, BinaryIntOp { destination: Direct(32778), op: Equals, bit_size: U32, lhs: Direct(32776), rhs: Direct(32775) }, JumpIf { condition: Direct(32778), location: 104 }, Load { destination: Direct(32774), source_pointer: Direct(32776) }, Store { destination_pointer: Direct(32777), source: Direct(32774) }, BinaryIntOp { destination: Direct(32776), op: Add, bit_size: U32, lhs: Direct(32776), rhs: Direct(2) }, BinaryIntOp { destination: Direct(32777), op: Add, bit_size: U32, lhs: Direct(32777), rhs: Direct(2) }, Jump { location: 97 }, Return, Return, Call { location: 128 }, JumpIf { condition: Relative(10), location: 122 }, Jump { location: 109 }, JumpIf { condition: Relative(1), location: 114 }, Jump { location: 111 }, Const { destination: Relative(1), bit_size: Integer(U16), value: 37995 }, Mov { destination: Relative(2), source: Relative(1) }, Jump { location: 120 }, Const { destination: Relative(1), bit_size: Integer(U16), value: 64485 }, BinaryIntOp { destination: Relative(4), op: Div, bit_size: U16, lhs: Relative(6), rhs: Relative(1) }, BinaryIntOp { destination: Relative(5), op: Mul, bit_size: U16, lhs: Relative(4), rhs: Relative(1) }, BinaryIntOp { destination: Relative(3), op: Sub, bit_size: U16, lhs: Relative(6), rhs: Relative(5) }, Mov { destination: Relative(2), source: Relative(3) }, Jump { location: 120 }, Mov { destination: Relative(14), source: Relative(2) }, Jump { location: 124 }, Mov { destination: Relative(14), source: Relative(5) }, Jump { location: 124 }, BinaryIntOp { destination: Relative(2), op: Div, bit_size: U16, lhs: Relative(7), rhs: Relative(14) }, BinaryIntOp { destination: Relative(3), op: Mul, bit_size: U16, lhs: Relative(2), rhs: Relative(14) }, BinaryIntOp { destination: Relative(1), op: Sub, bit_size: U16, lhs: Relative(7), rhs: Relative(3) }, Return, Const { destination: Direct(32772), bit_size: Integer(U32), value: 30720 }, BinaryIntOp { destination: Direct(32771), op: LessThan, bit_size: U32, lhs: Direct(0), rhs: Direct(32772) }, JumpIf { condition: Direct(32771), location: 133 }, IndirectConst { destination_pointer: Direct(1), bit_size: Integer(U64), value: 17843811134343075018 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Direct(2) } }, Return]" + "[Const { destination: Direct(2), bit_size: Integer(U32), value: 1 }, Const { destination: Direct(1), bit_size: Integer(U32), value: 32853 }, Const { destination: Direct(0), bit_size: Integer(U32), value: 3 }, Const { destination: Relative(13), bit_size: Integer(U32), value: 16 }, Const { destination: Relative(14), bit_size: Integer(U32), value: 0 }, CalldataCopy { destination_address: Direct(32836), size_address: Relative(13), offset_address: Relative(14) }, Cast { destination: Direct(32836), source: Direct(32836), bit_size: Integer(U1) }, Cast { destination: Direct(32837), source: Direct(32837), bit_size: Integer(U1) }, Cast { destination: Direct(32838), source: Direct(32838), bit_size: Integer(U1) }, Cast { destination: Direct(32839), source: Direct(32839), bit_size: Integer(U1) }, Cast { destination: Direct(32840), source: Direct(32840), bit_size: Integer(U1) }, Cast { destination: Direct(32841), source: Direct(32841), bit_size: Integer(U8) }, Cast { destination: Direct(32842), source: Direct(32842), bit_size: Integer(U8) }, Cast { destination: Direct(32843), source: Direct(32843), bit_size: Integer(U16) }, Cast { destination: Direct(32844), source: Direct(32844), bit_size: Integer(U16) }, Cast { destination: Direct(32845), source: Direct(32845), bit_size: Integer(U16) }, Cast { destination: Direct(32847), source: Direct(32847), bit_size: Integer(U1) }, Cast { destination: Direct(32848), source: Direct(32848), bit_size: Integer(U1) }, Cast { destination: Direct(32849), source: Direct(32849), bit_size: Integer(U16) }, Cast { destination: Direct(32850), source: Direct(32850), bit_size: Integer(U8) }, Cast { destination: Direct(32851), source: Direct(32851), bit_size: Integer(U8) }, Mov { destination: Relative(1), source: Direct(32836) }, Const { destination: Relative(2), bit_size: Integer(U32), value: 32837 }, Const { destination: Relative(14), bit_size: Integer(U32), value: 2 }, Mov { destination: Relative(13), source: Direct(1) }, Const { destination: Relative(15), bit_size: Integer(U32), value: 3 }, BinaryIntOp { destination: Direct(1), op: Add, bit_size: U32, lhs: Direct(1), rhs: Relative(15) }, IndirectConst { destination_pointer: Relative(13), bit_size: Integer(U32), value: 1 }, BinaryIntOp { destination: Relative(15), op: Add, bit_size: U32, lhs: Relative(13), rhs: Direct(2) }, Mov { destination: Direct(32771), source: Relative(2) }, Mov { destination: Direct(32772), source: Relative(15) }, Mov { destination: Direct(32773), source: Relative(14) }, Call { location: 83 }, Mov { destination: Relative(2), source: Relative(13) }, Const { destination: Relative(3), bit_size: Integer(U32), value: 32839 }, Const { destination: Relative(14), bit_size: Integer(U32), value: 2 }, Mov { destination: Relative(13), source: Direct(1) }, Const { destination: Relative(15), bit_size: Integer(U32), value: 3 }, BinaryIntOp { destination: Direct(1), op: Add, bit_size: U32, lhs: Direct(1), rhs: Relative(15) }, IndirectConst { destination_pointer: Relative(13), bit_size: Integer(U32), value: 1 }, BinaryIntOp { destination: Relative(15), op: Add, bit_size: U32, lhs: Relative(13), rhs: Direct(2) }, Mov { destination: Direct(32771), source: Relative(3) }, Mov { destination: Direct(32772), source: Relative(15) }, Mov { destination: Direct(32773), source: Relative(14) }, Call { location: 83 }, Mov { destination: Relative(3), source: Relative(13) }, Const { destination: Relative(4), bit_size: Integer(U32), value: 32841 }, Const { destination: Relative(14), bit_size: Integer(U32), value: 2 }, Mov { destination: Relative(13), source: Direct(1) }, Const { destination: Relative(15), bit_size: Integer(U32), value: 3 }, BinaryIntOp { destination: Direct(1), op: Add, bit_size: U32, lhs: Direct(1), rhs: Relative(15) }, IndirectConst { destination_pointer: Relative(13), bit_size: Integer(U32), value: 1 }, BinaryIntOp { destination: Relative(15), op: Add, bit_size: U32, lhs: Relative(13), rhs: Direct(2) }, Mov { destination: Direct(32771), source: Relative(4) }, Mov { destination: Direct(32772), source: Relative(15) }, Mov { destination: Direct(32773), source: Relative(14) }, Call { location: 83 }, Mov { destination: Relative(4), source: Relative(13) }, Mov { destination: Relative(5), source: Direct(32843) }, Mov { destination: Relative(6), source: Direct(32844) }, Mov { destination: Relative(7), source: Direct(32845) }, Mov { destination: Relative(8), source: Direct(32846) }, Mov { destination: Relative(9), source: Direct(32847) }, Mov { destination: Relative(10), source: Direct(32848) }, Mov { destination: Relative(11), source: Direct(32849) }, Const { destination: Relative(12), bit_size: Integer(U32), value: 32850 }, Const { destination: Relative(14), bit_size: Integer(U32), value: 2 }, Mov { destination: Relative(13), source: Direct(1) }, Const { destination: Relative(15), bit_size: Integer(U32), value: 3 }, BinaryIntOp { destination: Direct(1), op: Add, bit_size: U32, lhs: Direct(1), rhs: Relative(15) }, IndirectConst { destination_pointer: Relative(13), bit_size: Integer(U32), value: 1 }, BinaryIntOp { destination: Relative(15), op: Add, bit_size: U32, lhs: Relative(13), rhs: Direct(2) }, Mov { destination: Direct(32771), source: Relative(12) }, Mov { destination: Direct(32772), source: Relative(15) }, Mov { destination: Direct(32773), source: Relative(14) }, Call { location: 83 }, Mov { destination: Relative(12), source: Relative(13) }, Call { location: 94 }, Call { location: 95 }, Mov { destination: Direct(32852), source: Relative(1) }, Const { destination: Relative(2), bit_size: Integer(U32), value: 32852 }, Const { destination: Relative(3), bit_size: Integer(U32), value: 1 }, Stop { return_data: HeapVector { pointer: Relative(2), size: Relative(3) } }, BinaryIntOp { destination: Direct(32775), op: Add, bit_size: U32, lhs: Direct(32771), rhs: Direct(32773) }, Mov { destination: Direct(32776), source: Direct(32771) }, Mov { destination: Direct(32777), source: Direct(32772) }, BinaryIntOp { destination: Direct(32778), op: Equals, bit_size: U32, lhs: Direct(32776), rhs: Direct(32775) }, JumpIf { condition: Direct(32778), location: 93 }, Load { destination: Direct(32774), source_pointer: Direct(32776) }, Store { destination_pointer: Direct(32777), source: Direct(32774) }, BinaryIntOp { destination: Direct(32776), op: Add, bit_size: U32, lhs: Direct(32776), rhs: Direct(2) }, BinaryIntOp { destination: Direct(32777), op: Add, bit_size: U32, lhs: Direct(32777), rhs: Direct(2) }, Jump { location: 86 }, Return, Return, Call { location: 117 }, JumpIf { condition: Relative(10), location: 111 }, Jump { location: 98 }, JumpIf { condition: Relative(1), location: 103 }, Jump { location: 100 }, Const { destination: Relative(1), bit_size: Integer(U16), value: 37995 }, Mov { destination: Relative(2), source: Relative(1) }, Jump { location: 109 }, Const { destination: Relative(1), bit_size: Integer(U16), value: 64485 }, BinaryIntOp { destination: Relative(4), op: Div, bit_size: U16, lhs: Relative(6), rhs: Relative(1) }, BinaryIntOp { destination: Relative(5), op: Mul, bit_size: U16, lhs: Relative(4), rhs: Relative(1) }, BinaryIntOp { destination: Relative(3), op: Sub, bit_size: U16, lhs: Relative(6), rhs: Relative(5) }, Mov { destination: Relative(2), source: Relative(3) }, Jump { location: 109 }, Mov { destination: Relative(13), source: Relative(2) }, Jump { location: 113 }, Mov { destination: Relative(13), source: Relative(5) }, Jump { location: 113 }, BinaryIntOp { destination: Relative(2), op: Div, bit_size: U16, lhs: Relative(7), rhs: Relative(13) }, BinaryIntOp { destination: Relative(3), op: Mul, bit_size: U16, lhs: Relative(2), rhs: Relative(13) }, BinaryIntOp { destination: Relative(1), op: Sub, bit_size: U16, lhs: Relative(7), rhs: Relative(3) }, Return, Const { destination: Direct(32772), bit_size: Integer(U32), value: 30720 }, BinaryIntOp { destination: Direct(32771), op: LessThan, bit_size: U32, lhs: Direct(0), rhs: Direct(32772) }, JumpIf { condition: Direct(32771), location: 122 }, IndirectConst { destination_pointer: Direct(1), bit_size: Integer(U64), value: 17843811134343075018 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Direct(2) } }, Return]" ], - "debug_symbols": "jZDNqsMgEIXfZdYu/In33uZVSggmmRRBTLB6oQTfvWNr+rModOOnczxn4Gww4ZBOvfXzcob2uMEQrHP21LtlNNEunqYb8HII0UArGFFX/lT+3ilJl4W6knSZM4M9q48BsUS9hNPK1QT0EVqfnGPwb1y6fTqvxt8YTSCVM0A/ESlwtg7LLbOnm3+2yoOsZsX1w66/9gu9L1eKv/k7epnRhre6ckkK1gwO63NOfnxR42Xdlb3uNSwjTilgSXp2rqigQ8MEbzoqlEZHIf+YUKrLZfkV", + "debug_symbols": "jZDNCsMgEITfZc8e4ib9y6uUEEyyKYKYYLVQgu/etTVtcyj04uc6zizMAgN14dJqO05XqM8LdE4boy+tmXrl9WT5dYEiHbIooZaCWWXuMvcvStYxscpkHWMUsGa13hGlqK9wXjkrR9ZDbYMxAm7KhOen66zsk145VgsBZAcmB47aULpF8XEXv614rLIZT4e3ffe3X1aY/SXixt/wpHrtNnXFlOS06gzlcQy2/1L9fV6Vte7ZTT0NwVFK+nTOjZ6PpTiVTeqZBykPQiI2Me1+AA==", "file_map": { "50": { - "source": "fn main(\n a: bool,\n b: ([bool; 2], [bool; 2], str<2>, (u16, u16), u16),\n c: ((Field, str<0>, bool, bool), (u16, str<2>)),\n) -> pub u16 {\n b.4\n % if c.0.2 {\n b.3.0\n } else {\n if (!a) {\n 37995\n } else {\n (b.3.1 % 64485)\n }\n }\n}\n", + "source": "fn main(\n a: bool,\n b: ([bool; 2], [bool; 2], str<2>, (u16, u16), u16),\n c: ((Field, bool, bool), (u16, str<2>)),\n) -> pub u16 {\n b.4\n % if c.0.2 {\n b.3.0\n } else {\n if (!a) {\n 37995\n } else {\n (b.3.1 % 64485)\n }\n }\n}\n", "path": "" } }, diff --git a/tooling/nargo_cli/tests/snapshots/execution_success/regression_8261/execute__tests__force_brillig_true_inliner_0.snap b/tooling/nargo_cli/tests/snapshots/execution_success/regression_8261/execute__tests__force_brillig_true_inliner_0.snap index 6206da6e385..8f7eca6e750 100644 --- a/tooling/nargo_cli/tests/snapshots/execution_success/regression_8261/execute__tests__force_brillig_true_inliner_0.snap +++ b/tooling/nargo_cli/tests/snapshots/execution_success/regression_8261/execute__tests__force_brillig_true_inliner_0.snap @@ -72,10 +72,6 @@ expression: artifact { "kind": "field" }, - { - "kind": "string", - "length": 0 - }, { "kind": "boolean" }, @@ -124,14 +120,14 @@ expression: artifact "private parameters indices : [_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15]", "public parameters indices : []", "return value indices : [_16]", - "BRILLIG CALL func 0: inputs: [Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(0))], q_c: 0 }), Array([Expression { mul_terms: [], linear_combinations: [(1, Witness(1))], q_c: 0 }, Expression { mul_terms: [], linear_combinations: [(1, Witness(2))], q_c: 0 }]), Array([Expression { mul_terms: [], linear_combinations: [(1, Witness(3))], q_c: 0 }, Expression { mul_terms: [], linear_combinations: [(1, Witness(4))], q_c: 0 }]), Array([Expression { mul_terms: [], linear_combinations: [(1, Witness(5))], q_c: 0 }, Expression { mul_terms: [], linear_combinations: [(1, Witness(6))], q_c: 0 }]), Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(7))], q_c: 0 }), Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(8))], q_c: 0 }), Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(9))], q_c: 0 }), Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(10))], q_c: 0 }), Array([]), Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(11))], q_c: 0 }), Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(12))], q_c: 0 }), Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(13))], q_c: 0 }), Array([Expression { mul_terms: [], linear_combinations: [(1, Witness(14))], q_c: 0 }, Expression { mul_terms: [], linear_combinations: [(1, Witness(15))], q_c: 0 }])], outputs: [Simple(Witness(16))]", + "BRILLIG CALL func 0: inputs: [Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(0))], q_c: 0 }), Array([Expression { mul_terms: [], linear_combinations: [(1, Witness(1))], q_c: 0 }, Expression { mul_terms: [], linear_combinations: [(1, Witness(2))], q_c: 0 }]), Array([Expression { mul_terms: [], linear_combinations: [(1, Witness(3))], q_c: 0 }, Expression { mul_terms: [], linear_combinations: [(1, Witness(4))], q_c: 0 }]), Array([Expression { mul_terms: [], linear_combinations: [(1, Witness(5))], q_c: 0 }, Expression { mul_terms: [], linear_combinations: [(1, Witness(6))], q_c: 0 }]), Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(7))], q_c: 0 }), Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(8))], q_c: 0 }), Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(9))], q_c: 0 }), Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(10))], q_c: 0 }), Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(11))], q_c: 0 }), Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(12))], q_c: 0 }), Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(13))], q_c: 0 }), Array([Expression { mul_terms: [], linear_combinations: [(1, Witness(14))], q_c: 0 }, Expression { mul_terms: [], linear_combinations: [(1, Witness(15))], q_c: 0 }])], outputs: [Simple(Witness(16))]", "unconstrained func 0", - "[Const { destination: Direct(2), bit_size: Integer(U32), value: 1 }, Const { destination: Direct(1), bit_size: Integer(U32), value: 32853 }, Const { destination: Direct(0), bit_size: Integer(U32), value: 3 }, Const { destination: Relative(14), bit_size: Integer(U32), value: 16 }, Const { destination: Relative(15), bit_size: Integer(U32), value: 0 }, CalldataCopy { destination_address: Direct(32836), size_address: Relative(14), offset_address: Relative(15) }, Cast { destination: Direct(32836), source: Direct(32836), bit_size: Integer(U1) }, Cast { destination: Direct(32837), source: Direct(32837), bit_size: Integer(U1) }, Cast { destination: Direct(32838), source: Direct(32838), bit_size: Integer(U1) }, Cast { destination: Direct(32839), source: Direct(32839), bit_size: Integer(U1) }, Cast { destination: Direct(32840), source: Direct(32840), bit_size: Integer(U1) }, Cast { destination: Direct(32841), source: Direct(32841), bit_size: Integer(U8) }, Cast { destination: Direct(32842), source: Direct(32842), bit_size: Integer(U8) }, Cast { destination: Direct(32843), source: Direct(32843), bit_size: Integer(U16) }, Cast { destination: Direct(32844), source: Direct(32844), bit_size: Integer(U16) }, Cast { destination: Direct(32845), source: Direct(32845), bit_size: Integer(U16) }, Cast { destination: Direct(32847), source: Direct(32847), bit_size: Integer(U1) }, Cast { destination: Direct(32848), source: Direct(32848), bit_size: Integer(U1) }, Cast { destination: Direct(32849), source: Direct(32849), bit_size: Integer(U16) }, Cast { destination: Direct(32850), source: Direct(32850), bit_size: Integer(U8) }, Cast { destination: Direct(32851), source: Direct(32851), bit_size: Integer(U8) }, Mov { destination: Relative(1), source: Direct(32836) }, Const { destination: Relative(2), bit_size: Integer(U32), value: 32837 }, Const { destination: Relative(15), bit_size: Integer(U32), value: 2 }, Mov { destination: Relative(14), source: Direct(1) }, Const { destination: Relative(16), bit_size: Integer(U32), value: 3 }, BinaryIntOp { destination: Direct(1), op: Add, bit_size: U32, lhs: Direct(1), rhs: Relative(16) }, IndirectConst { destination_pointer: Relative(14), bit_size: Integer(U32), value: 1 }, BinaryIntOp { destination: Relative(16), op: Add, bit_size: U32, lhs: Relative(14), rhs: Direct(2) }, Mov { destination: Direct(32771), source: Relative(2) }, Mov { destination: Direct(32772), source: Relative(16) }, Mov { destination: Direct(32773), source: Relative(15) }, Call { location: 94 }, Mov { destination: Relative(2), source: Relative(14) }, Const { destination: Relative(3), bit_size: Integer(U32), value: 32839 }, Const { destination: Relative(15), bit_size: Integer(U32), value: 2 }, Mov { destination: Relative(14), source: Direct(1) }, Const { destination: Relative(16), bit_size: Integer(U32), value: 3 }, BinaryIntOp { destination: Direct(1), op: Add, bit_size: U32, lhs: Direct(1), rhs: Relative(16) }, IndirectConst { destination_pointer: Relative(14), bit_size: Integer(U32), value: 1 }, BinaryIntOp { destination: Relative(16), op: Add, bit_size: U32, lhs: Relative(14), rhs: Direct(2) }, Mov { destination: Direct(32771), source: Relative(3) }, Mov { destination: Direct(32772), source: Relative(16) }, Mov { destination: Direct(32773), source: Relative(15) }, Call { location: 94 }, Mov { destination: Relative(3), source: Relative(14) }, Const { destination: Relative(4), bit_size: Integer(U32), value: 32841 }, Const { destination: Relative(15), bit_size: Integer(U32), value: 2 }, Mov { destination: Relative(14), source: Direct(1) }, Const { destination: Relative(16), bit_size: Integer(U32), value: 3 }, BinaryIntOp { destination: Direct(1), op: Add, bit_size: U32, lhs: Direct(1), rhs: Relative(16) }, IndirectConst { destination_pointer: Relative(14), bit_size: Integer(U32), value: 1 }, BinaryIntOp { destination: Relative(16), op: Add, bit_size: U32, lhs: Relative(14), rhs: Direct(2) }, Mov { destination: Direct(32771), source: Relative(4) }, Mov { destination: Direct(32772), source: Relative(16) }, Mov { destination: Direct(32773), source: Relative(15) }, Call { location: 94 }, Mov { destination: Relative(4), source: Relative(14) }, Mov { destination: Relative(5), source: Direct(32843) }, Mov { destination: Relative(6), source: Direct(32844) }, Mov { destination: Relative(7), source: Direct(32845) }, Mov { destination: Relative(8), source: Direct(32846) }, Const { destination: Relative(9), bit_size: Integer(U32), value: 32847 }, Const { destination: Relative(15), bit_size: Integer(U32), value: 0 }, Mov { destination: Relative(14), source: Direct(1) }, BinaryIntOp { destination: Direct(1), op: Add, bit_size: U32, lhs: Direct(1), rhs: Direct(2) }, IndirectConst { destination_pointer: Relative(14), bit_size: Integer(U32), value: 1 }, BinaryIntOp { destination: Relative(16), op: Add, bit_size: U32, lhs: Relative(14), rhs: Direct(2) }, Mov { destination: Direct(32771), source: Relative(9) }, Mov { destination: Direct(32772), source: Relative(16) }, Mov { destination: Direct(32773), source: Relative(15) }, Call { location: 94 }, Mov { destination: Relative(9), source: Relative(14) }, Mov { destination: Relative(10), source: Direct(32847) }, Mov { destination: Relative(11), source: Direct(32848) }, Mov { destination: Relative(12), source: Direct(32849) }, Const { destination: Relative(13), bit_size: Integer(U32), value: 32850 }, Const { destination: Relative(15), bit_size: Integer(U32), value: 2 }, Mov { destination: Relative(14), source: Direct(1) }, Const { destination: Relative(16), bit_size: Integer(U32), value: 3 }, BinaryIntOp { destination: Direct(1), op: Add, bit_size: U32, lhs: Direct(1), rhs: Relative(16) }, IndirectConst { destination_pointer: Relative(14), bit_size: Integer(U32), value: 1 }, BinaryIntOp { destination: Relative(16), op: Add, bit_size: U32, lhs: Relative(14), rhs: Direct(2) }, Mov { destination: Direct(32771), source: Relative(13) }, Mov { destination: Direct(32772), source: Relative(16) }, Mov { destination: Direct(32773), source: Relative(15) }, Call { location: 94 }, Mov { destination: Relative(13), source: Relative(14) }, Call { location: 105 }, Call { location: 106 }, Mov { destination: Direct(32852), source: Relative(1) }, Const { destination: Relative(2), bit_size: Integer(U32), value: 32852 }, Const { destination: Relative(3), bit_size: Integer(U32), value: 1 }, Stop { return_data: HeapVector { pointer: Relative(2), size: Relative(3) } }, BinaryIntOp { destination: Direct(32775), op: Add, bit_size: U32, lhs: Direct(32771), rhs: Direct(32773) }, Mov { destination: Direct(32776), source: Direct(32771) }, Mov { destination: Direct(32777), source: Direct(32772) }, BinaryIntOp { destination: Direct(32778), op: Equals, bit_size: U32, lhs: Direct(32776), rhs: Direct(32775) }, JumpIf { condition: Direct(32778), location: 104 }, Load { destination: Direct(32774), source_pointer: Direct(32776) }, Store { destination_pointer: Direct(32777), source: Direct(32774) }, BinaryIntOp { destination: Direct(32776), op: Add, bit_size: U32, lhs: Direct(32776), rhs: Direct(2) }, BinaryIntOp { destination: Direct(32777), op: Add, bit_size: U32, lhs: Direct(32777), rhs: Direct(2) }, Jump { location: 97 }, Return, Return, Call { location: 128 }, JumpIf { condition: Relative(10), location: 122 }, Jump { location: 109 }, JumpIf { condition: Relative(1), location: 114 }, Jump { location: 111 }, Const { destination: Relative(1), bit_size: Integer(U16), value: 37995 }, Mov { destination: Relative(2), source: Relative(1) }, Jump { location: 120 }, Const { destination: Relative(1), bit_size: Integer(U16), value: 64485 }, BinaryIntOp { destination: Relative(4), op: Div, bit_size: U16, lhs: Relative(6), rhs: Relative(1) }, BinaryIntOp { destination: Relative(5), op: Mul, bit_size: U16, lhs: Relative(4), rhs: Relative(1) }, BinaryIntOp { destination: Relative(3), op: Sub, bit_size: U16, lhs: Relative(6), rhs: Relative(5) }, Mov { destination: Relative(2), source: Relative(3) }, Jump { location: 120 }, Mov { destination: Relative(14), source: Relative(2) }, Jump { location: 124 }, Mov { destination: Relative(14), source: Relative(5) }, Jump { location: 124 }, BinaryIntOp { destination: Relative(2), op: Div, bit_size: U16, lhs: Relative(7), rhs: Relative(14) }, BinaryIntOp { destination: Relative(3), op: Mul, bit_size: U16, lhs: Relative(2), rhs: Relative(14) }, BinaryIntOp { destination: Relative(1), op: Sub, bit_size: U16, lhs: Relative(7), rhs: Relative(3) }, Return, Const { destination: Direct(32772), bit_size: Integer(U32), value: 30720 }, BinaryIntOp { destination: Direct(32771), op: LessThan, bit_size: U32, lhs: Direct(0), rhs: Direct(32772) }, JumpIf { condition: Direct(32771), location: 133 }, IndirectConst { destination_pointer: Direct(1), bit_size: Integer(U64), value: 17843811134343075018 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Direct(2) } }, Return]" + "[Const { destination: Direct(2), bit_size: Integer(U32), value: 1 }, Const { destination: Direct(1), bit_size: Integer(U32), value: 32853 }, Const { destination: Direct(0), bit_size: Integer(U32), value: 3 }, Const { destination: Relative(13), bit_size: Integer(U32), value: 16 }, Const { destination: Relative(14), bit_size: Integer(U32), value: 0 }, CalldataCopy { destination_address: Direct(32836), size_address: Relative(13), offset_address: Relative(14) }, Cast { destination: Direct(32836), source: Direct(32836), bit_size: Integer(U1) }, Cast { destination: Direct(32837), source: Direct(32837), bit_size: Integer(U1) }, Cast { destination: Direct(32838), source: Direct(32838), bit_size: Integer(U1) }, Cast { destination: Direct(32839), source: Direct(32839), bit_size: Integer(U1) }, Cast { destination: Direct(32840), source: Direct(32840), bit_size: Integer(U1) }, Cast { destination: Direct(32841), source: Direct(32841), bit_size: Integer(U8) }, Cast { destination: Direct(32842), source: Direct(32842), bit_size: Integer(U8) }, Cast { destination: Direct(32843), source: Direct(32843), bit_size: Integer(U16) }, Cast { destination: Direct(32844), source: Direct(32844), bit_size: Integer(U16) }, Cast { destination: Direct(32845), source: Direct(32845), bit_size: Integer(U16) }, Cast { destination: Direct(32847), source: Direct(32847), bit_size: Integer(U1) }, Cast { destination: Direct(32848), source: Direct(32848), bit_size: Integer(U1) }, Cast { destination: Direct(32849), source: Direct(32849), bit_size: Integer(U16) }, Cast { destination: Direct(32850), source: Direct(32850), bit_size: Integer(U8) }, Cast { destination: Direct(32851), source: Direct(32851), bit_size: Integer(U8) }, Mov { destination: Relative(1), source: Direct(32836) }, Const { destination: Relative(2), bit_size: Integer(U32), value: 32837 }, Const { destination: Relative(14), bit_size: Integer(U32), value: 2 }, Mov { destination: Relative(13), source: Direct(1) }, Const { destination: Relative(15), bit_size: Integer(U32), value: 3 }, BinaryIntOp { destination: Direct(1), op: Add, bit_size: U32, lhs: Direct(1), rhs: Relative(15) }, IndirectConst { destination_pointer: Relative(13), bit_size: Integer(U32), value: 1 }, BinaryIntOp { destination: Relative(15), op: Add, bit_size: U32, lhs: Relative(13), rhs: Direct(2) }, Mov { destination: Direct(32771), source: Relative(2) }, Mov { destination: Direct(32772), source: Relative(15) }, Mov { destination: Direct(32773), source: Relative(14) }, Call { location: 83 }, Mov { destination: Relative(2), source: Relative(13) }, Const { destination: Relative(3), bit_size: Integer(U32), value: 32839 }, Const { destination: Relative(14), bit_size: Integer(U32), value: 2 }, Mov { destination: Relative(13), source: Direct(1) }, Const { destination: Relative(15), bit_size: Integer(U32), value: 3 }, BinaryIntOp { destination: Direct(1), op: Add, bit_size: U32, lhs: Direct(1), rhs: Relative(15) }, IndirectConst { destination_pointer: Relative(13), bit_size: Integer(U32), value: 1 }, BinaryIntOp { destination: Relative(15), op: Add, bit_size: U32, lhs: Relative(13), rhs: Direct(2) }, Mov { destination: Direct(32771), source: Relative(3) }, Mov { destination: Direct(32772), source: Relative(15) }, Mov { destination: Direct(32773), source: Relative(14) }, Call { location: 83 }, Mov { destination: Relative(3), source: Relative(13) }, Const { destination: Relative(4), bit_size: Integer(U32), value: 32841 }, Const { destination: Relative(14), bit_size: Integer(U32), value: 2 }, Mov { destination: Relative(13), source: Direct(1) }, Const { destination: Relative(15), bit_size: Integer(U32), value: 3 }, BinaryIntOp { destination: Direct(1), op: Add, bit_size: U32, lhs: Direct(1), rhs: Relative(15) }, IndirectConst { destination_pointer: Relative(13), bit_size: Integer(U32), value: 1 }, BinaryIntOp { destination: Relative(15), op: Add, bit_size: U32, lhs: Relative(13), rhs: Direct(2) }, Mov { destination: Direct(32771), source: Relative(4) }, Mov { destination: Direct(32772), source: Relative(15) }, Mov { destination: Direct(32773), source: Relative(14) }, Call { location: 83 }, Mov { destination: Relative(4), source: Relative(13) }, Mov { destination: Relative(5), source: Direct(32843) }, Mov { destination: Relative(6), source: Direct(32844) }, Mov { destination: Relative(7), source: Direct(32845) }, Mov { destination: Relative(8), source: Direct(32846) }, Mov { destination: Relative(9), source: Direct(32847) }, Mov { destination: Relative(10), source: Direct(32848) }, Mov { destination: Relative(11), source: Direct(32849) }, Const { destination: Relative(12), bit_size: Integer(U32), value: 32850 }, Const { destination: Relative(14), bit_size: Integer(U32), value: 2 }, Mov { destination: Relative(13), source: Direct(1) }, Const { destination: Relative(15), bit_size: Integer(U32), value: 3 }, BinaryIntOp { destination: Direct(1), op: Add, bit_size: U32, lhs: Direct(1), rhs: Relative(15) }, IndirectConst { destination_pointer: Relative(13), bit_size: Integer(U32), value: 1 }, BinaryIntOp { destination: Relative(15), op: Add, bit_size: U32, lhs: Relative(13), rhs: Direct(2) }, Mov { destination: Direct(32771), source: Relative(12) }, Mov { destination: Direct(32772), source: Relative(15) }, Mov { destination: Direct(32773), source: Relative(14) }, Call { location: 83 }, Mov { destination: Relative(12), source: Relative(13) }, Call { location: 94 }, Call { location: 95 }, Mov { destination: Direct(32852), source: Relative(1) }, Const { destination: Relative(2), bit_size: Integer(U32), value: 32852 }, Const { destination: Relative(3), bit_size: Integer(U32), value: 1 }, Stop { return_data: HeapVector { pointer: Relative(2), size: Relative(3) } }, BinaryIntOp { destination: Direct(32775), op: Add, bit_size: U32, lhs: Direct(32771), rhs: Direct(32773) }, Mov { destination: Direct(32776), source: Direct(32771) }, Mov { destination: Direct(32777), source: Direct(32772) }, BinaryIntOp { destination: Direct(32778), op: Equals, bit_size: U32, lhs: Direct(32776), rhs: Direct(32775) }, JumpIf { condition: Direct(32778), location: 93 }, Load { destination: Direct(32774), source_pointer: Direct(32776) }, Store { destination_pointer: Direct(32777), source: Direct(32774) }, BinaryIntOp { destination: Direct(32776), op: Add, bit_size: U32, lhs: Direct(32776), rhs: Direct(2) }, BinaryIntOp { destination: Direct(32777), op: Add, bit_size: U32, lhs: Direct(32777), rhs: Direct(2) }, Jump { location: 86 }, Return, Return, Call { location: 117 }, JumpIf { condition: Relative(10), location: 111 }, Jump { location: 98 }, JumpIf { condition: Relative(1), location: 103 }, Jump { location: 100 }, Const { destination: Relative(1), bit_size: Integer(U16), value: 37995 }, Mov { destination: Relative(2), source: Relative(1) }, Jump { location: 109 }, Const { destination: Relative(1), bit_size: Integer(U16), value: 64485 }, BinaryIntOp { destination: Relative(4), op: Div, bit_size: U16, lhs: Relative(6), rhs: Relative(1) }, BinaryIntOp { destination: Relative(5), op: Mul, bit_size: U16, lhs: Relative(4), rhs: Relative(1) }, BinaryIntOp { destination: Relative(3), op: Sub, bit_size: U16, lhs: Relative(6), rhs: Relative(5) }, Mov { destination: Relative(2), source: Relative(3) }, Jump { location: 109 }, Mov { destination: Relative(13), source: Relative(2) }, Jump { location: 113 }, Mov { destination: Relative(13), source: Relative(5) }, Jump { location: 113 }, BinaryIntOp { destination: Relative(2), op: Div, bit_size: U16, lhs: Relative(7), rhs: Relative(13) }, BinaryIntOp { destination: Relative(3), op: Mul, bit_size: U16, lhs: Relative(2), rhs: Relative(13) }, BinaryIntOp { destination: Relative(1), op: Sub, bit_size: U16, lhs: Relative(7), rhs: Relative(3) }, Return, Const { destination: Direct(32772), bit_size: Integer(U32), value: 30720 }, BinaryIntOp { destination: Direct(32771), op: LessThan, bit_size: U32, lhs: Direct(0), rhs: Direct(32772) }, JumpIf { condition: Direct(32771), location: 122 }, IndirectConst { destination_pointer: Direct(1), bit_size: Integer(U64), value: 17843811134343075018 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Direct(2) } }, Return]" ], - "debug_symbols": "jZDNqsMgEIXfZdYu/In33uZVSggmmRRBTLB6oQTfvWNr+rModOOnczxn4Gww4ZBOvfXzcob2uMEQrHP21LtlNNEunqYb8HII0UArGFFX/lT+3ilJl4W6knSZM4M9q48BsUS9hNPK1QT0EVqfnGPwb1y6fTqvxt8YTSCVM0A/ESlwtg7LLbOnm3+2yoOsZsX1w66/9gu9L1eKv/k7epnRhre6ckkK1gwO63NOfnxR42Xdlb3uNSwjTilgSXp2rqigQ8MEbzoqlEZHIf+YUKrLZfkV", + "debug_symbols": "jZDNCsMgEITfZc8e4ib9y6uUEEyyKYKYYLVQgu/etTVtcyj04uc6zizMAgN14dJqO05XqM8LdE4boy+tmXrl9WT5dYEiHbIooZaCWWXuMvcvStYxscpkHWMUsGa13hGlqK9wXjkrR9ZDbYMxAm7KhOen66zsk145VgsBZAcmB47aULpF8XEXv614rLIZT4e3ffe3X1aY/SXixt/wpHrtNnXFlOS06gzlcQy2/1L9fV6Vte7ZTT0NwVFK+nTOjZ6PpTiVTeqZBykPQiI2Me1+AA==", "file_map": { "50": { - "source": "fn main(\n a: bool,\n b: ([bool; 2], [bool; 2], str<2>, (u16, u16), u16),\n c: ((Field, str<0>, bool, bool), (u16, str<2>)),\n) -> pub u16 {\n b.4\n % if c.0.2 {\n b.3.0\n } else {\n if (!a) {\n 37995\n } else {\n (b.3.1 % 64485)\n }\n }\n}\n", + "source": "fn main(\n a: bool,\n b: ([bool; 2], [bool; 2], str<2>, (u16, u16), u16),\n c: ((Field, bool, bool), (u16, str<2>)),\n) -> pub u16 {\n b.4\n % if c.0.2 {\n b.3.0\n } else {\n if (!a) {\n 37995\n } else {\n (b.3.1 % 64485)\n }\n }\n}\n", "path": "" } }, diff --git a/tooling/nargo_cli/tests/snapshots/execution_success/regression_8261/execute__tests__force_brillig_true_inliner_9223372036854775807.snap b/tooling/nargo_cli/tests/snapshots/execution_success/regression_8261/execute__tests__force_brillig_true_inliner_9223372036854775807.snap index 6206da6e385..8f7eca6e750 100644 --- a/tooling/nargo_cli/tests/snapshots/execution_success/regression_8261/execute__tests__force_brillig_true_inliner_9223372036854775807.snap +++ b/tooling/nargo_cli/tests/snapshots/execution_success/regression_8261/execute__tests__force_brillig_true_inliner_9223372036854775807.snap @@ -72,10 +72,6 @@ expression: artifact { "kind": "field" }, - { - "kind": "string", - "length": 0 - }, { "kind": "boolean" }, @@ -124,14 +120,14 @@ expression: artifact "private parameters indices : [_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15]", "public parameters indices : []", "return value indices : [_16]", - "BRILLIG CALL func 0: inputs: [Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(0))], q_c: 0 }), Array([Expression { mul_terms: [], linear_combinations: [(1, Witness(1))], q_c: 0 }, Expression { mul_terms: [], linear_combinations: [(1, Witness(2))], q_c: 0 }]), Array([Expression { mul_terms: [], linear_combinations: [(1, Witness(3))], q_c: 0 }, Expression { mul_terms: [], linear_combinations: [(1, Witness(4))], q_c: 0 }]), Array([Expression { mul_terms: [], linear_combinations: [(1, Witness(5))], q_c: 0 }, Expression { mul_terms: [], linear_combinations: [(1, Witness(6))], q_c: 0 }]), Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(7))], q_c: 0 }), Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(8))], q_c: 0 }), Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(9))], q_c: 0 }), Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(10))], q_c: 0 }), Array([]), Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(11))], q_c: 0 }), Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(12))], q_c: 0 }), Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(13))], q_c: 0 }), Array([Expression { mul_terms: [], linear_combinations: [(1, Witness(14))], q_c: 0 }, Expression { mul_terms: [], linear_combinations: [(1, Witness(15))], q_c: 0 }])], outputs: [Simple(Witness(16))]", + "BRILLIG CALL func 0: inputs: [Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(0))], q_c: 0 }), Array([Expression { mul_terms: [], linear_combinations: [(1, Witness(1))], q_c: 0 }, Expression { mul_terms: [], linear_combinations: [(1, Witness(2))], q_c: 0 }]), Array([Expression { mul_terms: [], linear_combinations: [(1, Witness(3))], q_c: 0 }, Expression { mul_terms: [], linear_combinations: [(1, Witness(4))], q_c: 0 }]), Array([Expression { mul_terms: [], linear_combinations: [(1, Witness(5))], q_c: 0 }, Expression { mul_terms: [], linear_combinations: [(1, Witness(6))], q_c: 0 }]), Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(7))], q_c: 0 }), Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(8))], q_c: 0 }), Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(9))], q_c: 0 }), Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(10))], q_c: 0 }), Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(11))], q_c: 0 }), Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(12))], q_c: 0 }), Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(13))], q_c: 0 }), Array([Expression { mul_terms: [], linear_combinations: [(1, Witness(14))], q_c: 0 }, Expression { mul_terms: [], linear_combinations: [(1, Witness(15))], q_c: 0 }])], outputs: [Simple(Witness(16))]", "unconstrained func 0", - "[Const { destination: Direct(2), bit_size: Integer(U32), value: 1 }, Const { destination: Direct(1), bit_size: Integer(U32), value: 32853 }, Const { destination: Direct(0), bit_size: Integer(U32), value: 3 }, Const { destination: Relative(14), bit_size: Integer(U32), value: 16 }, Const { destination: Relative(15), bit_size: Integer(U32), value: 0 }, CalldataCopy { destination_address: Direct(32836), size_address: Relative(14), offset_address: Relative(15) }, Cast { destination: Direct(32836), source: Direct(32836), bit_size: Integer(U1) }, Cast { destination: Direct(32837), source: Direct(32837), bit_size: Integer(U1) }, Cast { destination: Direct(32838), source: Direct(32838), bit_size: Integer(U1) }, Cast { destination: Direct(32839), source: Direct(32839), bit_size: Integer(U1) }, Cast { destination: Direct(32840), source: Direct(32840), bit_size: Integer(U1) }, Cast { destination: Direct(32841), source: Direct(32841), bit_size: Integer(U8) }, Cast { destination: Direct(32842), source: Direct(32842), bit_size: Integer(U8) }, Cast { destination: Direct(32843), source: Direct(32843), bit_size: Integer(U16) }, Cast { destination: Direct(32844), source: Direct(32844), bit_size: Integer(U16) }, Cast { destination: Direct(32845), source: Direct(32845), bit_size: Integer(U16) }, Cast { destination: Direct(32847), source: Direct(32847), bit_size: Integer(U1) }, Cast { destination: Direct(32848), source: Direct(32848), bit_size: Integer(U1) }, Cast { destination: Direct(32849), source: Direct(32849), bit_size: Integer(U16) }, Cast { destination: Direct(32850), source: Direct(32850), bit_size: Integer(U8) }, Cast { destination: Direct(32851), source: Direct(32851), bit_size: Integer(U8) }, Mov { destination: Relative(1), source: Direct(32836) }, Const { destination: Relative(2), bit_size: Integer(U32), value: 32837 }, Const { destination: Relative(15), bit_size: Integer(U32), value: 2 }, Mov { destination: Relative(14), source: Direct(1) }, Const { destination: Relative(16), bit_size: Integer(U32), value: 3 }, BinaryIntOp { destination: Direct(1), op: Add, bit_size: U32, lhs: Direct(1), rhs: Relative(16) }, IndirectConst { destination_pointer: Relative(14), bit_size: Integer(U32), value: 1 }, BinaryIntOp { destination: Relative(16), op: Add, bit_size: U32, lhs: Relative(14), rhs: Direct(2) }, Mov { destination: Direct(32771), source: Relative(2) }, Mov { destination: Direct(32772), source: Relative(16) }, Mov { destination: Direct(32773), source: Relative(15) }, Call { location: 94 }, Mov { destination: Relative(2), source: Relative(14) }, Const { destination: Relative(3), bit_size: Integer(U32), value: 32839 }, Const { destination: Relative(15), bit_size: Integer(U32), value: 2 }, Mov { destination: Relative(14), source: Direct(1) }, Const { destination: Relative(16), bit_size: Integer(U32), value: 3 }, BinaryIntOp { destination: Direct(1), op: Add, bit_size: U32, lhs: Direct(1), rhs: Relative(16) }, IndirectConst { destination_pointer: Relative(14), bit_size: Integer(U32), value: 1 }, BinaryIntOp { destination: Relative(16), op: Add, bit_size: U32, lhs: Relative(14), rhs: Direct(2) }, Mov { destination: Direct(32771), source: Relative(3) }, Mov { destination: Direct(32772), source: Relative(16) }, Mov { destination: Direct(32773), source: Relative(15) }, Call { location: 94 }, Mov { destination: Relative(3), source: Relative(14) }, Const { destination: Relative(4), bit_size: Integer(U32), value: 32841 }, Const { destination: Relative(15), bit_size: Integer(U32), value: 2 }, Mov { destination: Relative(14), source: Direct(1) }, Const { destination: Relative(16), bit_size: Integer(U32), value: 3 }, BinaryIntOp { destination: Direct(1), op: Add, bit_size: U32, lhs: Direct(1), rhs: Relative(16) }, IndirectConst { destination_pointer: Relative(14), bit_size: Integer(U32), value: 1 }, BinaryIntOp { destination: Relative(16), op: Add, bit_size: U32, lhs: Relative(14), rhs: Direct(2) }, Mov { destination: Direct(32771), source: Relative(4) }, Mov { destination: Direct(32772), source: Relative(16) }, Mov { destination: Direct(32773), source: Relative(15) }, Call { location: 94 }, Mov { destination: Relative(4), source: Relative(14) }, Mov { destination: Relative(5), source: Direct(32843) }, Mov { destination: Relative(6), source: Direct(32844) }, Mov { destination: Relative(7), source: Direct(32845) }, Mov { destination: Relative(8), source: Direct(32846) }, Const { destination: Relative(9), bit_size: Integer(U32), value: 32847 }, Const { destination: Relative(15), bit_size: Integer(U32), value: 0 }, Mov { destination: Relative(14), source: Direct(1) }, BinaryIntOp { destination: Direct(1), op: Add, bit_size: U32, lhs: Direct(1), rhs: Direct(2) }, IndirectConst { destination_pointer: Relative(14), bit_size: Integer(U32), value: 1 }, BinaryIntOp { destination: Relative(16), op: Add, bit_size: U32, lhs: Relative(14), rhs: Direct(2) }, Mov { destination: Direct(32771), source: Relative(9) }, Mov { destination: Direct(32772), source: Relative(16) }, Mov { destination: Direct(32773), source: Relative(15) }, Call { location: 94 }, Mov { destination: Relative(9), source: Relative(14) }, Mov { destination: Relative(10), source: Direct(32847) }, Mov { destination: Relative(11), source: Direct(32848) }, Mov { destination: Relative(12), source: Direct(32849) }, Const { destination: Relative(13), bit_size: Integer(U32), value: 32850 }, Const { destination: Relative(15), bit_size: Integer(U32), value: 2 }, Mov { destination: Relative(14), source: Direct(1) }, Const { destination: Relative(16), bit_size: Integer(U32), value: 3 }, BinaryIntOp { destination: Direct(1), op: Add, bit_size: U32, lhs: Direct(1), rhs: Relative(16) }, IndirectConst { destination_pointer: Relative(14), bit_size: Integer(U32), value: 1 }, BinaryIntOp { destination: Relative(16), op: Add, bit_size: U32, lhs: Relative(14), rhs: Direct(2) }, Mov { destination: Direct(32771), source: Relative(13) }, Mov { destination: Direct(32772), source: Relative(16) }, Mov { destination: Direct(32773), source: Relative(15) }, Call { location: 94 }, Mov { destination: Relative(13), source: Relative(14) }, Call { location: 105 }, Call { location: 106 }, Mov { destination: Direct(32852), source: Relative(1) }, Const { destination: Relative(2), bit_size: Integer(U32), value: 32852 }, Const { destination: Relative(3), bit_size: Integer(U32), value: 1 }, Stop { return_data: HeapVector { pointer: Relative(2), size: Relative(3) } }, BinaryIntOp { destination: Direct(32775), op: Add, bit_size: U32, lhs: Direct(32771), rhs: Direct(32773) }, Mov { destination: Direct(32776), source: Direct(32771) }, Mov { destination: Direct(32777), source: Direct(32772) }, BinaryIntOp { destination: Direct(32778), op: Equals, bit_size: U32, lhs: Direct(32776), rhs: Direct(32775) }, JumpIf { condition: Direct(32778), location: 104 }, Load { destination: Direct(32774), source_pointer: Direct(32776) }, Store { destination_pointer: Direct(32777), source: Direct(32774) }, BinaryIntOp { destination: Direct(32776), op: Add, bit_size: U32, lhs: Direct(32776), rhs: Direct(2) }, BinaryIntOp { destination: Direct(32777), op: Add, bit_size: U32, lhs: Direct(32777), rhs: Direct(2) }, Jump { location: 97 }, Return, Return, Call { location: 128 }, JumpIf { condition: Relative(10), location: 122 }, Jump { location: 109 }, JumpIf { condition: Relative(1), location: 114 }, Jump { location: 111 }, Const { destination: Relative(1), bit_size: Integer(U16), value: 37995 }, Mov { destination: Relative(2), source: Relative(1) }, Jump { location: 120 }, Const { destination: Relative(1), bit_size: Integer(U16), value: 64485 }, BinaryIntOp { destination: Relative(4), op: Div, bit_size: U16, lhs: Relative(6), rhs: Relative(1) }, BinaryIntOp { destination: Relative(5), op: Mul, bit_size: U16, lhs: Relative(4), rhs: Relative(1) }, BinaryIntOp { destination: Relative(3), op: Sub, bit_size: U16, lhs: Relative(6), rhs: Relative(5) }, Mov { destination: Relative(2), source: Relative(3) }, Jump { location: 120 }, Mov { destination: Relative(14), source: Relative(2) }, Jump { location: 124 }, Mov { destination: Relative(14), source: Relative(5) }, Jump { location: 124 }, BinaryIntOp { destination: Relative(2), op: Div, bit_size: U16, lhs: Relative(7), rhs: Relative(14) }, BinaryIntOp { destination: Relative(3), op: Mul, bit_size: U16, lhs: Relative(2), rhs: Relative(14) }, BinaryIntOp { destination: Relative(1), op: Sub, bit_size: U16, lhs: Relative(7), rhs: Relative(3) }, Return, Const { destination: Direct(32772), bit_size: Integer(U32), value: 30720 }, BinaryIntOp { destination: Direct(32771), op: LessThan, bit_size: U32, lhs: Direct(0), rhs: Direct(32772) }, JumpIf { condition: Direct(32771), location: 133 }, IndirectConst { destination_pointer: Direct(1), bit_size: Integer(U64), value: 17843811134343075018 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Direct(2) } }, Return]" + "[Const { destination: Direct(2), bit_size: Integer(U32), value: 1 }, Const { destination: Direct(1), bit_size: Integer(U32), value: 32853 }, Const { destination: Direct(0), bit_size: Integer(U32), value: 3 }, Const { destination: Relative(13), bit_size: Integer(U32), value: 16 }, Const { destination: Relative(14), bit_size: Integer(U32), value: 0 }, CalldataCopy { destination_address: Direct(32836), size_address: Relative(13), offset_address: Relative(14) }, Cast { destination: Direct(32836), source: Direct(32836), bit_size: Integer(U1) }, Cast { destination: Direct(32837), source: Direct(32837), bit_size: Integer(U1) }, Cast { destination: Direct(32838), source: Direct(32838), bit_size: Integer(U1) }, Cast { destination: Direct(32839), source: Direct(32839), bit_size: Integer(U1) }, Cast { destination: Direct(32840), source: Direct(32840), bit_size: Integer(U1) }, Cast { destination: Direct(32841), source: Direct(32841), bit_size: Integer(U8) }, Cast { destination: Direct(32842), source: Direct(32842), bit_size: Integer(U8) }, Cast { destination: Direct(32843), source: Direct(32843), bit_size: Integer(U16) }, Cast { destination: Direct(32844), source: Direct(32844), bit_size: Integer(U16) }, Cast { destination: Direct(32845), source: Direct(32845), bit_size: Integer(U16) }, Cast { destination: Direct(32847), source: Direct(32847), bit_size: Integer(U1) }, Cast { destination: Direct(32848), source: Direct(32848), bit_size: Integer(U1) }, Cast { destination: Direct(32849), source: Direct(32849), bit_size: Integer(U16) }, Cast { destination: Direct(32850), source: Direct(32850), bit_size: Integer(U8) }, Cast { destination: Direct(32851), source: Direct(32851), bit_size: Integer(U8) }, Mov { destination: Relative(1), source: Direct(32836) }, Const { destination: Relative(2), bit_size: Integer(U32), value: 32837 }, Const { destination: Relative(14), bit_size: Integer(U32), value: 2 }, Mov { destination: Relative(13), source: Direct(1) }, Const { destination: Relative(15), bit_size: Integer(U32), value: 3 }, BinaryIntOp { destination: Direct(1), op: Add, bit_size: U32, lhs: Direct(1), rhs: Relative(15) }, IndirectConst { destination_pointer: Relative(13), bit_size: Integer(U32), value: 1 }, BinaryIntOp { destination: Relative(15), op: Add, bit_size: U32, lhs: Relative(13), rhs: Direct(2) }, Mov { destination: Direct(32771), source: Relative(2) }, Mov { destination: Direct(32772), source: Relative(15) }, Mov { destination: Direct(32773), source: Relative(14) }, Call { location: 83 }, Mov { destination: Relative(2), source: Relative(13) }, Const { destination: Relative(3), bit_size: Integer(U32), value: 32839 }, Const { destination: Relative(14), bit_size: Integer(U32), value: 2 }, Mov { destination: Relative(13), source: Direct(1) }, Const { destination: Relative(15), bit_size: Integer(U32), value: 3 }, BinaryIntOp { destination: Direct(1), op: Add, bit_size: U32, lhs: Direct(1), rhs: Relative(15) }, IndirectConst { destination_pointer: Relative(13), bit_size: Integer(U32), value: 1 }, BinaryIntOp { destination: Relative(15), op: Add, bit_size: U32, lhs: Relative(13), rhs: Direct(2) }, Mov { destination: Direct(32771), source: Relative(3) }, Mov { destination: Direct(32772), source: Relative(15) }, Mov { destination: Direct(32773), source: Relative(14) }, Call { location: 83 }, Mov { destination: Relative(3), source: Relative(13) }, Const { destination: Relative(4), bit_size: Integer(U32), value: 32841 }, Const { destination: Relative(14), bit_size: Integer(U32), value: 2 }, Mov { destination: Relative(13), source: Direct(1) }, Const { destination: Relative(15), bit_size: Integer(U32), value: 3 }, BinaryIntOp { destination: Direct(1), op: Add, bit_size: U32, lhs: Direct(1), rhs: Relative(15) }, IndirectConst { destination_pointer: Relative(13), bit_size: Integer(U32), value: 1 }, BinaryIntOp { destination: Relative(15), op: Add, bit_size: U32, lhs: Relative(13), rhs: Direct(2) }, Mov { destination: Direct(32771), source: Relative(4) }, Mov { destination: Direct(32772), source: Relative(15) }, Mov { destination: Direct(32773), source: Relative(14) }, Call { location: 83 }, Mov { destination: Relative(4), source: Relative(13) }, Mov { destination: Relative(5), source: Direct(32843) }, Mov { destination: Relative(6), source: Direct(32844) }, Mov { destination: Relative(7), source: Direct(32845) }, Mov { destination: Relative(8), source: Direct(32846) }, Mov { destination: Relative(9), source: Direct(32847) }, Mov { destination: Relative(10), source: Direct(32848) }, Mov { destination: Relative(11), source: Direct(32849) }, Const { destination: Relative(12), bit_size: Integer(U32), value: 32850 }, Const { destination: Relative(14), bit_size: Integer(U32), value: 2 }, Mov { destination: Relative(13), source: Direct(1) }, Const { destination: Relative(15), bit_size: Integer(U32), value: 3 }, BinaryIntOp { destination: Direct(1), op: Add, bit_size: U32, lhs: Direct(1), rhs: Relative(15) }, IndirectConst { destination_pointer: Relative(13), bit_size: Integer(U32), value: 1 }, BinaryIntOp { destination: Relative(15), op: Add, bit_size: U32, lhs: Relative(13), rhs: Direct(2) }, Mov { destination: Direct(32771), source: Relative(12) }, Mov { destination: Direct(32772), source: Relative(15) }, Mov { destination: Direct(32773), source: Relative(14) }, Call { location: 83 }, Mov { destination: Relative(12), source: Relative(13) }, Call { location: 94 }, Call { location: 95 }, Mov { destination: Direct(32852), source: Relative(1) }, Const { destination: Relative(2), bit_size: Integer(U32), value: 32852 }, Const { destination: Relative(3), bit_size: Integer(U32), value: 1 }, Stop { return_data: HeapVector { pointer: Relative(2), size: Relative(3) } }, BinaryIntOp { destination: Direct(32775), op: Add, bit_size: U32, lhs: Direct(32771), rhs: Direct(32773) }, Mov { destination: Direct(32776), source: Direct(32771) }, Mov { destination: Direct(32777), source: Direct(32772) }, BinaryIntOp { destination: Direct(32778), op: Equals, bit_size: U32, lhs: Direct(32776), rhs: Direct(32775) }, JumpIf { condition: Direct(32778), location: 93 }, Load { destination: Direct(32774), source_pointer: Direct(32776) }, Store { destination_pointer: Direct(32777), source: Direct(32774) }, BinaryIntOp { destination: Direct(32776), op: Add, bit_size: U32, lhs: Direct(32776), rhs: Direct(2) }, BinaryIntOp { destination: Direct(32777), op: Add, bit_size: U32, lhs: Direct(32777), rhs: Direct(2) }, Jump { location: 86 }, Return, Return, Call { location: 117 }, JumpIf { condition: Relative(10), location: 111 }, Jump { location: 98 }, JumpIf { condition: Relative(1), location: 103 }, Jump { location: 100 }, Const { destination: Relative(1), bit_size: Integer(U16), value: 37995 }, Mov { destination: Relative(2), source: Relative(1) }, Jump { location: 109 }, Const { destination: Relative(1), bit_size: Integer(U16), value: 64485 }, BinaryIntOp { destination: Relative(4), op: Div, bit_size: U16, lhs: Relative(6), rhs: Relative(1) }, BinaryIntOp { destination: Relative(5), op: Mul, bit_size: U16, lhs: Relative(4), rhs: Relative(1) }, BinaryIntOp { destination: Relative(3), op: Sub, bit_size: U16, lhs: Relative(6), rhs: Relative(5) }, Mov { destination: Relative(2), source: Relative(3) }, Jump { location: 109 }, Mov { destination: Relative(13), source: Relative(2) }, Jump { location: 113 }, Mov { destination: Relative(13), source: Relative(5) }, Jump { location: 113 }, BinaryIntOp { destination: Relative(2), op: Div, bit_size: U16, lhs: Relative(7), rhs: Relative(13) }, BinaryIntOp { destination: Relative(3), op: Mul, bit_size: U16, lhs: Relative(2), rhs: Relative(13) }, BinaryIntOp { destination: Relative(1), op: Sub, bit_size: U16, lhs: Relative(7), rhs: Relative(3) }, Return, Const { destination: Direct(32772), bit_size: Integer(U32), value: 30720 }, BinaryIntOp { destination: Direct(32771), op: LessThan, bit_size: U32, lhs: Direct(0), rhs: Direct(32772) }, JumpIf { condition: Direct(32771), location: 122 }, IndirectConst { destination_pointer: Direct(1), bit_size: Integer(U64), value: 17843811134343075018 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Direct(2) } }, Return]" ], - "debug_symbols": "jZDNqsMgEIXfZdYu/In33uZVSggmmRRBTLB6oQTfvWNr+rModOOnczxn4Gww4ZBOvfXzcob2uMEQrHP21LtlNNEunqYb8HII0UArGFFX/lT+3ilJl4W6knSZM4M9q48BsUS9hNPK1QT0EVqfnGPwb1y6fTqvxt8YTSCVM0A/ESlwtg7LLbOnm3+2yoOsZsX1w66/9gu9L1eKv/k7epnRhre6ckkK1gwO63NOfnxR42Xdlb3uNSwjTilgSXp2rqigQ8MEbzoqlEZHIf+YUKrLZfkV", + "debug_symbols": "jZDNCsMgEITfZc8e4ib9y6uUEEyyKYKYYLVQgu/etTVtcyj04uc6zizMAgN14dJqO05XqM8LdE4boy+tmXrl9WT5dYEiHbIooZaCWWXuMvcvStYxscpkHWMUsGa13hGlqK9wXjkrR9ZDbYMxAm7KhOen66zsk145VgsBZAcmB47aULpF8XEXv614rLIZT4e3ffe3X1aY/SXixt/wpHrtNnXFlOS06gzlcQy2/1L9fV6Vte7ZTT0NwVFK+nTOjZ6PpTiVTeqZBykPQiI2Me1+AA==", "file_map": { "50": { - "source": "fn main(\n a: bool,\n b: ([bool; 2], [bool; 2], str<2>, (u16, u16), u16),\n c: ((Field, str<0>, bool, bool), (u16, str<2>)),\n) -> pub u16 {\n b.4\n % if c.0.2 {\n b.3.0\n } else {\n if (!a) {\n 37995\n } else {\n (b.3.1 % 64485)\n }\n }\n}\n", + "source": "fn main(\n a: bool,\n b: ([bool; 2], [bool; 2], str<2>, (u16, u16), u16),\n c: ((Field, bool, bool), (u16, str<2>)),\n) -> pub u16 {\n b.4\n % if c.0.2 {\n b.3.0\n } else {\n if (!a) {\n 37995\n } else {\n (b.3.1 % 64485)\n }\n }\n}\n", "path": "" } }, diff --git a/tooling/nargo_cli/tests/snapshots/expand/compile_success_no_bug/regression_8199/execute__tests__expanded.snap b/tooling/nargo_cli/tests/snapshots/expand/compile_success_no_bug/regression_8199/execute__tests__expanded.snap index 71354ebcbc5..edb5772709e 100644 --- a/tooling/nargo_cli/tests/snapshots/expand/compile_success_no_bug/regression_8199/execute__tests__expanded.snap +++ b/tooling/nargo_cli/tests/snapshots/expand/compile_success_no_bug/regression_8199/execute__tests__expanded.snap @@ -2,10 +2,10 @@ source: tooling/nargo_cli/tests/execute.rs expression: expanded_code --- -global G_C: [[str<0>; 4]; 4] = - [["", "", "", ""], ["", "", "", ""], ["", "", "", ""], ["", "", "", ""]]; +global G_C: [[str<1>; 4]; 4] = + [["a", "a", "a", "a"], ["a", "a", "a", "a"], ["a", "a", "a", "a"], ["a", "a", "a", "a"]]; -unconstrained fn main(a: [[str<0>; 4]; 4]) { - let mut f: [[str<0>; 4]; 4] = a; +unconstrained fn main(a: [[str<1>; 4]; 4]) { + let mut f: [[str<1>; 4]; 4] = a; f[0] = G_C[3]; } diff --git a/tooling/nargo_cli/tests/snapshots/expand/execution_success/regression_8261/execute__tests__expanded.snap b/tooling/nargo_cli/tests/snapshots/expand/execution_success/regression_8261/execute__tests__expanded.snap index 9121319cca0..9e8fbd37a8f 100644 --- a/tooling/nargo_cli/tests/snapshots/expand/execution_success/regression_8261/execute__tests__expanded.snap +++ b/tooling/nargo_cli/tests/snapshots/expand/execution_success/regression_8261/execute__tests__expanded.snap @@ -5,7 +5,7 @@ expression: expanded_code fn main( a: bool, b: ([bool; 2], [bool; 2], str<2>, (u16, u16), u16), - c: ((Field, str<0>, bool, bool), (u16, str<2>)), + c: ((Field, bool, bool), (u16, str<2>)), ) -> pub u16 { b.4 % if c.0.2 {