Skip to content

Commit

Permalink
fix: avoid huge unrolling in hash_args (AztecProtocol/aztec-packages#…
Browse files Browse the repository at this point in the history
…5703)

After #4736 was fixed, now this
is possible :)

---------

Co-authored-by: Alvaro Rodriguez <sirasistant@MacBook-Pro-de-Alvaro.local>
  • Loading branch information
AztecBot and Alvaro Rodriguez committed Apr 12, 2024
2 parents 97fea12 + 9e7d58b commit 98cafae
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .aztec-sync-commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1eb288e9adc8b803e75ed80317c3e0979d0dfdee
10d9ad99200a5897417ff5669763ead4e38d87fa
5 changes: 4 additions & 1 deletion compiler/noirc_evaluator/src/ssa/opt/unrolling.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,10 @@ impl Loops {
if next_loop.blocks.iter().any(|block| self.modified_blocks.contains(block)) {
let mut new_context = find_all_loops(function);
new_context.failed_to_unroll = self.failed_to_unroll;
return new_context.unroll_each_loop(function);
return unroll_errors
.into_iter()
.chain(new_context.unroll_each_loop(function))
.collect();
}

// Don't try to unroll the loop again if it is known to fail
Expand Down
2 changes: 1 addition & 1 deletion tooling/noir_js_backend_barretenberg/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"lint": "NODE_NO_WARNINGS=1 eslint . --ext .ts --ignore-path ./.eslintignore --max-warnings 0"
},
"dependencies": {
"@aztec/bb.js": "0.34.0",
"@aztec/bb.js": "portal:../../../../barretenberg/ts",
"@noir-lang/types": "workspace:*",
"fflate": "^0.8.0"
},
Expand Down
13 changes: 6 additions & 7 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -221,19 +221,18 @@ __metadata:
languageName: node
linkType: hard

"@aztec/bb.js@npm:0.34.0":
version: 0.34.0
resolution: "@aztec/bb.js@npm:0.34.0"
"@aztec/bb.js@portal:../../../../barretenberg/ts::locator=%40noir-lang%2Fbackend_barretenberg%40workspace%3Atooling%2Fnoir_js_backend_barretenberg":
version: 0.0.0-use.local
resolution: "@aztec/bb.js@portal:../../../../barretenberg/ts::locator=%40noir-lang%2Fbackend_barretenberg%40workspace%3Atooling%2Fnoir_js_backend_barretenberg"
dependencies:
comlink: ^4.4.1
commander: ^10.0.1
debug: ^4.3.4
tslib: ^2.4.0
bin:
bb.js: dest/node/main.js
checksum: 9d07834d81ed19e4d6fd5c1f3b07c565648df1165c30115f020ece9660b2b8599a5ed894a2090410f14020e73dd290484b30b76c9c71e863b8390fa2b7c1b729
bb.js: ./dest/node/main.js
languageName: node
linkType: hard
linkType: soft

"@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.10.4, @babel/code-frame@npm:^7.12.11, @babel/code-frame@npm:^7.16.0, @babel/code-frame@npm:^7.22.13, @babel/code-frame@npm:^7.23.5, @babel/code-frame@npm:^7.8.3":
version: 7.23.5
Expand Down Expand Up @@ -4396,7 +4395,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "@noir-lang/backend_barretenberg@workspace:tooling/noir_js_backend_barretenberg"
dependencies:
"@aztec/bb.js": 0.34.0
"@aztec/bb.js": "portal:../../../../barretenberg/ts"
"@noir-lang/types": "workspace:*"
"@types/node": ^20.6.2
"@types/prettier": ^3
Expand Down

0 comments on commit 98cafae

Please sign in to comment.