Skip to content

feat: Add new Vec type to frontend#1103

Merged
kevaundray merged 4 commits intomasterfrom
jf/vec
Apr 6, 2023
Merged

feat: Add new Vec type to frontend#1103
kevaundray merged 4 commits intomasterfrom
jf/vec

Conversation

@jfecher
Copy link
Copy Markdown
Contributor

@jfecher jfecher commented Apr 5, 2023

Related issue(s)

Resolves #

Description

Summary of changes

Adds a Vec type to the frontend, along with three unimplemented method stubs for the new builtins vec_get, vec_push, and vec_pop. The type expects 1 generic argument as in Vec<Field>, and similar to arrays it has the restriction of not allowing nested arrays currently.

This type is currently not able to be constructed at all as no constructor is provided for the type. We should expose one once we get the internals and methods working for this type.

Dependency additions / changes

Test additions / changes

Checklist

  • I have tested the changes locally.
  • I have formatted the changes with Prettier and/or cargo fmt with default settings.
  • I have linked this PR to the issue(s) that it resolves.
  • I have reviewed the changes on GitHub, line by line.
  • I have ensured all changes are covered in the description.

Documentation needs

  • This PR requires documentation updates when merged.

Additional context

@jfecher jfecher changed the title Add new Vec type to frontend feat: Add new Vec type to frontend Apr 5, 2023
Comment thread noir_stdlib/src/collections/vec.nr
Copy link
Copy Markdown
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.

Just one comment on documenting the stdlib methods!

Comment thread noir_stdlib/src/collections/vec.nr Outdated
Co-authored-by: Tom French <15848336+TomAFrench@users.noreply.github.com>
@kevaundray kevaundray enabled auto-merge April 6, 2023 20:51
@kevaundray kevaundray added this pull request to the merge queue Apr 6, 2023
Merged via the queue into master with commit e125157 Apr 6, 2023
@kevaundray kevaundray deleted the jf/vec branch April 6, 2023 21:43
TomAFrench added a commit that referenced this pull request Apr 13, 2023
* master:
  feat(nargo)!: define preprocessed artifacts for programs/contracts (#1126)
  feat: import core logic in cli from `nargo` crate (#1142)
  chore: enforce `clippy::semicolon_if_nothing_returned` linting rule (#1139)
  chore: borrow instead of cloning witness vectors in IR gen (#1127)
  fix: compiler identifying imported functions as being part of a contract (#1112)
  feat: Add new `Vec` type to frontend (#1103)
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