Skip to content

Fix conditional with array parameter#475

Merged
guipublic merged 3 commits intomasterfrom
gd/created_array_as_param
Nov 16, 2022
Merged

Fix conditional with array parameter#475
guipublic merged 3 commits intomasterfrom
gd/created_array_as_param

Conversation

@guipublic
Copy link
Contributor

Description

Array function parameters where not properly conditioned inside an IF branch because the instructions creating the arrays are added during inlining, after the function is compiled.

Summary of changes

When the function is compiled, we indicate that array parameters are created inside the function entry block.

@guipublic guipublic requested a review from jfecher November 15, 2022 16:08
@guipublic guipublic mentioned this pull request Nov 15, 2022
Copy link
Contributor

@vezenovm vezenovm left a comment

Choose a reason for hiding this comment

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

LGTM. I also like the change for passing an entry block into the TreeBuilder thus removing the need for the dummy block ID.

@guipublic guipublic merged commit 55ed79d into master Nov 16, 2022
@guipublic guipublic deleted the gd/created_array_as_param branch November 16, 2022 10:59
TomAFrench added a commit to TomAFrench/noir that referenced this pull request Nov 16, 2022
* master:
  Fix conditional with array parameter (noir-lang#475)
  Constant evaluation of to_bits() (noir-lang#464)
  propagate error from cse (noir-lang#478)
  use return value only when witness are all solved (noir-lang#473)
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