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

chore(ssa refactor): acir-gen arrays in main #1455

Merged
merged 13 commits into from
May 31, 2023
Merged

chore(ssa refactor): acir-gen arrays in main #1455

merged 13 commits into from
May 31, 2023

Conversation

joss-aztec
Copy link
Contributor

@joss-aztec joss-aztec commented May 30, 2023

Description

Summary*

Adds support for arrays found in parameters to main, and load instructions there from.

Example

fn main(xs : [Field; 2]) -> pub Field {
    xs[0] + xs[1]
}

compiles to

fn main f0 {
  b0(v0: reference):
    v3 = load v0
    v4 = add v0, Field 1
    v5 = load v4
    v6 = add v3, v5
    return v6
}

current witness index : 4
public parameters indices : []
return value indices : [3]
EXPR [ (1, _1) (1, _2) (-1, _3) 0 ]

Documentation

  • This PR requires documentation updates when merged.

    • I will submit a noir-lang/docs PR.
    • I will request for and support Dev Rel's help in documenting this PR.

Additional Context

PR Checklist*

  • I have tested the changes locally.
  • I have formatted the changes with Prettier and/or cargo fmt on default settings.

@joss-aztec joss-aztec marked this pull request as ready for review May 31, 2023 08:24
Copy link
Contributor

@kevaundray kevaundray left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR is okay for me too, and we can iterate on it in further PRs -- had a question RE the recursive method, but I think we can just refactor it if need be

@kevaundray kevaundray enabled auto-merge May 31, 2023 19:16
@kevaundray kevaundray added this pull request to the merge queue May 31, 2023
@kevaundray kevaundray disabled auto-merge May 31, 2023 19:17
@kevaundray kevaundray removed this pull request from the merge queue due to a manual request May 31, 2023
@kevaundray kevaundray added this pull request to the merge queue May 31, 2023
Merged via the queue into master with commit 7bad243 May 31, 2023
@kevaundray kevaundray deleted the joss/memory branch May 31, 2023 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants