From 4aee24df9e47aa16b76303ffb19ec603cf88cfc6 Mon Sep 17 00:00:00 2001 From: Akosh Farkash Date: Thu, 21 Aug 2025 13:54:47 +0100 Subject: [PATCH 1/3] Add integration test --- .../execution_success/regression_9593/Nargo.toml | 6 ++++++ .../execution_success/regression_9593/Prover.toml | 2 ++ .../execution_success/regression_9593/src/main.nr | 11 +++++++++++ 3 files changed, 19 insertions(+) create mode 100644 test_programs/execution_success/regression_9593/Nargo.toml create mode 100644 test_programs/execution_success/regression_9593/Prover.toml create mode 100644 test_programs/execution_success/regression_9593/src/main.nr diff --git a/test_programs/execution_success/regression_9593/Nargo.toml b/test_programs/execution_success/regression_9593/Nargo.toml new file mode 100644 index 00000000000..33ea6489ccf --- /dev/null +++ b/test_programs/execution_success/regression_9593/Nargo.toml @@ -0,0 +1,6 @@ +[package] +name = "regression_9593" +type = "bin" +authors = [""] + +[dependencies] \ No newline at end of file diff --git a/test_programs/execution_success/regression_9593/Prover.toml b/test_programs/execution_success/regression_9593/Prover.toml new file mode 100644 index 00000000000..0c6d5a87753 --- /dev/null +++ b/test_programs/execution_success/regression_9593/Prover.toml @@ -0,0 +1,2 @@ +a = true +return = "Cc" diff --git a/test_programs/execution_success/regression_9593/src/main.nr b/test_programs/execution_success/regression_9593/src/main.nr new file mode 100644 index 00000000000..e89e564adb9 --- /dev/null +++ b/test_programs/execution_success/regression_9593/src/main.nr @@ -0,0 +1,11 @@ +fn main(a: bool) -> pub str<2> { + let (_, d) = { + let b: [str<2>] = if a { + &["Aa", "Bb", "Cc"] + } else { + &["Dd", "Ee"] + }; + b.pop_front() + }; + d[1] +} From c769b6e3c79e2878a9beb279d1dbc5111243c6c4 Mon Sep 17 00:00:00 2001 From: Akosh Farkash Date: Thu, 21 Aug 2025 16:25:27 +0100 Subject: [PATCH 2/3] Handle the case where the slice is an Array, not DynamicArray --- compiler/noirc_evaluator/src/acir/mod.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/compiler/noirc_evaluator/src/acir/mod.rs b/compiler/noirc_evaluator/src/acir/mod.rs index f48cd091cc2..a0bca900f87 100644 --- a/compiler/noirc_evaluator/src/acir/mod.rs +++ b/compiler/noirc_evaluator/src/acir/mod.rs @@ -1422,6 +1422,7 @@ impl<'a> Context<'a> { let new_slice_length = self.acir_context.sub_var(slice_length, one)?; let slice = self.convert_value(slice_contents, dfg); + let is_dynamic = matches!(slice, AcirValue::DynamicArray(_)); let mut new_slice = self.read_array(slice)?; @@ -1443,6 +1444,11 @@ impl<'a> Context<'a> { // It is expected that the `popped_elements_size` is the flattened size of the elements, // as the input slice should be a dynamic array which is represented by flat memory. + // However in some cases the input slice is an Array with a nested structure, + // in which case we only need to pop the items that represent a single entry. + let popped_elements_size = + if is_dynamic { popped_elements_size } else { element_size }; + new_slice = new_slice.slice(popped_elements_size..); popped_elements.push(AcirValue::Var(new_slice_length, AcirType::field())); From aed4ebdd7b1efa02767fbbc9cd2a291ec5fb7334 Mon Sep 17 00:00:00 2001 From: Akosh Farkash Date: Thu, 21 Aug 2025 16:26:17 +0100 Subject: [PATCH 3/3] Add insta --- .../execute__tests__expanded.snap | 15 ++++ ...ig_false_inliner_-9223372036854775808.snap | 72 +++++++++++++++++++ ..._tests__force_brillig_false_inliner_0.snap | 72 +++++++++++++++++++ ...lig_false_inliner_9223372036854775807.snap | 72 +++++++++++++++++++ ...lig_true_inliner_-9223372036854775808.snap | 63 ++++++++++++++++ ...__tests__force_brillig_true_inliner_0.snap | 63 ++++++++++++++++ ...llig_true_inliner_9223372036854775807.snap | 63 ++++++++++++++++ .../execute__tests__stdout.snap | 5 ++ 8 files changed, 425 insertions(+) create mode 100644 tooling/nargo_cli/tests/snapshots/execution_success/regression_9593/execute__tests__expanded.snap create mode 100644 tooling/nargo_cli/tests/snapshots/execution_success/regression_9593/execute__tests__force_brillig_false_inliner_-9223372036854775808.snap create mode 100644 tooling/nargo_cli/tests/snapshots/execution_success/regression_9593/execute__tests__force_brillig_false_inliner_0.snap create mode 100644 tooling/nargo_cli/tests/snapshots/execution_success/regression_9593/execute__tests__force_brillig_false_inliner_9223372036854775807.snap create mode 100644 tooling/nargo_cli/tests/snapshots/execution_success/regression_9593/execute__tests__force_brillig_true_inliner_-9223372036854775808.snap create mode 100644 tooling/nargo_cli/tests/snapshots/execution_success/regression_9593/execute__tests__force_brillig_true_inliner_0.snap create mode 100644 tooling/nargo_cli/tests/snapshots/execution_success/regression_9593/execute__tests__force_brillig_true_inliner_9223372036854775807.snap create mode 100644 tooling/nargo_cli/tests/snapshots/execution_success/regression_9593/execute__tests__stdout.snap diff --git a/tooling/nargo_cli/tests/snapshots/execution_success/regression_9593/execute__tests__expanded.snap b/tooling/nargo_cli/tests/snapshots/execution_success/regression_9593/execute__tests__expanded.snap new file mode 100644 index 00000000000..96ba8a08b03 --- /dev/null +++ b/tooling/nargo_cli/tests/snapshots/execution_success/regression_9593/execute__tests__expanded.snap @@ -0,0 +1,15 @@ +--- +source: tooling/nargo_cli/tests/execute.rs +expression: expanded_code +--- +fn main(a: bool) -> pub str<2> { + let (_, d): (str<2>, [str<2>]) = { + let b: [str<2>] = if a { + &["Aa", "Bb", "Cc"] + } else { + &["Dd", "Ee"] + }; + b.pop_front() + }; + d[1_u32] +} diff --git a/tooling/nargo_cli/tests/snapshots/execution_success/regression_9593/execute__tests__force_brillig_false_inliner_-9223372036854775808.snap b/tooling/nargo_cli/tests/snapshots/execution_success/regression_9593/execute__tests__force_brillig_false_inliner_-9223372036854775808.snap new file mode 100644 index 00000000000..10aaa932ddf --- /dev/null +++ b/tooling/nargo_cli/tests/snapshots/execution_success/regression_9593/execute__tests__force_brillig_false_inliner_-9223372036854775808.snap @@ -0,0 +1,72 @@ +--- +source: tooling/nargo_cli/tests/execute.rs +expression: artifact +--- +{ + "noir_version": "[noir_version]", + "hash": "[hash]", + "abi": { + "parameters": [ + { + "name": "a", + "type": { + "kind": "boolean" + }, + "visibility": "private" + } + ], + "return_type": { + "abi_type": { + "kind": "string", + "length": 2 + }, + "visibility": "public" + }, + "error_types": { + "14225679739041873922": { + "error_kind": "string", + "string": "Index out of bounds" + } + } + }, + "bytecode": [ + "func 0", + "current witness index : _14", + "private parameters indices : [_0]", + "public parameters indices : []", + "return value indices : [_1, _2]", + "BLACKBOX::RANGE [(_0, 1)] []", + "EXPR [ (-3, _0) (-1, _3) 68 ]", + "EXPR [ (-3, _0) (-1, _4) 100 ]", + "EXPR [ (-3, _0) (-1, _5) 69 ]", + "EXPR [ (-3, _0) (-1, _6) 101 ]", + "EXPR [ (67, _0) (-1, _7) 0 ]", + "EXPR [ (99, _0) (-1, _8) 0 ]", + "INIT (id: 0, len: 6, witnesses: [_3, _4, _5, _6, _7, _8])", + "EXPR [ (-1, _9) 0 ]", + "MEM (id: 0, read at: EXPR [ (1, _9) 0 ], value: EXPR [ (1, _10) 0 ]) ", + "EXPR [ (-1, _11) 1 ]", + "MEM (id: 0, read at: EXPR [ (1, _11) 0 ], value: EXPR [ (1, _12) 0 ]) ", + "BRILLIG CALL func 0: inputs: [EXPR [ (-1, _0) 4294967296 ], EXPR [ 4294967296 ]], outputs: [_13, _14]", + "BLACKBOX::RANGE [(_14, 32)] []", + "EXPR [ (-1, _0) (-4294967296, _13) (-1, _14) 4294967296 ]", + "EXPR [ (-1, _13) 0 ]", + "EXPR [ (1, _1) (-1, _7) 0 ]", + "EXPR [ (1, _2) (-1, _8) 0 ]", + "unconstrained func 0", + "[Const { destination: Direct(10), bit_size: Integer(U32), value: 2 }, Const { destination: Direct(11), bit_size: Integer(U32), value: 0 }, CalldataCopy { destination_address: Direct(0), size_address: Direct(10), offset_address: Direct(11) }, BinaryFieldOp { destination: Direct(2), op: IntegerDiv, lhs: Direct(0), rhs: Direct(1) }, BinaryFieldOp { destination: Direct(1), op: Mul, lhs: Direct(2), rhs: Direct(1) }, BinaryFieldOp { destination: Direct(1), op: Sub, lhs: Direct(0), rhs: Direct(1) }, Mov { destination: Direct(0), source: Direct(2) }, Stop { return_data: HeapVector { pointer: Direct(11), size: Direct(10) } }]" + ], + "debug_symbols": "nZHRDoIwDEX/pc972CaK+CvGkAHFLFkGmZuJIfy7pYDKg4nx5d6t3Wlu1gEarNK1tL7tbnA6D1AF65y9lq6rTbSdp+owClivZQyIVIKPPlG9CegjnHxyTsDduMSPbr3x7NEE6koB6BtyGthah9NpFG9afkdVXiywKt74/mdey8PCa5n/xWcv/rjhL3QztQ2bHwNFQQVo1h1rxrpnPbDmrEfWglXJ2WZaEa7JdrNls9EEPU5BgzWVw2U/bfL1x7rio18760L70NXYpIBTUO5R9Cc=", + "file_map": { + "50": { + "source": "fn main(a: bool) -> pub str<2> {\n let (_, d) = {\n let b: [str<2>] = if a {\n &[\"Aa\", \"Bb\", \"Cc\"]\n } else {\n &[\"Dd\", \"Ee\"]\n };\n b.pop_front()\n };\n d[1]\n}\n", + "path": "" + } + }, + "names": [ + "main" + ], + "brillig_names": [ + "directive_integer_quotient" + ] +} diff --git a/tooling/nargo_cli/tests/snapshots/execution_success/regression_9593/execute__tests__force_brillig_false_inliner_0.snap b/tooling/nargo_cli/tests/snapshots/execution_success/regression_9593/execute__tests__force_brillig_false_inliner_0.snap new file mode 100644 index 00000000000..10aaa932ddf --- /dev/null +++ b/tooling/nargo_cli/tests/snapshots/execution_success/regression_9593/execute__tests__force_brillig_false_inliner_0.snap @@ -0,0 +1,72 @@ +--- +source: tooling/nargo_cli/tests/execute.rs +expression: artifact +--- +{ + "noir_version": "[noir_version]", + "hash": "[hash]", + "abi": { + "parameters": [ + { + "name": "a", + "type": { + "kind": "boolean" + }, + "visibility": "private" + } + ], + "return_type": { + "abi_type": { + "kind": "string", + "length": 2 + }, + "visibility": "public" + }, + "error_types": { + "14225679739041873922": { + "error_kind": "string", + "string": "Index out of bounds" + } + } + }, + "bytecode": [ + "func 0", + "current witness index : _14", + "private parameters indices : [_0]", + "public parameters indices : []", + "return value indices : [_1, _2]", + "BLACKBOX::RANGE [(_0, 1)] []", + "EXPR [ (-3, _0) (-1, _3) 68 ]", + "EXPR [ (-3, _0) (-1, _4) 100 ]", + "EXPR [ (-3, _0) (-1, _5) 69 ]", + "EXPR [ (-3, _0) (-1, _6) 101 ]", + "EXPR [ (67, _0) (-1, _7) 0 ]", + "EXPR [ (99, _0) (-1, _8) 0 ]", + "INIT (id: 0, len: 6, witnesses: [_3, _4, _5, _6, _7, _8])", + "EXPR [ (-1, _9) 0 ]", + "MEM (id: 0, read at: EXPR [ (1, _9) 0 ], value: EXPR [ (1, _10) 0 ]) ", + "EXPR [ (-1, _11) 1 ]", + "MEM (id: 0, read at: EXPR [ (1, _11) 0 ], value: EXPR [ (1, _12) 0 ]) ", + "BRILLIG CALL func 0: inputs: [EXPR [ (-1, _0) 4294967296 ], EXPR [ 4294967296 ]], outputs: [_13, _14]", + "BLACKBOX::RANGE [(_14, 32)] []", + "EXPR [ (-1, _0) (-4294967296, _13) (-1, _14) 4294967296 ]", + "EXPR [ (-1, _13) 0 ]", + "EXPR [ (1, _1) (-1, _7) 0 ]", + "EXPR [ (1, _2) (-1, _8) 0 ]", + "unconstrained func 0", + "[Const { destination: Direct(10), bit_size: Integer(U32), value: 2 }, Const { destination: Direct(11), bit_size: Integer(U32), value: 0 }, CalldataCopy { destination_address: Direct(0), size_address: Direct(10), offset_address: Direct(11) }, BinaryFieldOp { destination: Direct(2), op: IntegerDiv, lhs: Direct(0), rhs: Direct(1) }, BinaryFieldOp { destination: Direct(1), op: Mul, lhs: Direct(2), rhs: Direct(1) }, BinaryFieldOp { destination: Direct(1), op: Sub, lhs: Direct(0), rhs: Direct(1) }, Mov { destination: Direct(0), source: Direct(2) }, Stop { return_data: HeapVector { pointer: Direct(11), size: Direct(10) } }]" + ], + "debug_symbols": "nZHRDoIwDEX/pc972CaK+CvGkAHFLFkGmZuJIfy7pYDKg4nx5d6t3Wlu1gEarNK1tL7tbnA6D1AF65y9lq6rTbSdp+owClivZQyIVIKPPlG9CegjnHxyTsDduMSPbr3x7NEE6koB6BtyGthah9NpFG9afkdVXiywKt74/mdey8PCa5n/xWcv/rjhL3QztQ2bHwNFQQVo1h1rxrpnPbDmrEfWglXJ2WZaEa7JdrNls9EEPU5BgzWVw2U/bfL1x7rio18760L70NXYpIBTUO5R9Cc=", + "file_map": { + "50": { + "source": "fn main(a: bool) -> pub str<2> {\n let (_, d) = {\n let b: [str<2>] = if a {\n &[\"Aa\", \"Bb\", \"Cc\"]\n } else {\n &[\"Dd\", \"Ee\"]\n };\n b.pop_front()\n };\n d[1]\n}\n", + "path": "" + } + }, + "names": [ + "main" + ], + "brillig_names": [ + "directive_integer_quotient" + ] +} diff --git a/tooling/nargo_cli/tests/snapshots/execution_success/regression_9593/execute__tests__force_brillig_false_inliner_9223372036854775807.snap b/tooling/nargo_cli/tests/snapshots/execution_success/regression_9593/execute__tests__force_brillig_false_inliner_9223372036854775807.snap new file mode 100644 index 00000000000..10aaa932ddf --- /dev/null +++ b/tooling/nargo_cli/tests/snapshots/execution_success/regression_9593/execute__tests__force_brillig_false_inliner_9223372036854775807.snap @@ -0,0 +1,72 @@ +--- +source: tooling/nargo_cli/tests/execute.rs +expression: artifact +--- +{ + "noir_version": "[noir_version]", + "hash": "[hash]", + "abi": { + "parameters": [ + { + "name": "a", + "type": { + "kind": "boolean" + }, + "visibility": "private" + } + ], + "return_type": { + "abi_type": { + "kind": "string", + "length": 2 + }, + "visibility": "public" + }, + "error_types": { + "14225679739041873922": { + "error_kind": "string", + "string": "Index out of bounds" + } + } + }, + "bytecode": [ + "func 0", + "current witness index : _14", + "private parameters indices : [_0]", + "public parameters indices : []", + "return value indices : [_1, _2]", + "BLACKBOX::RANGE [(_0, 1)] []", + "EXPR [ (-3, _0) (-1, _3) 68 ]", + "EXPR [ (-3, _0) (-1, _4) 100 ]", + "EXPR [ (-3, _0) (-1, _5) 69 ]", + "EXPR [ (-3, _0) (-1, _6) 101 ]", + "EXPR [ (67, _0) (-1, _7) 0 ]", + "EXPR [ (99, _0) (-1, _8) 0 ]", + "INIT (id: 0, len: 6, witnesses: [_3, _4, _5, _6, _7, _8])", + "EXPR [ (-1, _9) 0 ]", + "MEM (id: 0, read at: EXPR [ (1, _9) 0 ], value: EXPR [ (1, _10) 0 ]) ", + "EXPR [ (-1, _11) 1 ]", + "MEM (id: 0, read at: EXPR [ (1, _11) 0 ], value: EXPR [ (1, _12) 0 ]) ", + "BRILLIG CALL func 0: inputs: [EXPR [ (-1, _0) 4294967296 ], EXPR [ 4294967296 ]], outputs: [_13, _14]", + "BLACKBOX::RANGE [(_14, 32)] []", + "EXPR [ (-1, _0) (-4294967296, _13) (-1, _14) 4294967296 ]", + "EXPR [ (-1, _13) 0 ]", + "EXPR [ (1, _1) (-1, _7) 0 ]", + "EXPR [ (1, _2) (-1, _8) 0 ]", + "unconstrained func 0", + "[Const { destination: Direct(10), bit_size: Integer(U32), value: 2 }, Const { destination: Direct(11), bit_size: Integer(U32), value: 0 }, CalldataCopy { destination_address: Direct(0), size_address: Direct(10), offset_address: Direct(11) }, BinaryFieldOp { destination: Direct(2), op: IntegerDiv, lhs: Direct(0), rhs: Direct(1) }, BinaryFieldOp { destination: Direct(1), op: Mul, lhs: Direct(2), rhs: Direct(1) }, BinaryFieldOp { destination: Direct(1), op: Sub, lhs: Direct(0), rhs: Direct(1) }, Mov { destination: Direct(0), source: Direct(2) }, Stop { return_data: HeapVector { pointer: Direct(11), size: Direct(10) } }]" + ], + "debug_symbols": "nZHRDoIwDEX/pc972CaK+CvGkAHFLFkGmZuJIfy7pYDKg4nx5d6t3Wlu1gEarNK1tL7tbnA6D1AF65y9lq6rTbSdp+owClivZQyIVIKPPlG9CegjnHxyTsDduMSPbr3x7NEE6koB6BtyGthah9NpFG9afkdVXiywKt74/mdey8PCa5n/xWcv/rjhL3QztQ2bHwNFQQVo1h1rxrpnPbDmrEfWglXJ2WZaEa7JdrNls9EEPU5BgzWVw2U/bfL1x7rio18760L70NXYpIBTUO5R9Cc=", + "file_map": { + "50": { + "source": "fn main(a: bool) -> pub str<2> {\n let (_, d) = {\n let b: [str<2>] = if a {\n &[\"Aa\", \"Bb\", \"Cc\"]\n } else {\n &[\"Dd\", \"Ee\"]\n };\n b.pop_front()\n };\n d[1]\n}\n", + "path": "" + } + }, + "names": [ + "main" + ], + "brillig_names": [ + "directive_integer_quotient" + ] +} diff --git a/tooling/nargo_cli/tests/snapshots/execution_success/regression_9593/execute__tests__force_brillig_true_inliner_-9223372036854775808.snap b/tooling/nargo_cli/tests/snapshots/execution_success/regression_9593/execute__tests__force_brillig_true_inliner_-9223372036854775808.snap new file mode 100644 index 00000000000..ee27fa8b0b6 --- /dev/null +++ b/tooling/nargo_cli/tests/snapshots/execution_success/regression_9593/execute__tests__force_brillig_true_inliner_-9223372036854775808.snap @@ -0,0 +1,63 @@ +--- +source: tooling/nargo_cli/tests/execute.rs +expression: artifact +--- +{ + "noir_version": "[noir_version]", + "hash": "[hash]", + "abi": { + "parameters": [ + { + "name": "a", + "type": { + "kind": "boolean" + }, + "visibility": "private" + } + ], + "return_type": { + "abi_type": { + "kind": "string", + "length": 2 + }, + "visibility": "public" + }, + "error_types": { + "12049594436772143978": { + "error_kind": "string", + "string": "array ref-count underflow detected" + }, + "14225679739041873922": { + "error_kind": "string", + "string": "Index out of bounds" + }, + "17843811134343075018": { + "error_kind": "string", + "string": "Stack too deep" + } + } + }, + "bytecode": [ + "func 0", + "current witness index : _2", + "private parameters indices : [_0]", + "public parameters indices : []", + "return value indices : [_1, _2]", + "BRILLIG CALL func 0: inputs: [EXPR [ (1, _0) 0 ]], outputs: [[_1, _2]]", + "unconstrained func 0", + "[Const { destination: Direct(2), bit_size: Integer(U32), value: 1 }, Const { destination: Direct(1), bit_size: Integer(U32), value: 32839 }, Const { destination: Direct(0), bit_size: Integer(U32), value: 3 }, Const { destination: Relative(2), bit_size: Integer(U32), value: 1 }, Const { destination: Relative(3), bit_size: Integer(U32), value: 0 }, CalldataCopy { destination_address: Direct(32836), size_address: Relative(2), offset_address: Relative(3) }, Cast { destination: Direct(32836), source: Direct(32836), bit_size: Integer(U1) }, Mov { destination: Relative(1), source: Direct(32836) }, Call { location: 20 }, Call { location: 21 }, BinaryIntOp { destination: Relative(2), op: Add, bit_size: U32, lhs: Relative(1), rhs: Direct(2) }, Const { destination: Relative(3), bit_size: Integer(U32), value: 32837 }, Const { destination: Relative(4), bit_size: Integer(U32), value: 2 }, Mov { destination: Direct(32771), source: Relative(2) }, Mov { destination: Direct(32772), source: Relative(3) }, Mov { destination: Direct(32773), source: Relative(4) }, Call { location: 152 }, Const { destination: Relative(2), bit_size: Integer(U32), value: 32837 }, Const { destination: Relative(3), bit_size: Integer(U32), value: 2 }, Stop { return_data: HeapVector { pointer: Relative(2), size: Relative(3) } }, Return, Call { location: 163 }, JumpIf { condition: Relative(1), location: 66 }, Jump { location: 24 }, Const { destination: Relative(1), bit_size: Integer(U8), value: 68 }, Const { destination: Relative(4), bit_size: Integer(U8), value: 100 }, Mov { destination: Relative(5), source: Direct(1) }, Const { destination: Relative(6), bit_size: Integer(U32), value: 3 }, BinaryIntOp { destination: Direct(1), op: Add, bit_size: U32, lhs: Direct(1), rhs: Relative(6) }, IndirectConst { destination_pointer: Relative(5), bit_size: Integer(U32), value: 1 }, BinaryIntOp { destination: Relative(6), op: Add, bit_size: U32, lhs: Relative(5), rhs: Direct(2) }, Mov { destination: Relative(7), source: Relative(6) }, Store { destination_pointer: Relative(7), source: Relative(1) }, BinaryIntOp { destination: Relative(7), op: Add, bit_size: U32, lhs: Relative(7), rhs: Direct(2) }, Store { destination_pointer: Relative(7), source: Relative(4) }, Const { destination: Relative(1), bit_size: Integer(U8), value: 69 }, Const { destination: Relative(4), bit_size: Integer(U8), value: 101 }, Mov { destination: Relative(6), source: Direct(1) }, Const { destination: Relative(7), bit_size: Integer(U32), value: 3 }, BinaryIntOp { destination: Direct(1), op: Add, bit_size: U32, lhs: Direct(1), rhs: Relative(7) }, IndirectConst { destination_pointer: Relative(6), bit_size: Integer(U32), value: 1 }, BinaryIntOp { destination: Relative(7), op: Add, bit_size: U32, lhs: Relative(6), rhs: Direct(2) }, Mov { destination: Relative(8), source: Relative(7) }, Store { destination_pointer: Relative(8), source: Relative(1) }, BinaryIntOp { destination: Relative(8), op: Add, bit_size: U32, lhs: Relative(8), rhs: Direct(2) }, Store { destination_pointer: Relative(8), source: Relative(4) }, Const { destination: Relative(4), bit_size: Integer(U32), value: 2 }, Const { destination: Relative(8), bit_size: Integer(U32), value: 3 }, BinaryIntOp { destination: Relative(7), op: Add, bit_size: U32, lhs: Relative(4), rhs: Relative(8) }, Mov { destination: Relative(1), source: Direct(1) }, BinaryIntOp { destination: Direct(1), op: Add, bit_size: U32, lhs: Direct(1), rhs: Relative(7) }, IndirectConst { destination_pointer: Relative(1), bit_size: Integer(U32), value: 1 }, BinaryIntOp { destination: Relative(7), op: Add, bit_size: U32, lhs: Relative(1), rhs: Direct(2) }, Store { destination_pointer: Relative(7), source: Relative(4) }, BinaryIntOp { destination: Relative(7), op: Add, bit_size: U32, lhs: Relative(7), rhs: Direct(2) }, Store { destination_pointer: Relative(7), source: Relative(4) }, Const { destination: Relative(7), bit_size: Integer(U32), value: 3 }, BinaryIntOp { destination: Relative(4), op: Add, bit_size: U32, lhs: Relative(1), rhs: Relative(7) }, Mov { destination: Relative(7), source: Relative(4) }, Store { destination_pointer: Relative(7), source: Relative(5) }, BinaryIntOp { destination: Relative(7), op: Add, bit_size: U32, lhs: Relative(7), rhs: Direct(2) }, Store { destination_pointer: Relative(7), source: Relative(6) }, Const { destination: Relative(4), bit_size: Integer(U32), value: 2 }, Mov { destination: Relative(2), source: Relative(4) }, Mov { destination: Relative(3), source: Relative(1) }, Jump { location: 121 }, Const { destination: Relative(1), bit_size: Integer(U8), value: 65 }, Const { destination: Relative(4), bit_size: Integer(U8), value: 97 }, Mov { destination: Relative(5), source: Direct(1) }, Const { destination: Relative(6), bit_size: Integer(U32), value: 3 }, BinaryIntOp { destination: Direct(1), op: Add, bit_size: U32, lhs: Direct(1), rhs: Relative(6) }, IndirectConst { destination_pointer: Relative(5), bit_size: Integer(U32), value: 1 }, BinaryIntOp { destination: Relative(6), op: Add, bit_size: U32, lhs: Relative(5), rhs: Direct(2) }, Mov { destination: Relative(7), source: Relative(6) }, Store { destination_pointer: Relative(7), source: Relative(1) }, BinaryIntOp { destination: Relative(7), op: Add, bit_size: U32, lhs: Relative(7), rhs: Direct(2) }, Store { destination_pointer: Relative(7), source: Relative(4) }, Const { destination: Relative(1), bit_size: Integer(U8), value: 66 }, Const { destination: Relative(4), bit_size: Integer(U8), value: 98 }, Mov { destination: Relative(6), source: Direct(1) }, Const { destination: Relative(7), bit_size: Integer(U32), value: 3 }, BinaryIntOp { destination: Direct(1), op: Add, bit_size: U32, lhs: Direct(1), rhs: Relative(7) }, IndirectConst { destination_pointer: Relative(6), bit_size: Integer(U32), value: 1 }, BinaryIntOp { destination: Relative(7), op: Add, bit_size: U32, lhs: Relative(6), rhs: Direct(2) }, Mov { destination: Relative(8), source: Relative(7) }, Store { destination_pointer: Relative(8), source: Relative(1) }, BinaryIntOp { destination: Relative(8), op: Add, bit_size: U32, lhs: Relative(8), rhs: Direct(2) }, Store { destination_pointer: Relative(8), source: Relative(4) }, Const { destination: Relative(1), bit_size: Integer(U8), value: 67 }, Const { destination: Relative(4), bit_size: Integer(U8), value: 99 }, Mov { destination: Relative(7), source: Direct(1) }, Const { destination: Relative(8), bit_size: Integer(U32), value: 3 }, BinaryIntOp { destination: Direct(1), op: Add, bit_size: U32, lhs: Direct(1), rhs: Relative(8) }, IndirectConst { destination_pointer: Relative(7), bit_size: Integer(U32), value: 1 }, BinaryIntOp { destination: Relative(8), op: Add, bit_size: U32, lhs: Relative(7), rhs: Direct(2) }, Mov { destination: Relative(9), source: Relative(8) }, Store { destination_pointer: Relative(9), source: Relative(1) }, BinaryIntOp { destination: Relative(9), op: Add, bit_size: U32, lhs: Relative(9), rhs: Direct(2) }, Store { destination_pointer: Relative(9), source: Relative(4) }, Const { destination: Relative(4), bit_size: Integer(U32), value: 3 }, Const { destination: Relative(9), bit_size: Integer(U32), value: 3 }, BinaryIntOp { destination: Relative(8), op: Add, bit_size: U32, lhs: Relative(4), rhs: Relative(9) }, Mov { destination: Relative(1), source: Direct(1) }, BinaryIntOp { destination: Direct(1), op: Add, bit_size: U32, lhs: Direct(1), rhs: Relative(8) }, IndirectConst { destination_pointer: Relative(1), bit_size: Integer(U32), value: 1 }, BinaryIntOp { destination: Relative(8), op: Add, bit_size: U32, lhs: Relative(1), rhs: Direct(2) }, Store { destination_pointer: Relative(8), source: Relative(4) }, BinaryIntOp { destination: Relative(8), op: Add, bit_size: U32, lhs: Relative(8), rhs: Direct(2) }, Store { destination_pointer: Relative(8), source: Relative(4) }, Const { destination: Relative(8), bit_size: Integer(U32), value: 3 }, BinaryIntOp { destination: Relative(4), op: Add, bit_size: U32, lhs: Relative(1), rhs: Relative(8) }, Mov { destination: Relative(8), source: Relative(4) }, Store { destination_pointer: Relative(8), source: Relative(5) }, BinaryIntOp { destination: Relative(8), op: Add, bit_size: U32, lhs: Relative(8), rhs: Direct(2) }, Store { destination_pointer: Relative(8), source: Relative(6) }, BinaryIntOp { destination: Relative(8), op: Add, bit_size: U32, lhs: Relative(8), rhs: Direct(2) }, Store { destination_pointer: Relative(8), source: Relative(7) }, Const { destination: Relative(4), bit_size: Integer(U32), value: 3 }, Mov { destination: Relative(2), source: Relative(4) }, Mov { destination: Relative(3), source: Relative(1) }, Jump { location: 121 }, Const { destination: Relative(1), bit_size: Integer(U32), value: 0 }, BinaryIntOp { destination: Relative(4), op: LessThan, bit_size: U32, lhs: Relative(1), rhs: Relative(2) }, Const { destination: Relative(1), bit_size: Integer(U1), value: 1 }, JumpIf { condition: Relative(4), location: 126 }, Call { location: 169 }, BinaryIntOp { destination: Relative(4), op: Sub, bit_size: U32, lhs: Relative(2), rhs: Direct(2) }, Const { destination: Relative(8), bit_size: Integer(U32), value: 3 }, BinaryIntOp { destination: Relative(7), op: Add, bit_size: U32, lhs: Relative(3), rhs: Relative(8) }, Load { destination: Relative(5), source_pointer: Relative(7) }, Mov { destination: Direct(32771), source: Relative(2) }, Mov { destination: Direct(32772), source: Relative(3) }, Const { destination: Direct(32773), bit_size: Integer(U32), value: 1 }, Call { location: 172 }, Mov { destination: Relative(6), source: Direct(32774) }, Const { destination: Relative(2), bit_size: Integer(U32), value: 1 }, BinaryIntOp { destination: Relative(3), op: LessThan, bit_size: U32, lhs: Relative(2), rhs: Relative(4) }, JumpIf { condition: Relative(3), location: 139 }, Call { location: 169 }, Const { destination: Relative(1), bit_size: Integer(U32), value: 4 }, BinaryIntOp { destination: Relative(3), op: Add, bit_size: U32, lhs: Relative(6), rhs: Relative(1) }, Load { destination: Relative(2), source_pointer: Relative(3) }, Load { destination: Relative(1), source_pointer: Relative(2) }, Const { destination: Relative(3), bit_size: Integer(U32), value: 0 }, BinaryIntOp { destination: Relative(4), op: Equals, bit_size: U32, lhs: Relative(3), rhs: Relative(1) }, Not { destination: Relative(4), source: Relative(4), bit_size: U1 }, JumpIf { condition: Relative(4), location: 148 }, Call { location: 214 }, BinaryIntOp { destination: Relative(1), op: Add, bit_size: U32, lhs: Relative(1), rhs: Direct(2) }, Store { destination_pointer: Relative(2), source: Relative(1) }, Mov { destination: Relative(1), source: Relative(2) }, Return, 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: 162 }, 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: 155 }, 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: 168 }, IndirectConst { destination_pointer: Direct(1), bit_size: Integer(U64), value: 17843811134343075018 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Direct(2) } }, Return, IndirectConst { destination_pointer: Direct(1), bit_size: Integer(U64), value: 14225679739041873922 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Direct(2) } }, Return, Load { destination: Direct(32775), source_pointer: Direct(32772) }, BinaryIntOp { destination: Direct(32779), op: Add, bit_size: U32, lhs: Direct(32772), rhs: Direct(2) }, BinaryIntOp { destination: Direct(32776), op: Mul, bit_size: U32, lhs: Direct(32771), rhs: Direct(32773) }, BinaryIntOp { destination: Direct(32779), op: Add, bit_size: U32, lhs: Direct(32779), rhs: Direct(2) }, Load { destination: Direct(32777), source_pointer: Direct(32779) }, BinaryIntOp { destination: Direct(32778), op: Add, bit_size: U32, lhs: Direct(32779), rhs: Direct(2) }, BinaryIntOp { destination: Direct(32779), op: Sub, bit_size: U32, lhs: Direct(32776), rhs: Direct(32773) }, BinaryIntOp { destination: Direct(32780), op: Equals, bit_size: U32, lhs: Direct(32775), rhs: Direct(2) }, JumpIf { condition: Direct(32780), location: 182 }, Jump { location: 190 }, BinaryIntOp { destination: Direct(32774), op: Add, bit_size: U32, lhs: Direct(32772), rhs: Direct(32773) }, BinaryIntOp { destination: Direct(32777), op: Sub, bit_size: U32, lhs: Direct(32777), rhs: Direct(32773) }, IndirectConst { destination_pointer: Direct(32774), bit_size: Integer(U32), value: 1 }, BinaryIntOp { destination: Direct(32781), op: Add, bit_size: U32, lhs: Direct(32774), rhs: Direct(2) }, Store { destination_pointer: Direct(32781), source: Direct(32779) }, BinaryIntOp { destination: Direct(32781), op: Add, bit_size: U32, lhs: Direct(32781), rhs: Direct(2) }, Store { destination_pointer: Direct(32781), source: Direct(32777) }, Jump { location: 213 }, Const { destination: Direct(32782), bit_size: Integer(U32), value: 3 }, BinaryIntOp { destination: Direct(32781), op: Add, bit_size: U32, lhs: Direct(32779), rhs: Direct(32782) }, Mov { destination: Direct(32774), source: Direct(1) }, BinaryIntOp { destination: Direct(1), op: Add, bit_size: U32, lhs: Direct(1), rhs: Direct(32781) }, IndirectConst { destination_pointer: Direct(32774), bit_size: Integer(U32), value: 1 }, BinaryIntOp { destination: Direct(32781), op: Add, bit_size: U32, lhs: Direct(32774), rhs: Direct(2) }, Store { destination_pointer: Direct(32781), source: Direct(32779) }, BinaryIntOp { destination: Direct(32781), op: Add, bit_size: U32, lhs: Direct(32781), rhs: Direct(2) }, Store { destination_pointer: Direct(32781), source: Direct(32779) }, Const { destination: Direct(32782), bit_size: Integer(U32), value: 3 }, BinaryIntOp { destination: Direct(32781), op: Add, bit_size: U32, lhs: Direct(32774), rhs: Direct(32782) }, BinaryIntOp { destination: Direct(32782), op: Add, bit_size: U32, lhs: Direct(32778), rhs: Direct(32773) }, BinaryIntOp { destination: Direct(32784), op: Add, bit_size: U32, lhs: Direct(32782), rhs: Direct(32779) }, Mov { destination: Direct(32785), source: Direct(32782) }, Mov { destination: Direct(32786), source: Direct(32781) }, BinaryIntOp { destination: Direct(32787), op: Equals, bit_size: U32, lhs: Direct(32785), rhs: Direct(32784) }, JumpIf { condition: Direct(32787), location: 212 }, Load { destination: Direct(32783), source_pointer: Direct(32785) }, Store { destination_pointer: Direct(32786), source: Direct(32783) }, BinaryIntOp { destination: Direct(32785), op: Add, bit_size: U32, lhs: Direct(32785), rhs: Direct(2) }, BinaryIntOp { destination: Direct(32786), op: Add, bit_size: U32, lhs: Direct(32786), rhs: Direct(2) }, Jump { location: 205 }, Jump { location: 213 }, Return, IndirectConst { destination_pointer: Direct(1), bit_size: Integer(U64), value: 12049594436772143978 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Direct(2) } }, Return]" + ], + "debug_symbols": "ndLNioMwFAXgd8k6i/xotH2VIhI1lkCIkurAIL773HSOY7sYGGbTr7e35+BPNja4br23Po7Tg11vG+uSD8Hf2zD1dvFTpF83JvKHVJJdJScV1LCAJTSwgjW8fKsFRJ9Gn0afRp+mPpU1sII1pD5NFgJKqKCGBSyhgRWsYe7bd86Oe2+X5Fy+9ZeHQY9otsnFhV3jGgJnHzaszz89ZhufLjbRVnDm4kBS4eiDy992fqbF71FZXRCWlzNe/jmvhEFeiepf+eInX7/lG5ps79Pb8dhzU/K2Cw7juMb+Zbt8zsfmOF5zmno3rMnlpvOM0Ru7yVJxaVTDmclTpbiSmiYp8mg0Les80tu+KVnQ1jR7vrQv", + "file_map": { + "50": { + "source": "fn main(a: bool) -> pub str<2> {\n let (_, d) = {\n let b: [str<2>] = if a {\n &[\"Aa\", \"Bb\", \"Cc\"]\n } else {\n &[\"Dd\", \"Ee\"]\n };\n b.pop_front()\n };\n d[1]\n}\n", + "path": "" + } + }, + "names": [ + "main" + ], + "brillig_names": [ + "main" + ] +} diff --git a/tooling/nargo_cli/tests/snapshots/execution_success/regression_9593/execute__tests__force_brillig_true_inliner_0.snap b/tooling/nargo_cli/tests/snapshots/execution_success/regression_9593/execute__tests__force_brillig_true_inliner_0.snap new file mode 100644 index 00000000000..ee27fa8b0b6 --- /dev/null +++ b/tooling/nargo_cli/tests/snapshots/execution_success/regression_9593/execute__tests__force_brillig_true_inliner_0.snap @@ -0,0 +1,63 @@ +--- +source: tooling/nargo_cli/tests/execute.rs +expression: artifact +--- +{ + "noir_version": "[noir_version]", + "hash": "[hash]", + "abi": { + "parameters": [ + { + "name": "a", + "type": { + "kind": "boolean" + }, + "visibility": "private" + } + ], + "return_type": { + "abi_type": { + "kind": "string", + "length": 2 + }, + "visibility": "public" + }, + "error_types": { + "12049594436772143978": { + "error_kind": "string", + "string": "array ref-count underflow detected" + }, + "14225679739041873922": { + "error_kind": "string", + "string": "Index out of bounds" + }, + "17843811134343075018": { + "error_kind": "string", + "string": "Stack too deep" + } + } + }, + "bytecode": [ + "func 0", + "current witness index : _2", + "private parameters indices : [_0]", + "public parameters indices : []", + "return value indices : [_1, _2]", + "BRILLIG CALL func 0: inputs: [EXPR [ (1, _0) 0 ]], outputs: [[_1, _2]]", + "unconstrained func 0", + "[Const { destination: Direct(2), bit_size: Integer(U32), value: 1 }, Const { destination: Direct(1), bit_size: Integer(U32), value: 32839 }, Const { destination: Direct(0), bit_size: Integer(U32), value: 3 }, Const { destination: Relative(2), bit_size: Integer(U32), value: 1 }, Const { destination: Relative(3), bit_size: Integer(U32), value: 0 }, CalldataCopy { destination_address: Direct(32836), size_address: Relative(2), offset_address: Relative(3) }, Cast { destination: Direct(32836), source: Direct(32836), bit_size: Integer(U1) }, Mov { destination: Relative(1), source: Direct(32836) }, Call { location: 20 }, Call { location: 21 }, BinaryIntOp { destination: Relative(2), op: Add, bit_size: U32, lhs: Relative(1), rhs: Direct(2) }, Const { destination: Relative(3), bit_size: Integer(U32), value: 32837 }, Const { destination: Relative(4), bit_size: Integer(U32), value: 2 }, Mov { destination: Direct(32771), source: Relative(2) }, Mov { destination: Direct(32772), source: Relative(3) }, Mov { destination: Direct(32773), source: Relative(4) }, Call { location: 152 }, Const { destination: Relative(2), bit_size: Integer(U32), value: 32837 }, Const { destination: Relative(3), bit_size: Integer(U32), value: 2 }, Stop { return_data: HeapVector { pointer: Relative(2), size: Relative(3) } }, Return, Call { location: 163 }, JumpIf { condition: Relative(1), location: 66 }, Jump { location: 24 }, Const { destination: Relative(1), bit_size: Integer(U8), value: 68 }, Const { destination: Relative(4), bit_size: Integer(U8), value: 100 }, Mov { destination: Relative(5), source: Direct(1) }, Const { destination: Relative(6), bit_size: Integer(U32), value: 3 }, BinaryIntOp { destination: Direct(1), op: Add, bit_size: U32, lhs: Direct(1), rhs: Relative(6) }, IndirectConst { destination_pointer: Relative(5), bit_size: Integer(U32), value: 1 }, BinaryIntOp { destination: Relative(6), op: Add, bit_size: U32, lhs: Relative(5), rhs: Direct(2) }, Mov { destination: Relative(7), source: Relative(6) }, Store { destination_pointer: Relative(7), source: Relative(1) }, BinaryIntOp { destination: Relative(7), op: Add, bit_size: U32, lhs: Relative(7), rhs: Direct(2) }, Store { destination_pointer: Relative(7), source: Relative(4) }, Const { destination: Relative(1), bit_size: Integer(U8), value: 69 }, Const { destination: Relative(4), bit_size: Integer(U8), value: 101 }, Mov { destination: Relative(6), source: Direct(1) }, Const { destination: Relative(7), bit_size: Integer(U32), value: 3 }, BinaryIntOp { destination: Direct(1), op: Add, bit_size: U32, lhs: Direct(1), rhs: Relative(7) }, IndirectConst { destination_pointer: Relative(6), bit_size: Integer(U32), value: 1 }, BinaryIntOp { destination: Relative(7), op: Add, bit_size: U32, lhs: Relative(6), rhs: Direct(2) }, Mov { destination: Relative(8), source: Relative(7) }, Store { destination_pointer: Relative(8), source: Relative(1) }, BinaryIntOp { destination: Relative(8), op: Add, bit_size: U32, lhs: Relative(8), rhs: Direct(2) }, Store { destination_pointer: Relative(8), source: Relative(4) }, Const { destination: Relative(4), bit_size: Integer(U32), value: 2 }, Const { destination: Relative(8), bit_size: Integer(U32), value: 3 }, BinaryIntOp { destination: Relative(7), op: Add, bit_size: U32, lhs: Relative(4), rhs: Relative(8) }, Mov { destination: Relative(1), source: Direct(1) }, BinaryIntOp { destination: Direct(1), op: Add, bit_size: U32, lhs: Direct(1), rhs: Relative(7) }, IndirectConst { destination_pointer: Relative(1), bit_size: Integer(U32), value: 1 }, BinaryIntOp { destination: Relative(7), op: Add, bit_size: U32, lhs: Relative(1), rhs: Direct(2) }, Store { destination_pointer: Relative(7), source: Relative(4) }, BinaryIntOp { destination: Relative(7), op: Add, bit_size: U32, lhs: Relative(7), rhs: Direct(2) }, Store { destination_pointer: Relative(7), source: Relative(4) }, Const { destination: Relative(7), bit_size: Integer(U32), value: 3 }, BinaryIntOp { destination: Relative(4), op: Add, bit_size: U32, lhs: Relative(1), rhs: Relative(7) }, Mov { destination: Relative(7), source: Relative(4) }, Store { destination_pointer: Relative(7), source: Relative(5) }, BinaryIntOp { destination: Relative(7), op: Add, bit_size: U32, lhs: Relative(7), rhs: Direct(2) }, Store { destination_pointer: Relative(7), source: Relative(6) }, Const { destination: Relative(4), bit_size: Integer(U32), value: 2 }, Mov { destination: Relative(2), source: Relative(4) }, Mov { destination: Relative(3), source: Relative(1) }, Jump { location: 121 }, Const { destination: Relative(1), bit_size: Integer(U8), value: 65 }, Const { destination: Relative(4), bit_size: Integer(U8), value: 97 }, Mov { destination: Relative(5), source: Direct(1) }, Const { destination: Relative(6), bit_size: Integer(U32), value: 3 }, BinaryIntOp { destination: Direct(1), op: Add, bit_size: U32, lhs: Direct(1), rhs: Relative(6) }, IndirectConst { destination_pointer: Relative(5), bit_size: Integer(U32), value: 1 }, BinaryIntOp { destination: Relative(6), op: Add, bit_size: U32, lhs: Relative(5), rhs: Direct(2) }, Mov { destination: Relative(7), source: Relative(6) }, Store { destination_pointer: Relative(7), source: Relative(1) }, BinaryIntOp { destination: Relative(7), op: Add, bit_size: U32, lhs: Relative(7), rhs: Direct(2) }, Store { destination_pointer: Relative(7), source: Relative(4) }, Const { destination: Relative(1), bit_size: Integer(U8), value: 66 }, Const { destination: Relative(4), bit_size: Integer(U8), value: 98 }, Mov { destination: Relative(6), source: Direct(1) }, Const { destination: Relative(7), bit_size: Integer(U32), value: 3 }, BinaryIntOp { destination: Direct(1), op: Add, bit_size: U32, lhs: Direct(1), rhs: Relative(7) }, IndirectConst { destination_pointer: Relative(6), bit_size: Integer(U32), value: 1 }, BinaryIntOp { destination: Relative(7), op: Add, bit_size: U32, lhs: Relative(6), rhs: Direct(2) }, Mov { destination: Relative(8), source: Relative(7) }, Store { destination_pointer: Relative(8), source: Relative(1) }, BinaryIntOp { destination: Relative(8), op: Add, bit_size: U32, lhs: Relative(8), rhs: Direct(2) }, Store { destination_pointer: Relative(8), source: Relative(4) }, Const { destination: Relative(1), bit_size: Integer(U8), value: 67 }, Const { destination: Relative(4), bit_size: Integer(U8), value: 99 }, Mov { destination: Relative(7), source: Direct(1) }, Const { destination: Relative(8), bit_size: Integer(U32), value: 3 }, BinaryIntOp { destination: Direct(1), op: Add, bit_size: U32, lhs: Direct(1), rhs: Relative(8) }, IndirectConst { destination_pointer: Relative(7), bit_size: Integer(U32), value: 1 }, BinaryIntOp { destination: Relative(8), op: Add, bit_size: U32, lhs: Relative(7), rhs: Direct(2) }, Mov { destination: Relative(9), source: Relative(8) }, Store { destination_pointer: Relative(9), source: Relative(1) }, BinaryIntOp { destination: Relative(9), op: Add, bit_size: U32, lhs: Relative(9), rhs: Direct(2) }, Store { destination_pointer: Relative(9), source: Relative(4) }, Const { destination: Relative(4), bit_size: Integer(U32), value: 3 }, Const { destination: Relative(9), bit_size: Integer(U32), value: 3 }, BinaryIntOp { destination: Relative(8), op: Add, bit_size: U32, lhs: Relative(4), rhs: Relative(9) }, Mov { destination: Relative(1), source: Direct(1) }, BinaryIntOp { destination: Direct(1), op: Add, bit_size: U32, lhs: Direct(1), rhs: Relative(8) }, IndirectConst { destination_pointer: Relative(1), bit_size: Integer(U32), value: 1 }, BinaryIntOp { destination: Relative(8), op: Add, bit_size: U32, lhs: Relative(1), rhs: Direct(2) }, Store { destination_pointer: Relative(8), source: Relative(4) }, BinaryIntOp { destination: Relative(8), op: Add, bit_size: U32, lhs: Relative(8), rhs: Direct(2) }, Store { destination_pointer: Relative(8), source: Relative(4) }, Const { destination: Relative(8), bit_size: Integer(U32), value: 3 }, BinaryIntOp { destination: Relative(4), op: Add, bit_size: U32, lhs: Relative(1), rhs: Relative(8) }, Mov { destination: Relative(8), source: Relative(4) }, Store { destination_pointer: Relative(8), source: Relative(5) }, BinaryIntOp { destination: Relative(8), op: Add, bit_size: U32, lhs: Relative(8), rhs: Direct(2) }, Store { destination_pointer: Relative(8), source: Relative(6) }, BinaryIntOp { destination: Relative(8), op: Add, bit_size: U32, lhs: Relative(8), rhs: Direct(2) }, Store { destination_pointer: Relative(8), source: Relative(7) }, Const { destination: Relative(4), bit_size: Integer(U32), value: 3 }, Mov { destination: Relative(2), source: Relative(4) }, Mov { destination: Relative(3), source: Relative(1) }, Jump { location: 121 }, Const { destination: Relative(1), bit_size: Integer(U32), value: 0 }, BinaryIntOp { destination: Relative(4), op: LessThan, bit_size: U32, lhs: Relative(1), rhs: Relative(2) }, Const { destination: Relative(1), bit_size: Integer(U1), value: 1 }, JumpIf { condition: Relative(4), location: 126 }, Call { location: 169 }, BinaryIntOp { destination: Relative(4), op: Sub, bit_size: U32, lhs: Relative(2), rhs: Direct(2) }, Const { destination: Relative(8), bit_size: Integer(U32), value: 3 }, BinaryIntOp { destination: Relative(7), op: Add, bit_size: U32, lhs: Relative(3), rhs: Relative(8) }, Load { destination: Relative(5), source_pointer: Relative(7) }, Mov { destination: Direct(32771), source: Relative(2) }, Mov { destination: Direct(32772), source: Relative(3) }, Const { destination: Direct(32773), bit_size: Integer(U32), value: 1 }, Call { location: 172 }, Mov { destination: Relative(6), source: Direct(32774) }, Const { destination: Relative(2), bit_size: Integer(U32), value: 1 }, BinaryIntOp { destination: Relative(3), op: LessThan, bit_size: U32, lhs: Relative(2), rhs: Relative(4) }, JumpIf { condition: Relative(3), location: 139 }, Call { location: 169 }, Const { destination: Relative(1), bit_size: Integer(U32), value: 4 }, BinaryIntOp { destination: Relative(3), op: Add, bit_size: U32, lhs: Relative(6), rhs: Relative(1) }, Load { destination: Relative(2), source_pointer: Relative(3) }, Load { destination: Relative(1), source_pointer: Relative(2) }, Const { destination: Relative(3), bit_size: Integer(U32), value: 0 }, BinaryIntOp { destination: Relative(4), op: Equals, bit_size: U32, lhs: Relative(3), rhs: Relative(1) }, Not { destination: Relative(4), source: Relative(4), bit_size: U1 }, JumpIf { condition: Relative(4), location: 148 }, Call { location: 214 }, BinaryIntOp { destination: Relative(1), op: Add, bit_size: U32, lhs: Relative(1), rhs: Direct(2) }, Store { destination_pointer: Relative(2), source: Relative(1) }, Mov { destination: Relative(1), source: Relative(2) }, Return, 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: 162 }, 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: 155 }, 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: 168 }, IndirectConst { destination_pointer: Direct(1), bit_size: Integer(U64), value: 17843811134343075018 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Direct(2) } }, Return, IndirectConst { destination_pointer: Direct(1), bit_size: Integer(U64), value: 14225679739041873922 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Direct(2) } }, Return, Load { destination: Direct(32775), source_pointer: Direct(32772) }, BinaryIntOp { destination: Direct(32779), op: Add, bit_size: U32, lhs: Direct(32772), rhs: Direct(2) }, BinaryIntOp { destination: Direct(32776), op: Mul, bit_size: U32, lhs: Direct(32771), rhs: Direct(32773) }, BinaryIntOp { destination: Direct(32779), op: Add, bit_size: U32, lhs: Direct(32779), rhs: Direct(2) }, Load { destination: Direct(32777), source_pointer: Direct(32779) }, BinaryIntOp { destination: Direct(32778), op: Add, bit_size: U32, lhs: Direct(32779), rhs: Direct(2) }, BinaryIntOp { destination: Direct(32779), op: Sub, bit_size: U32, lhs: Direct(32776), rhs: Direct(32773) }, BinaryIntOp { destination: Direct(32780), op: Equals, bit_size: U32, lhs: Direct(32775), rhs: Direct(2) }, JumpIf { condition: Direct(32780), location: 182 }, Jump { location: 190 }, BinaryIntOp { destination: Direct(32774), op: Add, bit_size: U32, lhs: Direct(32772), rhs: Direct(32773) }, BinaryIntOp { destination: Direct(32777), op: Sub, bit_size: U32, lhs: Direct(32777), rhs: Direct(32773) }, IndirectConst { destination_pointer: Direct(32774), bit_size: Integer(U32), value: 1 }, BinaryIntOp { destination: Direct(32781), op: Add, bit_size: U32, lhs: Direct(32774), rhs: Direct(2) }, Store { destination_pointer: Direct(32781), source: Direct(32779) }, BinaryIntOp { destination: Direct(32781), op: Add, bit_size: U32, lhs: Direct(32781), rhs: Direct(2) }, Store { destination_pointer: Direct(32781), source: Direct(32777) }, Jump { location: 213 }, Const { destination: Direct(32782), bit_size: Integer(U32), value: 3 }, BinaryIntOp { destination: Direct(32781), op: Add, bit_size: U32, lhs: Direct(32779), rhs: Direct(32782) }, Mov { destination: Direct(32774), source: Direct(1) }, BinaryIntOp { destination: Direct(1), op: Add, bit_size: U32, lhs: Direct(1), rhs: Direct(32781) }, IndirectConst { destination_pointer: Direct(32774), bit_size: Integer(U32), value: 1 }, BinaryIntOp { destination: Direct(32781), op: Add, bit_size: U32, lhs: Direct(32774), rhs: Direct(2) }, Store { destination_pointer: Direct(32781), source: Direct(32779) }, BinaryIntOp { destination: Direct(32781), op: Add, bit_size: U32, lhs: Direct(32781), rhs: Direct(2) }, Store { destination_pointer: Direct(32781), source: Direct(32779) }, Const { destination: Direct(32782), bit_size: Integer(U32), value: 3 }, BinaryIntOp { destination: Direct(32781), op: Add, bit_size: U32, lhs: Direct(32774), rhs: Direct(32782) }, BinaryIntOp { destination: Direct(32782), op: Add, bit_size: U32, lhs: Direct(32778), rhs: Direct(32773) }, BinaryIntOp { destination: Direct(32784), op: Add, bit_size: U32, lhs: Direct(32782), rhs: Direct(32779) }, Mov { destination: Direct(32785), source: Direct(32782) }, Mov { destination: Direct(32786), source: Direct(32781) }, BinaryIntOp { destination: Direct(32787), op: Equals, bit_size: U32, lhs: Direct(32785), rhs: Direct(32784) }, JumpIf { condition: Direct(32787), location: 212 }, Load { destination: Direct(32783), source_pointer: Direct(32785) }, Store { destination_pointer: Direct(32786), source: Direct(32783) }, BinaryIntOp { destination: Direct(32785), op: Add, bit_size: U32, lhs: Direct(32785), rhs: Direct(2) }, BinaryIntOp { destination: Direct(32786), op: Add, bit_size: U32, lhs: Direct(32786), rhs: Direct(2) }, Jump { location: 205 }, Jump { location: 213 }, Return, IndirectConst { destination_pointer: Direct(1), bit_size: Integer(U64), value: 12049594436772143978 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Direct(2) } }, Return]" + ], + "debug_symbols": "ndLNioMwFAXgd8k6i/xotH2VIhI1lkCIkurAIL773HSOY7sYGGbTr7e35+BPNja4br23Po7Tg11vG+uSD8Hf2zD1dvFTpF83JvKHVJJdJScV1LCAJTSwgjW8fKsFRJ9Gn0afRp+mPpU1sII1pD5NFgJKqKCGBSyhgRWsYe7bd86Oe2+X5Fy+9ZeHQY9otsnFhV3jGgJnHzaszz89ZhufLjbRVnDm4kBS4eiDy992fqbF71FZXRCWlzNe/jmvhEFeiepf+eInX7/lG5ps79Pb8dhzU/K2Cw7juMb+Zbt8zsfmOF5zmno3rMnlpvOM0Ru7yVJxaVTDmclTpbiSmiYp8mg0Les80tu+KVnQ1jR7vrQv", + "file_map": { + "50": { + "source": "fn main(a: bool) -> pub str<2> {\n let (_, d) = {\n let b: [str<2>] = if a {\n &[\"Aa\", \"Bb\", \"Cc\"]\n } else {\n &[\"Dd\", \"Ee\"]\n };\n b.pop_front()\n };\n d[1]\n}\n", + "path": "" + } + }, + "names": [ + "main" + ], + "brillig_names": [ + "main" + ] +} diff --git a/tooling/nargo_cli/tests/snapshots/execution_success/regression_9593/execute__tests__force_brillig_true_inliner_9223372036854775807.snap b/tooling/nargo_cli/tests/snapshots/execution_success/regression_9593/execute__tests__force_brillig_true_inliner_9223372036854775807.snap new file mode 100644 index 00000000000..ee27fa8b0b6 --- /dev/null +++ b/tooling/nargo_cli/tests/snapshots/execution_success/regression_9593/execute__tests__force_brillig_true_inliner_9223372036854775807.snap @@ -0,0 +1,63 @@ +--- +source: tooling/nargo_cli/tests/execute.rs +expression: artifact +--- +{ + "noir_version": "[noir_version]", + "hash": "[hash]", + "abi": { + "parameters": [ + { + "name": "a", + "type": { + "kind": "boolean" + }, + "visibility": "private" + } + ], + "return_type": { + "abi_type": { + "kind": "string", + "length": 2 + }, + "visibility": "public" + }, + "error_types": { + "12049594436772143978": { + "error_kind": "string", + "string": "array ref-count underflow detected" + }, + "14225679739041873922": { + "error_kind": "string", + "string": "Index out of bounds" + }, + "17843811134343075018": { + "error_kind": "string", + "string": "Stack too deep" + } + } + }, + "bytecode": [ + "func 0", + "current witness index : _2", + "private parameters indices : [_0]", + "public parameters indices : []", + "return value indices : [_1, _2]", + "BRILLIG CALL func 0: inputs: [EXPR [ (1, _0) 0 ]], outputs: [[_1, _2]]", + "unconstrained func 0", + "[Const { destination: Direct(2), bit_size: Integer(U32), value: 1 }, Const { destination: Direct(1), bit_size: Integer(U32), value: 32839 }, Const { destination: Direct(0), bit_size: Integer(U32), value: 3 }, Const { destination: Relative(2), bit_size: Integer(U32), value: 1 }, Const { destination: Relative(3), bit_size: Integer(U32), value: 0 }, CalldataCopy { destination_address: Direct(32836), size_address: Relative(2), offset_address: Relative(3) }, Cast { destination: Direct(32836), source: Direct(32836), bit_size: Integer(U1) }, Mov { destination: Relative(1), source: Direct(32836) }, Call { location: 20 }, Call { location: 21 }, BinaryIntOp { destination: Relative(2), op: Add, bit_size: U32, lhs: Relative(1), rhs: Direct(2) }, Const { destination: Relative(3), bit_size: Integer(U32), value: 32837 }, Const { destination: Relative(4), bit_size: Integer(U32), value: 2 }, Mov { destination: Direct(32771), source: Relative(2) }, Mov { destination: Direct(32772), source: Relative(3) }, Mov { destination: Direct(32773), source: Relative(4) }, Call { location: 152 }, Const { destination: Relative(2), bit_size: Integer(U32), value: 32837 }, Const { destination: Relative(3), bit_size: Integer(U32), value: 2 }, Stop { return_data: HeapVector { pointer: Relative(2), size: Relative(3) } }, Return, Call { location: 163 }, JumpIf { condition: Relative(1), location: 66 }, Jump { location: 24 }, Const { destination: Relative(1), bit_size: Integer(U8), value: 68 }, Const { destination: Relative(4), bit_size: Integer(U8), value: 100 }, Mov { destination: Relative(5), source: Direct(1) }, Const { destination: Relative(6), bit_size: Integer(U32), value: 3 }, BinaryIntOp { destination: Direct(1), op: Add, bit_size: U32, lhs: Direct(1), rhs: Relative(6) }, IndirectConst { destination_pointer: Relative(5), bit_size: Integer(U32), value: 1 }, BinaryIntOp { destination: Relative(6), op: Add, bit_size: U32, lhs: Relative(5), rhs: Direct(2) }, Mov { destination: Relative(7), source: Relative(6) }, Store { destination_pointer: Relative(7), source: Relative(1) }, BinaryIntOp { destination: Relative(7), op: Add, bit_size: U32, lhs: Relative(7), rhs: Direct(2) }, Store { destination_pointer: Relative(7), source: Relative(4) }, Const { destination: Relative(1), bit_size: Integer(U8), value: 69 }, Const { destination: Relative(4), bit_size: Integer(U8), value: 101 }, Mov { destination: Relative(6), source: Direct(1) }, Const { destination: Relative(7), bit_size: Integer(U32), value: 3 }, BinaryIntOp { destination: Direct(1), op: Add, bit_size: U32, lhs: Direct(1), rhs: Relative(7) }, IndirectConst { destination_pointer: Relative(6), bit_size: Integer(U32), value: 1 }, BinaryIntOp { destination: Relative(7), op: Add, bit_size: U32, lhs: Relative(6), rhs: Direct(2) }, Mov { destination: Relative(8), source: Relative(7) }, Store { destination_pointer: Relative(8), source: Relative(1) }, BinaryIntOp { destination: Relative(8), op: Add, bit_size: U32, lhs: Relative(8), rhs: Direct(2) }, Store { destination_pointer: Relative(8), source: Relative(4) }, Const { destination: Relative(4), bit_size: Integer(U32), value: 2 }, Const { destination: Relative(8), bit_size: Integer(U32), value: 3 }, BinaryIntOp { destination: Relative(7), op: Add, bit_size: U32, lhs: Relative(4), rhs: Relative(8) }, Mov { destination: Relative(1), source: Direct(1) }, BinaryIntOp { destination: Direct(1), op: Add, bit_size: U32, lhs: Direct(1), rhs: Relative(7) }, IndirectConst { destination_pointer: Relative(1), bit_size: Integer(U32), value: 1 }, BinaryIntOp { destination: Relative(7), op: Add, bit_size: U32, lhs: Relative(1), rhs: Direct(2) }, Store { destination_pointer: Relative(7), source: Relative(4) }, BinaryIntOp { destination: Relative(7), op: Add, bit_size: U32, lhs: Relative(7), rhs: Direct(2) }, Store { destination_pointer: Relative(7), source: Relative(4) }, Const { destination: Relative(7), bit_size: Integer(U32), value: 3 }, BinaryIntOp { destination: Relative(4), op: Add, bit_size: U32, lhs: Relative(1), rhs: Relative(7) }, Mov { destination: Relative(7), source: Relative(4) }, Store { destination_pointer: Relative(7), source: Relative(5) }, BinaryIntOp { destination: Relative(7), op: Add, bit_size: U32, lhs: Relative(7), rhs: Direct(2) }, Store { destination_pointer: Relative(7), source: Relative(6) }, Const { destination: Relative(4), bit_size: Integer(U32), value: 2 }, Mov { destination: Relative(2), source: Relative(4) }, Mov { destination: Relative(3), source: Relative(1) }, Jump { location: 121 }, Const { destination: Relative(1), bit_size: Integer(U8), value: 65 }, Const { destination: Relative(4), bit_size: Integer(U8), value: 97 }, Mov { destination: Relative(5), source: Direct(1) }, Const { destination: Relative(6), bit_size: Integer(U32), value: 3 }, BinaryIntOp { destination: Direct(1), op: Add, bit_size: U32, lhs: Direct(1), rhs: Relative(6) }, IndirectConst { destination_pointer: Relative(5), bit_size: Integer(U32), value: 1 }, BinaryIntOp { destination: Relative(6), op: Add, bit_size: U32, lhs: Relative(5), rhs: Direct(2) }, Mov { destination: Relative(7), source: Relative(6) }, Store { destination_pointer: Relative(7), source: Relative(1) }, BinaryIntOp { destination: Relative(7), op: Add, bit_size: U32, lhs: Relative(7), rhs: Direct(2) }, Store { destination_pointer: Relative(7), source: Relative(4) }, Const { destination: Relative(1), bit_size: Integer(U8), value: 66 }, Const { destination: Relative(4), bit_size: Integer(U8), value: 98 }, Mov { destination: Relative(6), source: Direct(1) }, Const { destination: Relative(7), bit_size: Integer(U32), value: 3 }, BinaryIntOp { destination: Direct(1), op: Add, bit_size: U32, lhs: Direct(1), rhs: Relative(7) }, IndirectConst { destination_pointer: Relative(6), bit_size: Integer(U32), value: 1 }, BinaryIntOp { destination: Relative(7), op: Add, bit_size: U32, lhs: Relative(6), rhs: Direct(2) }, Mov { destination: Relative(8), source: Relative(7) }, Store { destination_pointer: Relative(8), source: Relative(1) }, BinaryIntOp { destination: Relative(8), op: Add, bit_size: U32, lhs: Relative(8), rhs: Direct(2) }, Store { destination_pointer: Relative(8), source: Relative(4) }, Const { destination: Relative(1), bit_size: Integer(U8), value: 67 }, Const { destination: Relative(4), bit_size: Integer(U8), value: 99 }, Mov { destination: Relative(7), source: Direct(1) }, Const { destination: Relative(8), bit_size: Integer(U32), value: 3 }, BinaryIntOp { destination: Direct(1), op: Add, bit_size: U32, lhs: Direct(1), rhs: Relative(8) }, IndirectConst { destination_pointer: Relative(7), bit_size: Integer(U32), value: 1 }, BinaryIntOp { destination: Relative(8), op: Add, bit_size: U32, lhs: Relative(7), rhs: Direct(2) }, Mov { destination: Relative(9), source: Relative(8) }, Store { destination_pointer: Relative(9), source: Relative(1) }, BinaryIntOp { destination: Relative(9), op: Add, bit_size: U32, lhs: Relative(9), rhs: Direct(2) }, Store { destination_pointer: Relative(9), source: Relative(4) }, Const { destination: Relative(4), bit_size: Integer(U32), value: 3 }, Const { destination: Relative(9), bit_size: Integer(U32), value: 3 }, BinaryIntOp { destination: Relative(8), op: Add, bit_size: U32, lhs: Relative(4), rhs: Relative(9) }, Mov { destination: Relative(1), source: Direct(1) }, BinaryIntOp { destination: Direct(1), op: Add, bit_size: U32, lhs: Direct(1), rhs: Relative(8) }, IndirectConst { destination_pointer: Relative(1), bit_size: Integer(U32), value: 1 }, BinaryIntOp { destination: Relative(8), op: Add, bit_size: U32, lhs: Relative(1), rhs: Direct(2) }, Store { destination_pointer: Relative(8), source: Relative(4) }, BinaryIntOp { destination: Relative(8), op: Add, bit_size: U32, lhs: Relative(8), rhs: Direct(2) }, Store { destination_pointer: Relative(8), source: Relative(4) }, Const { destination: Relative(8), bit_size: Integer(U32), value: 3 }, BinaryIntOp { destination: Relative(4), op: Add, bit_size: U32, lhs: Relative(1), rhs: Relative(8) }, Mov { destination: Relative(8), source: Relative(4) }, Store { destination_pointer: Relative(8), source: Relative(5) }, BinaryIntOp { destination: Relative(8), op: Add, bit_size: U32, lhs: Relative(8), rhs: Direct(2) }, Store { destination_pointer: Relative(8), source: Relative(6) }, BinaryIntOp { destination: Relative(8), op: Add, bit_size: U32, lhs: Relative(8), rhs: Direct(2) }, Store { destination_pointer: Relative(8), source: Relative(7) }, Const { destination: Relative(4), bit_size: Integer(U32), value: 3 }, Mov { destination: Relative(2), source: Relative(4) }, Mov { destination: Relative(3), source: Relative(1) }, Jump { location: 121 }, Const { destination: Relative(1), bit_size: Integer(U32), value: 0 }, BinaryIntOp { destination: Relative(4), op: LessThan, bit_size: U32, lhs: Relative(1), rhs: Relative(2) }, Const { destination: Relative(1), bit_size: Integer(U1), value: 1 }, JumpIf { condition: Relative(4), location: 126 }, Call { location: 169 }, BinaryIntOp { destination: Relative(4), op: Sub, bit_size: U32, lhs: Relative(2), rhs: Direct(2) }, Const { destination: Relative(8), bit_size: Integer(U32), value: 3 }, BinaryIntOp { destination: Relative(7), op: Add, bit_size: U32, lhs: Relative(3), rhs: Relative(8) }, Load { destination: Relative(5), source_pointer: Relative(7) }, Mov { destination: Direct(32771), source: Relative(2) }, Mov { destination: Direct(32772), source: Relative(3) }, Const { destination: Direct(32773), bit_size: Integer(U32), value: 1 }, Call { location: 172 }, Mov { destination: Relative(6), source: Direct(32774) }, Const { destination: Relative(2), bit_size: Integer(U32), value: 1 }, BinaryIntOp { destination: Relative(3), op: LessThan, bit_size: U32, lhs: Relative(2), rhs: Relative(4) }, JumpIf { condition: Relative(3), location: 139 }, Call { location: 169 }, Const { destination: Relative(1), bit_size: Integer(U32), value: 4 }, BinaryIntOp { destination: Relative(3), op: Add, bit_size: U32, lhs: Relative(6), rhs: Relative(1) }, Load { destination: Relative(2), source_pointer: Relative(3) }, Load { destination: Relative(1), source_pointer: Relative(2) }, Const { destination: Relative(3), bit_size: Integer(U32), value: 0 }, BinaryIntOp { destination: Relative(4), op: Equals, bit_size: U32, lhs: Relative(3), rhs: Relative(1) }, Not { destination: Relative(4), source: Relative(4), bit_size: U1 }, JumpIf { condition: Relative(4), location: 148 }, Call { location: 214 }, BinaryIntOp { destination: Relative(1), op: Add, bit_size: U32, lhs: Relative(1), rhs: Direct(2) }, Store { destination_pointer: Relative(2), source: Relative(1) }, Mov { destination: Relative(1), source: Relative(2) }, Return, 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: 162 }, 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: 155 }, 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: 168 }, IndirectConst { destination_pointer: Direct(1), bit_size: Integer(U64), value: 17843811134343075018 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Direct(2) } }, Return, IndirectConst { destination_pointer: Direct(1), bit_size: Integer(U64), value: 14225679739041873922 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Direct(2) } }, Return, Load { destination: Direct(32775), source_pointer: Direct(32772) }, BinaryIntOp { destination: Direct(32779), op: Add, bit_size: U32, lhs: Direct(32772), rhs: Direct(2) }, BinaryIntOp { destination: Direct(32776), op: Mul, bit_size: U32, lhs: Direct(32771), rhs: Direct(32773) }, BinaryIntOp { destination: Direct(32779), op: Add, bit_size: U32, lhs: Direct(32779), rhs: Direct(2) }, Load { destination: Direct(32777), source_pointer: Direct(32779) }, BinaryIntOp { destination: Direct(32778), op: Add, bit_size: U32, lhs: Direct(32779), rhs: Direct(2) }, BinaryIntOp { destination: Direct(32779), op: Sub, bit_size: U32, lhs: Direct(32776), rhs: Direct(32773) }, BinaryIntOp { destination: Direct(32780), op: Equals, bit_size: U32, lhs: Direct(32775), rhs: Direct(2) }, JumpIf { condition: Direct(32780), location: 182 }, Jump { location: 190 }, BinaryIntOp { destination: Direct(32774), op: Add, bit_size: U32, lhs: Direct(32772), rhs: Direct(32773) }, BinaryIntOp { destination: Direct(32777), op: Sub, bit_size: U32, lhs: Direct(32777), rhs: Direct(32773) }, IndirectConst { destination_pointer: Direct(32774), bit_size: Integer(U32), value: 1 }, BinaryIntOp { destination: Direct(32781), op: Add, bit_size: U32, lhs: Direct(32774), rhs: Direct(2) }, Store { destination_pointer: Direct(32781), source: Direct(32779) }, BinaryIntOp { destination: Direct(32781), op: Add, bit_size: U32, lhs: Direct(32781), rhs: Direct(2) }, Store { destination_pointer: Direct(32781), source: Direct(32777) }, Jump { location: 213 }, Const { destination: Direct(32782), bit_size: Integer(U32), value: 3 }, BinaryIntOp { destination: Direct(32781), op: Add, bit_size: U32, lhs: Direct(32779), rhs: Direct(32782) }, Mov { destination: Direct(32774), source: Direct(1) }, BinaryIntOp { destination: Direct(1), op: Add, bit_size: U32, lhs: Direct(1), rhs: Direct(32781) }, IndirectConst { destination_pointer: Direct(32774), bit_size: Integer(U32), value: 1 }, BinaryIntOp { destination: Direct(32781), op: Add, bit_size: U32, lhs: Direct(32774), rhs: Direct(2) }, Store { destination_pointer: Direct(32781), source: Direct(32779) }, BinaryIntOp { destination: Direct(32781), op: Add, bit_size: U32, lhs: Direct(32781), rhs: Direct(2) }, Store { destination_pointer: Direct(32781), source: Direct(32779) }, Const { destination: Direct(32782), bit_size: Integer(U32), value: 3 }, BinaryIntOp { destination: Direct(32781), op: Add, bit_size: U32, lhs: Direct(32774), rhs: Direct(32782) }, BinaryIntOp { destination: Direct(32782), op: Add, bit_size: U32, lhs: Direct(32778), rhs: Direct(32773) }, BinaryIntOp { destination: Direct(32784), op: Add, bit_size: U32, lhs: Direct(32782), rhs: Direct(32779) }, Mov { destination: Direct(32785), source: Direct(32782) }, Mov { destination: Direct(32786), source: Direct(32781) }, BinaryIntOp { destination: Direct(32787), op: Equals, bit_size: U32, lhs: Direct(32785), rhs: Direct(32784) }, JumpIf { condition: Direct(32787), location: 212 }, Load { destination: Direct(32783), source_pointer: Direct(32785) }, Store { destination_pointer: Direct(32786), source: Direct(32783) }, BinaryIntOp { destination: Direct(32785), op: Add, bit_size: U32, lhs: Direct(32785), rhs: Direct(2) }, BinaryIntOp { destination: Direct(32786), op: Add, bit_size: U32, lhs: Direct(32786), rhs: Direct(2) }, Jump { location: 205 }, Jump { location: 213 }, Return, IndirectConst { destination_pointer: Direct(1), bit_size: Integer(U64), value: 12049594436772143978 }, Trap { revert_data: HeapVector { pointer: Direct(1), size: Direct(2) } }, Return]" + ], + "debug_symbols": "ndLNioMwFAXgd8k6i/xotH2VIhI1lkCIkurAIL773HSOY7sYGGbTr7e35+BPNja4br23Po7Tg11vG+uSD8Hf2zD1dvFTpF83JvKHVJJdJScV1LCAJTSwgjW8fKsFRJ9Gn0afRp+mPpU1sII1pD5NFgJKqKCGBSyhgRWsYe7bd86Oe2+X5Fy+9ZeHQY9otsnFhV3jGgJnHzaszz89ZhufLjbRVnDm4kBS4eiDy992fqbF71FZXRCWlzNe/jmvhEFeiepf+eInX7/lG5ps79Pb8dhzU/K2Cw7juMb+Zbt8zsfmOF5zmno3rMnlpvOM0Ru7yVJxaVTDmclTpbiSmiYp8mg0Les80tu+KVnQ1jR7vrQv", + "file_map": { + "50": { + "source": "fn main(a: bool) -> pub str<2> {\n let (_, d) = {\n let b: [str<2>] = if a {\n &[\"Aa\", \"Bb\", \"Cc\"]\n } else {\n &[\"Dd\", \"Ee\"]\n };\n b.pop_front()\n };\n d[1]\n}\n", + "path": "" + } + }, + "names": [ + "main" + ], + "brillig_names": [ + "main" + ] +} diff --git a/tooling/nargo_cli/tests/snapshots/execution_success/regression_9593/execute__tests__stdout.snap b/tooling/nargo_cli/tests/snapshots/execution_success/regression_9593/execute__tests__stdout.snap new file mode 100644 index 00000000000..9519e80d8ee --- /dev/null +++ b/tooling/nargo_cli/tests/snapshots/execution_success/regression_9593/execute__tests__stdout.snap @@ -0,0 +1,5 @@ +--- +source: tooling/nargo_cli/tests/execute.rs +expression: stdout +--- +[regression_9593] Circuit output: "Cc"