Skip to content

Commit

Permalink
Merge branch 'master' into tf/pass-in-expression-width
Browse files Browse the repository at this point in the history
  • Loading branch information
kevaundray authored Jan 25, 2024
2 parents b041481 + a66e372 commit d0f68aa
Show file tree
Hide file tree
Showing 153 changed files with 9,082 additions and 606 deletions.
4 changes: 2 additions & 2 deletions .github/scripts/wasm-bindgen-install.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -eu

curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
cargo-binstall wasm-bindgen-cli --version 0.2.86 -y
# TODO call this script directly
./scripts/install_wasm-bindgen.sh
11 changes: 8 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ jobs:
outputs:
release-pr: ${{ steps.release.outputs.pr }}
tag-name: ${{ steps.release.outputs.tag_name }}
pending-release-semver: v${{ steps.release.outputs.major }}.${{steps.release.outputs.minor}}.${{steps.release.outputs.patch}}
runs-on: ubuntu-latest
steps:
- name: Run release-please
Expand Down Expand Up @@ -80,9 +79,15 @@ jobs:
- name: Install Yarn dependencies
uses: ./.github/actions/setup

- name: Query new noir version
id: noir-version
run: |
NOIR_VERSION=$(grep '^version =' ./Cargo.toml | sed -E 's/version = "([^"]+)"/v\1/')
echo "semver=$NOIR_VERSION" >> $GITHUB_OUTPUT
- name: Cut a new version
working-directory: ./docs
run: yarn docusaurus docs:version ${{ needs.release-please.outputs.pending-release-semver }}
run: yarn docusaurus docs:version ${{ steps.noir-version.outputs.semver }}

- name: Configure git
run: |
Expand All @@ -92,7 +97,7 @@ jobs:
- name: Commit new documentation version
run: |
git add .
git commit -m "chore(docs): cut new docs version for tag ${{ needs.release-please.outputs.pending-release-semver }}"
git commit -m "chore(docs): cut new docs version for tag ${{ steps.noir-version.outputs.semver }}"
git push
build-binaries:
Expand Down
6 changes: 3 additions & 3 deletions acvm-repo/brillig_vm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ impl<'a, B: BlackBoxFunctionSolver> VM<'a, B> {
self.registers.set(register_index, value);
}

pub fn get_memory(&self) -> &Vec<Value> {
pub fn get_memory(&self) -> &[Value] {
self.memory.values()
}

Expand Down Expand Up @@ -748,7 +748,7 @@ mod tests {

let opcodes = [&start[..], &loop_body[..]].concat();
let vm = brillig_execute_and_get_vm(memory, &opcodes);
vm.get_memory().clone()
vm.get_memory().to_vec()
}

let memory = brillig_write_memory(vec![Value::from(0u128); 5]);
Expand Down Expand Up @@ -904,7 +904,7 @@ mod tests {

let opcodes = [&start[..], &recursive_fn[..]].concat();
let vm = brillig_execute_and_get_vm(memory, &opcodes);
vm.get_memory().clone()
vm.get_memory().to_vec()
}

let memory = brillig_recursive_write_memory(vec![Value::from(0u128); 5]);
Expand Down
2 changes: 1 addition & 1 deletion acvm-repo/brillig_vm/src/memory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ impl Memory {
}

/// Returns the values of the memory
pub fn values(&self) -> &Vec<Value> {
pub fn values(&self) -> &[Value] {
&self.inner
}
}
2 changes: 1 addition & 1 deletion compiler/noirc_driver/src/abi_gen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ fn into_abi_params(context: &Context, params: Vec<Param>) -> Vec<AbiParameter> {
// Takes each abi parameter and shallowly maps to the expected witness range in which the
// parameter's constituent values live.
fn param_witnesses_from_abi_param(
abi_params: &Vec<AbiParameter>,
abi_params: &[AbiParameter],
input_witnesses: Vec<Witness>,
) -> BTreeMap<String, Vec<Range<Witness>>> {
let mut idx = 0_usize;
Expand Down
1 change: 0 additions & 1 deletion compiler/noirc_evaluator/src/ssa.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ pub(crate) fn optimize_into_acir(
.run_pass(Ssa::mem2reg, "After Mem2Reg:")
.run_pass(Ssa::fold_constants, "After Constant Folding:")
.run_pass(Ssa::dead_instruction_elimination, "After Dead Instruction Elimination:")
.run_pass(Ssa::bubble_up_constrains, "After Constraint Bubbling:")
.finish();

let brillig = ssa.to_brillig(print_brillig_trace);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1751,7 +1751,7 @@ fn execute_brillig(
// It may be finished, in-progress, failed, or may be waiting for results of a foreign call.
// If it's finished then we can omit the opcode and just write in the return values.
match vm_status {
VMStatus::Finished => Some((vm.get_registers().clone(), vm.get_memory().clone())),
VMStatus::Finished => Some((vm.get_registers().clone(), vm.get_memory().to_vec())),
VMStatus::InProgress => unreachable!("Brillig VM has not completed execution"),
VMStatus::Failure { .. } => {
// TODO: Return an error stating that the brillig function failed.
Expand Down
Loading

0 comments on commit d0f68aa

Please sign in to comment.