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

fix: Slice initialization #2080

Merged
merged 2 commits into from
Jul 28, 2023

Conversation

sirasistant
Copy link
Contributor

@sirasistant sirasistant commented Jul 28, 2023

Description

Problem*

After @jfecher PR #2070 now Value::Array can have Type::Slice. This PR tries to handle it appropiately.

Summary*

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.

@sirasistant sirasistant changed the title Arv/fix slice initialization fix: Slice initialization Jul 28, 2023
Copy link
Contributor

@jfecher jfecher left a comment

Choose a reason for hiding this comment

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

Thanks!

@jfecher jfecher merged commit 37aefbc into jf/merge-array-and-slice-types Jul 28, 2023
8 of 9 checks passed
@jfecher jfecher deleted the arv/fix_slice_initialization branch July 28, 2023 13:12
github-merge-queue bot pushed a commit that referenced this pull request Jul 28, 2023
* Start experiment to merge array and slice types

* Finish merger of slices and arrays

* Implement missing try_bind function

* Add missed case for NotConstant

* Fix some tests

* Fix poseidon test

* Fix evaluation of slice length

* Fix tests

* fix: Slice initialization (#2080)

* fix: Initialize Value::Array of type Slice

* test: improved brillig test after bug fix

* Add array -> slice coercion

* Update comment

* Clippy suggestion

* Use coercions in more places to match rust

---------

Co-authored-by: Álvaro Rodríguez <[email protected]>
github-merge-queue bot pushed a commit that referenced this pull request Aug 7, 2023
…2084)

* Start experiment to merge array and slice types

* Finish merger of slices and arrays

* Implement missing try_bind function

* Add missed case for NotConstant

* Fix some tests

* Fix poseidon test

* Fix evaluation of slice length

* Fix tests

* fix: Initialize Value::Array of type Slice

* test: improved brillig test after bug fix

* fix: Slice initialization (#2080)

* fix: Initialize Value::Array of type Slice

* test: improved brillig test after bug fix

* feat: nested slices

* fix: insert and remove indexes

* fix: add missing deallocation

* test: added more cases to nested slice test

* refactor: simplify array length instructions

* test: fix stale import

* refactor: reuse element_size and regen json

* Update crates/noirc_evaluator/src/brillig/brillig_gen/brillig_block.rs

---------

Co-authored-by: Jake Fecher <[email protected]>
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.

2 participants