Skip to content
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

feat: Sync from noir #10660

Merged
merged 7 commits into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .noir-sync-commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1b0dd4149d9249f0ea4fb5e2228c688e0135618f
0925a332dbaa561aad195c143079588158498dad
1 change: 1 addition & 0 deletions noir/noir-repo/acvm-repo/acvm/src/compiler/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ pub fn compile<F: AcirField>(
let mut prev_acir = acir;
let mut prev_acir_opcode_positions = initial_opcode_positions;


TomAFrench marked this conversation as resolved.
Show resolved Hide resolved
// For most test programs it would be enough to only loop `transform_internal`,
// but some of them don't stabilize unless we also repeat the backend agnostic optimizations.
let (mut acir, acir_opcode_positions) = loop {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -703,7 +703,9 @@ impl<'a> FunctionContext<'a> {
// Don't mutate the reference count if we're assigning an array literal to a Let:
// `let mut foo = [1, 2, 3];`
// we consider the array to be moved, so we should have an initial rc of just 1.
let should_inc_rc = !let_expr.expression.is_array_or_slice_literal();
//
// TODO: this exception breaks #6763
let should_inc_rc = true; // !let_expr.expression.is_array_or_slice_literal();

values = values.map(|value| {
let value = value.eval(self);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::mem::array_refcount;

fn main() {
let mut array = [0, 1, 2];
assert_refcount(array, 1);
assert_refcount(array, 2);

borrow(array, array_refcount(array));
borrow_mut(&mut array, array_refcount(array));
Expand Down
Loading