-
Notifications
You must be signed in to change notification settings - Fork 199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(ssa): Change array_set to not mutate slices coming from function inputs #6463
Conversation
…function as it might be shared
Changes to Brillig bytecode sizes
🧾 Summary (10% most significant diffs)
Full diff report 👇
|
Changes to circuit sizes
🧾 Summary (10% most significant diffs)
Full diff report 👇
|
This only affects brillig code, right? If so, we should probably ignore the mutability on array sets completely there - that was only ever intended for Acir. Brillig should use the ref counts on each array to determine mutability. |
Changes to number of Brillig opcodes executed
🧾 Summary (10% most significant diffs)
Full diff report 👇
|
Only brillig tests failed with this.
No I'm mixing it up with something. Ah yes, I read this on the
|
So you're saying that if Brillig ignored the |
The original intention was for Acir to only use the mutable field (and for that pass to only be for acir code), and for brillig to only use ref counts for mutation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR was discussed in scrum and it was agreed to move forwards with this and then follow up with a removal of the concept of array mutability in brillig functions in a followup PR.
@TomAFrench Making a note for later that this should be reverted then once the next PR is made. Since it prevents us from mutating arrays passed by parameters to main in acir and is extra logic that is unneeded once brillig is updated to not check the mutable flag |
…r#6488) fix: Treat all parameters as possible aliases of each other (noir-lang/noir#6477) chore: bump rust dependencies (noir-lang/noir#6482) feat: use a full `BlackBoxFunctionSolver` implementation when execution brillig during acirgen (noir-lang/noir#6481) chore(docs): Update How to Oracles (noir-lang/noir#5675) chore: Release Noir(0.38.0) (noir-lang/noir#6422) fix(ssa): Change array_set to not mutate slices coming from function inputs (noir-lang/noir#6463) chore: update example to show how to split public inputs in bash (noir-lang/noir#6472) fix: Discard optimisation that would change execution ordering or that is related to call outputs (noir-lang/noir#6461) chore: proptest for `canonicalize` on infix type expressions (noir-lang/noir#6269) fix: let formatter respect newlines between comments (noir-lang/noir#6458) fix: check infix expression is valid in program input (noir-lang/noir#6450) fix: don't crash on AsTraitPath with empty path (noir-lang/noir#6454) fix(tests): Prevent EOF error while running test programs (noir-lang/noir#6455) fix(sea): mem2reg to treat block input references as alias (noir-lang/noir#6452) chore: revamp attributes (noir-lang/noir#6424) feat!: Always Check Arithmetic Generics at Monomorphization (noir-lang/noir#6329) chore: split path and import lookups (noir-lang/noir#6430) fix(ssa): Resolve value IDs in terminator before comparing to array (noir-lang/noir#6448) fix: right shift is not a regular division (noir-lang/noir#6400)
fix: Treat all parameters as possible aliases of each other (noir-lang/noir#6477) chore: bump rust dependencies (noir-lang/noir#6482) feat: use a full `BlackBoxFunctionSolver` implementation when execution brillig during acirgen (noir-lang/noir#6481) chore(docs): Update How to Oracles (noir-lang/noir#5675) chore: Release Noir(0.38.0) (noir-lang/noir#6422) fix(ssa): Change array_set to not mutate slices coming from function inputs (noir-lang/noir#6463) chore: update example to show how to split public inputs in bash (noir-lang/noir#6472) fix: Discard optimisation that would change execution ordering or that is related to call outputs (noir-lang/noir#6461) chore: proptest for `canonicalize` on infix type expressions (noir-lang/noir#6269) fix: let formatter respect newlines between comments (noir-lang/noir#6458) fix: check infix expression is valid in program input (noir-lang/noir#6450) fix: don't crash on AsTraitPath with empty path (noir-lang/noir#6454) fix(tests): Prevent EOF error while running test programs (noir-lang/noir#6455) fix(sea): mem2reg to treat block input references as alias (noir-lang/noir#6452) chore: revamp attributes (noir-lang/noir#6424) feat!: Always Check Arithmetic Generics at Monomorphization (noir-lang/noir#6329) chore: split path and import lookups (noir-lang/noir#6430) fix(ssa): Resolve value IDs in terminator before comparing to array (noir-lang/noir#6448) fix: right shift is not a regular division (noir-lang/noir#6400)
…r#6488) fix: Treat all parameters as possible aliases of each other (noir-lang/noir#6477) chore: bump rust dependencies (noir-lang/noir#6482) feat: use a full `BlackBoxFunctionSolver` implementation when execution brillig during acirgen (noir-lang/noir#6481) chore(docs): Update How to Oracles (noir-lang/noir#5675) chore: Release Noir(0.38.0) (noir-lang/noir#6422) fix(ssa): Change array_set to not mutate slices coming from function inputs (noir-lang/noir#6463) chore: update example to show how to split public inputs in bash (noir-lang/noir#6472) fix: Discard optimisation that would change execution ordering or that is related to call outputs (noir-lang/noir#6461) chore: proptest for `canonicalize` on infix type expressions (noir-lang/noir#6269) fix: let formatter respect newlines between comments (noir-lang/noir#6458) fix: check infix expression is valid in program input (noir-lang/noir#6450) fix: don't crash on AsTraitPath with empty path (noir-lang/noir#6454) fix(tests): Prevent EOF error while running test programs (noir-lang/noir#6455) fix(sea): mem2reg to treat block input references as alias (noir-lang/noir#6452) chore: revamp attributes (noir-lang/noir#6424) feat!: Always Check Arithmetic Generics at Monomorphization (noir-lang/noir#6329) chore: split path and import lookups (noir-lang/noir#6430) fix(ssa): Resolve value IDs in terminator before comparing to array (noir-lang/noir#6448) fix: right shift is not a regular division (noir-lang/noir#6400)
fix: Treat all parameters as possible aliases of each other (noir-lang/noir#6477) chore: bump rust dependencies (noir-lang/noir#6482) feat: use a full `BlackBoxFunctionSolver` implementation when execution brillig during acirgen (noir-lang/noir#6481) chore(docs): Update How to Oracles (noir-lang/noir#5675) chore: Release Noir(0.38.0) (noir-lang/noir#6422) fix(ssa): Change array_set to not mutate slices coming from function inputs (noir-lang/noir#6463) chore: update example to show how to split public inputs in bash (noir-lang/noir#6472) fix: Discard optimisation that would change execution ordering or that is related to call outputs (noir-lang/noir#6461) chore: proptest for `canonicalize` on infix type expressions (noir-lang/noir#6269) fix: let formatter respect newlines between comments (noir-lang/noir#6458) fix: check infix expression is valid in program input (noir-lang/noir#6450) fix: don't crash on AsTraitPath with empty path (noir-lang/noir#6454) fix(tests): Prevent EOF error while running test programs (noir-lang/noir#6455) fix(sea): mem2reg to treat block input references as alias (noir-lang/noir#6452) chore: revamp attributes (noir-lang/noir#6424) feat!: Always Check Arithmetic Generics at Monomorphization (noir-lang/noir#6329) chore: split path and import lookups (noir-lang/noir#6430) fix(ssa): Resolve value IDs in terminator before comparing to array (noir-lang/noir#6448) fix: right shift is not a regular division (noir-lang/noir#6400)
…r#6488) fix: Treat all parameters as possible aliases of each other (noir-lang/noir#6477) chore: bump rust dependencies (noir-lang/noir#6482) feat: use a full `BlackBoxFunctionSolver` implementation when execution brillig during acirgen (noir-lang/noir#6481) chore(docs): Update How to Oracles (noir-lang/noir#5675) chore: Release Noir(0.38.0) (noir-lang/noir#6422) fix(ssa): Change array_set to not mutate slices coming from function inputs (noir-lang/noir#6463) chore: update example to show how to split public inputs in bash (noir-lang/noir#6472) fix: Discard optimisation that would change execution ordering or that is related to call outputs (noir-lang/noir#6461) chore: proptest for `canonicalize` on infix type expressions (noir-lang/noir#6269) fix: let formatter respect newlines between comments (noir-lang/noir#6458) fix: check infix expression is valid in program input (noir-lang/noir#6450) fix: don't crash on AsTraitPath with empty path (noir-lang/noir#6454) fix(tests): Prevent EOF error while running test programs (noir-lang/noir#6455) fix(sea): mem2reg to treat block input references as alias (noir-lang/noir#6452) chore: revamp attributes (noir-lang/noir#6424) feat!: Always Check Arithmetic Generics at Monomorphization (noir-lang/noir#6329) chore: split path and import lookups (noir-lang/noir#6430) fix(ssa): Resolve value IDs in terminator before comparing to array (noir-lang/noir#6448) fix: right shift is not a regular division (noir-lang/noir#6400)
fix: Treat all parameters as possible aliases of each other (noir-lang/noir#6477) chore: bump rust dependencies (noir-lang/noir#6482) feat: use a full `BlackBoxFunctionSolver` implementation when execution brillig during acirgen (noir-lang/noir#6481) chore(docs): Update How to Oracles (noir-lang/noir#5675) chore: Release Noir(0.38.0) (noir-lang/noir#6422) fix(ssa): Change array_set to not mutate slices coming from function inputs (noir-lang/noir#6463) chore: update example to show how to split public inputs in bash (noir-lang/noir#6472) fix: Discard optimisation that would change execution ordering or that is related to call outputs (noir-lang/noir#6461) chore: proptest for `canonicalize` on infix type expressions (noir-lang/noir#6269) fix: let formatter respect newlines between comments (noir-lang/noir#6458) fix: check infix expression is valid in program input (noir-lang/noir#6450) fix: don't crash on AsTraitPath with empty path (noir-lang/noir#6454) fix(tests): Prevent EOF error while running test programs (noir-lang/noir#6455) fix(sea): mem2reg to treat block input references as alias (noir-lang/noir#6452) chore: revamp attributes (noir-lang/noir#6424) feat!: Always Check Arithmetic Generics at Monomorphization (noir-lang/noir#6329) chore: split path and import lookups (noir-lang/noir#6430) fix(ssa): Resolve value IDs in terminator before comparing to array (noir-lang/noir#6448) fix: right shift is not a regular division (noir-lang/noir#6400)
…oir#6499) chore: move tests for arithmetic generics closer to the code (noir-lang/noir#6497) fix(docs): Fix broken links in oracles doc (noir-lang/noir#6488) fix: Treat all parameters as possible aliases of each other (noir-lang/noir#6477) chore: bump rust dependencies (noir-lang/noir#6482) feat: use a full `BlackBoxFunctionSolver` implementation when execution brillig during acirgen (noir-lang/noir#6481) chore(docs): Update How to Oracles (noir-lang/noir#5675) chore: Release Noir(0.38.0) (noir-lang/noir#6422) fix(ssa): Change array_set to not mutate slices coming from function inputs (noir-lang/noir#6463) chore: update example to show how to split public inputs in bash (noir-lang/noir#6472) fix: Discard optimisation that would change execution ordering or that is related to call outputs (noir-lang/noir#6461) chore: proptest for `canonicalize` on infix type expressions (noir-lang/noir#6269) fix: let formatter respect newlines between comments (noir-lang/noir#6458) fix: check infix expression is valid in program input (noir-lang/noir#6450) fix: don't crash on AsTraitPath with empty path (noir-lang/noir#6454) fix(tests): Prevent EOF error while running test programs (noir-lang/noir#6455) fix(sea): mem2reg to treat block input references as alias (noir-lang/noir#6452) chore: revamp attributes (noir-lang/noir#6424) feat!: Always Check Arithmetic Generics at Monomorphization (noir-lang/noir#6329) chore: split path and import lookups (noir-lang/noir#6430) fix(ssa): Resolve value IDs in terminator before comparing to array (noir-lang/noir#6448) fix: right shift is not a regular division (noir-lang/noir#6400)
chore: move tests for arithmetic generics closer to the code (noir-lang/noir#6497) fix(docs): Fix broken links in oracles doc (noir-lang/noir#6488) fix: Treat all parameters as possible aliases of each other (noir-lang/noir#6477) chore: bump rust dependencies (noir-lang/noir#6482) feat: use a full `BlackBoxFunctionSolver` implementation when execution brillig during acirgen (noir-lang/noir#6481) chore(docs): Update How to Oracles (noir-lang/noir#5675) chore: Release Noir(0.38.0) (noir-lang/noir#6422) fix(ssa): Change array_set to not mutate slices coming from function inputs (noir-lang/noir#6463) chore: update example to show how to split public inputs in bash (noir-lang/noir#6472) fix: Discard optimisation that would change execution ordering or that is related to call outputs (noir-lang/noir#6461) chore: proptest for `canonicalize` on infix type expressions (noir-lang/noir#6269) fix: let formatter respect newlines between comments (noir-lang/noir#6458) fix: check infix expression is valid in program input (noir-lang/noir#6450) fix: don't crash on AsTraitPath with empty path (noir-lang/noir#6454) fix(tests): Prevent EOF error while running test programs (noir-lang/noir#6455) fix(sea): mem2reg to treat block input references as alias (noir-lang/noir#6452) chore: revamp attributes (noir-lang/noir#6424) feat!: Always Check Arithmetic Generics at Monomorphization (noir-lang/noir#6329) chore: split path and import lookups (noir-lang/noir#6430) fix(ssa): Resolve value IDs in terminator before comparing to array (noir-lang/noir#6448) fix: right shift is not a regular division (noir-lang/noir#6400)
…st` (noir-lang/noir#6502) feat: SSA parser (noir-lang/noir#6489) chore(test): Run test matrix on test_programs (noir-lang/noir#6429) chore(ci): fix cargo deny (noir-lang/noir#6501) feat: Deduplicate instructions across blocks (noir-lang/noir#6499) chore: move tests for arithmetic generics closer to the code (noir-lang/noir#6497) fix(docs): Fix broken links in oracles doc (noir-lang/noir#6488) fix: Treat all parameters as possible aliases of each other (noir-lang/noir#6477) chore: bump rust dependencies (noir-lang/noir#6482) feat: use a full `BlackBoxFunctionSolver` implementation when execution brillig during acirgen (noir-lang/noir#6481) chore(docs): Update How to Oracles (noir-lang/noir#5675) chore: Release Noir(0.38.0) (noir-lang/noir#6422) fix(ssa): Change array_set to not mutate slices coming from function inputs (noir-lang/noir#6463) chore: update example to show how to split public inputs in bash (noir-lang/noir#6472) fix: Discard optimisation that would change execution ordering or that is related to call outputs (noir-lang/noir#6461) chore: proptest for `canonicalize` on infix type expressions (noir-lang/noir#6269) fix: let formatter respect newlines between comments (noir-lang/noir#6458) fix: check infix expression is valid in program input (noir-lang/noir#6450) fix: don't crash on AsTraitPath with empty path (noir-lang/noir#6454) fix(tests): Prevent EOF error while running test programs (noir-lang/noir#6455) fix(sea): mem2reg to treat block input references as alias (noir-lang/noir#6452) chore: revamp attributes (noir-lang/noir#6424) feat!: Always Check Arithmetic Generics at Monomorphization (noir-lang/noir#6329) chore: split path and import lookups (noir-lang/noir#6430) fix(ssa): Resolve value IDs in terminator before comparing to array (noir-lang/noir#6448) fix: right shift is not a regular division (noir-lang/noir#6400)
…ng/noir#6502) feat: SSA parser (noir-lang/noir#6489) chore(test): Run test matrix on test_programs (noir-lang/noir#6429) chore(ci): fix cargo deny (noir-lang/noir#6501) feat: Deduplicate instructions across blocks (noir-lang/noir#6499) chore: move tests for arithmetic generics closer to the code (noir-lang/noir#6497) fix(docs): Fix broken links in oracles doc (noir-lang/noir#6488) fix: Treat all parameters as possible aliases of each other (noir-lang/noir#6477) chore: bump rust dependencies (noir-lang/noir#6482) feat: use a full `BlackBoxFunctionSolver` implementation when execution brillig during acirgen (noir-lang/noir#6481) chore(docs): Update How to Oracles (noir-lang/noir#5675) chore: Release Noir(0.38.0) (noir-lang/noir#6422) fix(ssa): Change array_set to not mutate slices coming from function inputs (noir-lang/noir#6463) chore: update example to show how to split public inputs in bash (noir-lang/noir#6472) fix: Discard optimisation that would change execution ordering or that is related to call outputs (noir-lang/noir#6461) chore: proptest for `canonicalize` on infix type expressions (noir-lang/noir#6269) fix: let formatter respect newlines between comments (noir-lang/noir#6458) fix: check infix expression is valid in program input (noir-lang/noir#6450) fix: don't crash on AsTraitPath with empty path (noir-lang/noir#6454) fix(tests): Prevent EOF error while running test programs (noir-lang/noir#6455) fix(sea): mem2reg to treat block input references as alias (noir-lang/noir#6452) chore: revamp attributes (noir-lang/noir#6424) feat!: Always Check Arithmetic Generics at Monomorphization (noir-lang/noir#6329) chore: split path and import lookups (noir-lang/noir#6430) fix(ssa): Resolve value IDs in terminator before comparing to array (noir-lang/noir#6448) fix: right shift is not a regular division (noir-lang/noir#6400)
…-lang/noir#6506) fix: parse Slice type in SSa (noir-lang/noir#6507) fix: perform arithmetic simplification through `CheckedCast` (noir-lang/noir#6502) feat: SSA parser (noir-lang/noir#6489) chore(test): Run test matrix on test_programs (noir-lang/noir#6429) chore(ci): fix cargo deny (noir-lang/noir#6501) feat: Deduplicate instructions across blocks (noir-lang/noir#6499) chore: move tests for arithmetic generics closer to the code (noir-lang/noir#6497) fix(docs): Fix broken links in oracles doc (noir-lang/noir#6488) fix: Treat all parameters as possible aliases of each other (noir-lang/noir#6477) chore: bump rust dependencies (noir-lang/noir#6482) feat: use a full `BlackBoxFunctionSolver` implementation when execution brillig during acirgen (noir-lang/noir#6481) chore(docs): Update How to Oracles (noir-lang/noir#5675) chore: Release Noir(0.38.0) (noir-lang/noir#6422) fix(ssa): Change array_set to not mutate slices coming from function inputs (noir-lang/noir#6463) chore: update example to show how to split public inputs in bash (noir-lang/noir#6472) fix: Discard optimisation that would change execution ordering or that is related to call outputs (noir-lang/noir#6461) chore: proptest for `canonicalize` on infix type expressions (noir-lang/noir#6269) fix: let formatter respect newlines between comments (noir-lang/noir#6458) fix: check infix expression is valid in program input (noir-lang/noir#6450) fix: don't crash on AsTraitPath with empty path (noir-lang/noir#6454) fix(tests): Prevent EOF error while running test programs (noir-lang/noir#6455) fix(sea): mem2reg to treat block input references as alias (noir-lang/noir#6452) chore: revamp attributes (noir-lang/noir#6424) feat!: Always Check Arithmetic Generics at Monomorphization (noir-lang/noir#6329) chore: split path and import lookups (noir-lang/noir#6430) fix(ssa): Resolve value IDs in terminator before comparing to array (noir-lang/noir#6448) fix: right shift is not a regular division (noir-lang/noir#6400)
) fix: parse Slice type in SSa (noir-lang/noir#6507) fix: perform arithmetic simplification through `CheckedCast` (noir-lang/noir#6502) feat: SSA parser (noir-lang/noir#6489) chore(test): Run test matrix on test_programs (noir-lang/noir#6429) chore(ci): fix cargo deny (noir-lang/noir#6501) feat: Deduplicate instructions across blocks (noir-lang/noir#6499) chore: move tests for arithmetic generics closer to the code (noir-lang/noir#6497) fix(docs): Fix broken links in oracles doc (noir-lang/noir#6488) fix: Treat all parameters as possible aliases of each other (noir-lang/noir#6477) chore: bump rust dependencies (noir-lang/noir#6482) feat: use a full `BlackBoxFunctionSolver` implementation when execution brillig during acirgen (noir-lang/noir#6481) chore(docs): Update How to Oracles (noir-lang/noir#5675) chore: Release Noir(0.38.0) (noir-lang/noir#6422) fix(ssa): Change array_set to not mutate slices coming from function inputs (noir-lang/noir#6463) chore: update example to show how to split public inputs in bash (noir-lang/noir#6472) fix: Discard optimisation that would change execution ordering or that is related to call outputs (noir-lang/noir#6461) chore: proptest for `canonicalize` on infix type expressions (noir-lang/noir#6269) fix: let formatter respect newlines between comments (noir-lang/noir#6458) fix: check infix expression is valid in program input (noir-lang/noir#6450) fix: don't crash on AsTraitPath with empty path (noir-lang/noir#6454) fix(tests): Prevent EOF error while running test programs (noir-lang/noir#6455) fix(sea): mem2reg to treat block input references as alias (noir-lang/noir#6452) chore: revamp attributes (noir-lang/noir#6424) feat!: Always Check Arithmetic Generics at Monomorphization (noir-lang/noir#6329) chore: split path and import lookups (noir-lang/noir#6430) fix(ssa): Resolve value IDs in terminator before comparing to array (noir-lang/noir#6448) fix: right shift is not a regular division (noir-lang/noir#6400)
feat: avoid unnecessary ssa passes while loop unrolling (noir-lang/noir#6509) fix(tests): Use a file lock as well as a mutex to isolate tests cases (noir-lang/noir#6508) fix: set local_module before elaborating each trait (noir-lang/noir#6506) fix: parse Slice type in SSa (noir-lang/noir#6507) fix: perform arithmetic simplification through `CheckedCast` (noir-lang/noir#6502) feat: SSA parser (noir-lang/noir#6489) chore(test): Run test matrix on test_programs (noir-lang/noir#6429) chore(ci): fix cargo deny (noir-lang/noir#6501) feat: Deduplicate instructions across blocks (noir-lang/noir#6499) chore: move tests for arithmetic generics closer to the code (noir-lang/noir#6497) fix(docs): Fix broken links in oracles doc (noir-lang/noir#6488) fix: Treat all parameters as possible aliases of each other (noir-lang/noir#6477) chore: bump rust dependencies (noir-lang/noir#6482) feat: use a full `BlackBoxFunctionSolver` implementation when execution brillig during acirgen (noir-lang/noir#6481) chore(docs): Update How to Oracles (noir-lang/noir#5675) chore: Release Noir(0.38.0) (noir-lang/noir#6422) fix(ssa): Change array_set to not mutate slices coming from function inputs (noir-lang/noir#6463) chore: update example to show how to split public inputs in bash (noir-lang/noir#6472) fix: Discard optimisation that would change execution ordering or that is related to call outputs (noir-lang/noir#6461) chore: proptest for `canonicalize` on infix type expressions (noir-lang/noir#6269) fix: let formatter respect newlines between comments (noir-lang/noir#6458) fix: check infix expression is valid in program input (noir-lang/noir#6450) fix: don't crash on AsTraitPath with empty path (noir-lang/noir#6454) fix(tests): Prevent EOF error while running test programs (noir-lang/noir#6455) fix(sea): mem2reg to treat block input references as alias (noir-lang/noir#6452) chore: revamp attributes (noir-lang/noir#6424) feat!: Always Check Arithmetic Generics at Monomorphization (noir-lang/noir#6329) chore: split path and import lookups (noir-lang/noir#6430) fix(ssa): Resolve value IDs in terminator before comparing to array (noir-lang/noir#6448) fix: right shift is not a regular division (noir-lang/noir#6400)
feat: avoid unnecessary ssa passes while loop unrolling (noir-lang/noir#6509) fix(tests): Use a file lock as well as a mutex to isolate tests cases (noir-lang/noir#6508) fix: set local_module before elaborating each trait (noir-lang/noir#6506) fix: parse Slice type in SSa (noir-lang/noir#6507) fix: perform arithmetic simplification through `CheckedCast` (noir-lang/noir#6502) feat: SSA parser (noir-lang/noir#6489) chore(test): Run test matrix on test_programs (noir-lang/noir#6429) chore(ci): fix cargo deny (noir-lang/noir#6501) feat: Deduplicate instructions across blocks (noir-lang/noir#6499) chore: move tests for arithmetic generics closer to the code (noir-lang/noir#6497) fix(docs): Fix broken links in oracles doc (noir-lang/noir#6488) fix: Treat all parameters as possible aliases of each other (noir-lang/noir#6477) chore: bump rust dependencies (noir-lang/noir#6482) feat: use a full `BlackBoxFunctionSolver` implementation when execution brillig during acirgen (noir-lang/noir#6481) chore(docs): Update How to Oracles (noir-lang/noir#5675) chore: Release Noir(0.38.0) (noir-lang/noir#6422) fix(ssa): Change array_set to not mutate slices coming from function inputs (noir-lang/noir#6463) chore: update example to show how to split public inputs in bash (noir-lang/noir#6472) fix: Discard optimisation that would change execution ordering or that is related to call outputs (noir-lang/noir#6461) chore: proptest for `canonicalize` on infix type expressions (noir-lang/noir#6269) fix: let formatter respect newlines between comments (noir-lang/noir#6458) fix: check infix expression is valid in program input (noir-lang/noir#6450) fix: don't crash on AsTraitPath with empty path (noir-lang/noir#6454) fix(tests): Prevent EOF error while running test programs (noir-lang/noir#6455) fix(sea): mem2reg to treat block input references as alias (noir-lang/noir#6452) chore: revamp attributes (noir-lang/noir#6424) feat!: Always Check Arithmetic Generics at Monomorphization (noir-lang/noir#6329) chore: split path and import lookups (noir-lang/noir#6430) fix(ssa): Resolve value IDs in terminator before comparing to array (noir-lang/noir#6448) fix: right shift is not a regular division (noir-lang/noir#6400)
…g/noir#6449) chore(ssa): Skip array_set pass for Brillig functions (noir-lang/noir#6513) chore: Reverse ssa parser diff order (noir-lang/noir#6511) chore: Parse negatives in SSA parser (noir-lang/noir#6510) feat: avoid unnecessary ssa passes while loop unrolling (noir-lang/noir#6509) fix(tests): Use a file lock as well as a mutex to isolate tests cases (noir-lang/noir#6508) fix: set local_module before elaborating each trait (noir-lang/noir#6506) fix: parse Slice type in SSa (noir-lang/noir#6507) fix: perform arithmetic simplification through `CheckedCast` (noir-lang/noir#6502) feat: SSA parser (noir-lang/noir#6489) chore(test): Run test matrix on test_programs (noir-lang/noir#6429) chore(ci): fix cargo deny (noir-lang/noir#6501) feat: Deduplicate instructions across blocks (noir-lang/noir#6499) chore: move tests for arithmetic generics closer to the code (noir-lang/noir#6497) fix(docs): Fix broken links in oracles doc (noir-lang/noir#6488) fix: Treat all parameters as possible aliases of each other (noir-lang/noir#6477) chore: bump rust dependencies (noir-lang/noir#6482) feat: use a full `BlackBoxFunctionSolver` implementation when execution brillig during acirgen (noir-lang/noir#6481) chore(docs): Update How to Oracles (noir-lang/noir#5675) chore: Release Noir(0.38.0) (noir-lang/noir#6422) fix(ssa): Change array_set to not mutate slices coming from function inputs (noir-lang/noir#6463) chore: update example to show how to split public inputs in bash (noir-lang/noir#6472) fix: Discard optimisation that would change execution ordering or that is related to call outputs (noir-lang/noir#6461) chore: proptest for `canonicalize` on infix type expressions (noir-lang/noir#6269) fix: let formatter respect newlines between comments (noir-lang/noir#6458) fix: check infix expression is valid in program input (noir-lang/noir#6450) fix: don't crash on AsTraitPath with empty path (noir-lang/noir#6454) fix(tests): Prevent EOF error while running test programs (noir-lang/noir#6455) fix(sea): mem2reg to treat block input references as alias (noir-lang/noir#6452) chore: revamp attributes (noir-lang/noir#6424) feat!: Always Check Arithmetic Generics at Monomorphization (noir-lang/noir#6329) chore: split path and import lookups (noir-lang/noir#6430) fix(ssa): Resolve value IDs in terminator before comparing to array (noir-lang/noir#6448) fix: right shift is not a regular division (noir-lang/noir#6400)
chore(ssa): Skip array_set pass for Brillig functions (noir-lang/noir#6513) chore: Reverse ssa parser diff order (noir-lang/noir#6511) chore: Parse negatives in SSA parser (noir-lang/noir#6510) feat: avoid unnecessary ssa passes while loop unrolling (noir-lang/noir#6509) fix(tests): Use a file lock as well as a mutex to isolate tests cases (noir-lang/noir#6508) fix: set local_module before elaborating each trait (noir-lang/noir#6506) fix: parse Slice type in SSa (noir-lang/noir#6507) fix: perform arithmetic simplification through `CheckedCast` (noir-lang/noir#6502) feat: SSA parser (noir-lang/noir#6489) chore(test): Run test matrix on test_programs (noir-lang/noir#6429) chore(ci): fix cargo deny (noir-lang/noir#6501) feat: Deduplicate instructions across blocks (noir-lang/noir#6499) chore: move tests for arithmetic generics closer to the code (noir-lang/noir#6497) fix(docs): Fix broken links in oracles doc (noir-lang/noir#6488) fix: Treat all parameters as possible aliases of each other (noir-lang/noir#6477) chore: bump rust dependencies (noir-lang/noir#6482) feat: use a full `BlackBoxFunctionSolver` implementation when execution brillig during acirgen (noir-lang/noir#6481) chore(docs): Update How to Oracles (noir-lang/noir#5675) chore: Release Noir(0.38.0) (noir-lang/noir#6422) fix(ssa): Change array_set to not mutate slices coming from function inputs (noir-lang/noir#6463) chore: update example to show how to split public inputs in bash (noir-lang/noir#6472) fix: Discard optimisation that would change execution ordering or that is related to call outputs (noir-lang/noir#6461) chore: proptest for `canonicalize` on infix type expressions (noir-lang/noir#6269) fix: let formatter respect newlines between comments (noir-lang/noir#6458) fix: check infix expression is valid in program input (noir-lang/noir#6450) fix: don't crash on AsTraitPath with empty path (noir-lang/noir#6454) fix(tests): Prevent EOF error while running test programs (noir-lang/noir#6455) fix(sea): mem2reg to treat block input references as alias (noir-lang/noir#6452) chore: revamp attributes (noir-lang/noir#6424) feat!: Always Check Arithmetic Generics at Monomorphization (noir-lang/noir#6329) chore: split path and import lookups (noir-lang/noir#6430) fix(ssa): Resolve value IDs in terminator before comparing to array (noir-lang/noir#6448) fix: right shift is not a regular division (noir-lang/noir#6400)
…me intepreter (noir-lang/noir#6514) fix: disallow `#[test]` on associated functions (noir-lang/noir#6449) chore(ssa): Skip array_set pass for Brillig functions (noir-lang/noir#6513) chore: Reverse ssa parser diff order (noir-lang/noir#6511) chore: Parse negatives in SSA parser (noir-lang/noir#6510) feat: avoid unnecessary ssa passes while loop unrolling (noir-lang/noir#6509) fix(tests): Use a file lock as well as a mutex to isolate tests cases (noir-lang/noir#6508) fix: set local_module before elaborating each trait (noir-lang/noir#6506) fix: parse Slice type in SSa (noir-lang/noir#6507) fix: perform arithmetic simplification through `CheckedCast` (noir-lang/noir#6502) feat: SSA parser (noir-lang/noir#6489) chore(test): Run test matrix on test_programs (noir-lang/noir#6429) chore(ci): fix cargo deny (noir-lang/noir#6501) feat: Deduplicate instructions across blocks (noir-lang/noir#6499) chore: move tests for arithmetic generics closer to the code (noir-lang/noir#6497) fix(docs): Fix broken links in oracles doc (noir-lang/noir#6488) fix: Treat all parameters as possible aliases of each other (noir-lang/noir#6477) chore: bump rust dependencies (noir-lang/noir#6482) feat: use a full `BlackBoxFunctionSolver` implementation when execution brillig during acirgen (noir-lang/noir#6481) chore(docs): Update How to Oracles (noir-lang/noir#5675) chore: Release Noir(0.38.0) (noir-lang/noir#6422) fix(ssa): Change array_set to not mutate slices coming from function inputs (noir-lang/noir#6463) chore: update example to show how to split public inputs in bash (noir-lang/noir#6472) fix: Discard optimisation that would change execution ordering or that is related to call outputs (noir-lang/noir#6461) chore: proptest for `canonicalize` on infix type expressions (noir-lang/noir#6269) fix: let formatter respect newlines between comments (noir-lang/noir#6458) fix: check infix expression is valid in program input (noir-lang/noir#6450) fix: don't crash on AsTraitPath with empty path (noir-lang/noir#6454) fix(tests): Prevent EOF error while running test programs (noir-lang/noir#6455) fix(sea): mem2reg to treat block input references as alias (noir-lang/noir#6452) chore: revamp attributes (noir-lang/noir#6424) feat!: Always Check Arithmetic Generics at Monomorphization (noir-lang/noir#6329) chore: split path and import lookups (noir-lang/noir#6430) fix(ssa): Resolve value IDs in terminator before comparing to array (noir-lang/noir#6448) fix: right shift is not a regular division (noir-lang/noir#6400)
Description
Problem*
Resolves #6444
Summary*
#6355 changed the logic in the
array_set
SSA pass so that arrays which were loaded from references that are inputs to the block are not set with mutation, as the reference might be shared with something outside the block.In this instance what we had was a slice passed to a function like
v1: [Field]
, as opposed to the above which passed a referencev1: &mut [Field; 3]
, but the effect was similar in that the code ended up mutating the slice backingv1
, over which a refcount was even increased, instead of making a copy.The PR changes the decision so that if we are setting an item on an array that is part of the function inputs (not the block inputs), then it will not use mutation.
Additional Context
See #6444 (comment) for the SSA samples.
I have tested this with #6429 but opened the PR to
master
.Documentation*
Check one:
PR Checklist*
cargo fmt
on default settings.