Commit Graph

332 Commits

Author SHA1 Message Date
d0cd
edcf90580e
Fix inlining issue (#2581) 2023-09-18 09:52:52 -07:00
collin
0f2f16877b chore(leo): bump version for new release 2023-09-08 10:18:21 -07:00
evan-schott
aceb20b8d5 Merge remote-tracking branch 'origin/testnet3' into feat/hash-symbol-table 2023-09-07 11:09:02 -07:00
evan-schott
444a4214eb run all tests, add optionality for writing symbol tables to json 2023-09-06 16:02:21 -07:00
Pranav Gaddamadugu
e96475b3e2 Update AST 2023-08-30 14:05:46 -04:00
Pranav Gaddamadugu
46e9313e55 Introduce Type::Signature to the AST 2023-08-30 14:05:46 -04:00
d0cd
e180118a30
Merge pull request #2545 from AleoHQ/feat/underscore
Add support for underscores in numeric literals #2538
2023-08-28 08:17:22 -04:00
evan-schott
f4fee23758 clippy fix 2023-08-24 15:40:00 -07:00
evan-schott
439d2b29de loop unrolling compatible with underscores 2023-08-24 15:07:00 -07:00
collin
439312275a fix more warnings 2023-08-18 16:47:08 -07:00
Pranav Gaddamadugu
440cced9d8 Cleanup 2023-08-17 17:49:29 -04:00
Pranav Gaddamadugu
05d38f3777 Use NodeBuilder in Flattener 2023-08-17 17:22:56 -04:00
Pranav Gaddamadugu
637e091abb Use NodeBuilder in DCE 2023-08-17 17:22:56 -04:00
Pranav Gaddamadugu
a1b5cb1add Add NodeID to AST node constructors 2023-08-17 17:22:56 -04:00
Pranav Gaddamadugu
c2d04bf444 Introduce NodeBuilder 2023-08-17 17:22:56 -04:00
Pranav Gaddamadugu
93efccc9a7 Add NodeID to Identifier::serialize 2023-08-17 17:22:56 -04:00
d0cd
7cd6e757bf
Merge pull request #2522 from AleoHQ/design/node-id
[Design] Add `id` to AST nodes.
2023-08-17 00:26:52 -04:00
collin
11b87229f1 chore(leo): bump version for new release 2023-08-15 14:02:00 -07:00
Pranav Gaddamadugu
cbe79c0e98 Remove unused code 2023-08-09 17:38:13 -04:00
Pranav Gaddamadugu
9125c84cd1 Make StructVariableInitializer an AST node 2023-08-09 17:22:52 -04:00
Pranav Gaddamadugu
90add44907 WIP update passes 2023-08-09 15:34:39 -04:00
Pranav Gaddamadugu
a819488190 Support NodeID in parser; note that NodeID::default() is a placeholder 2023-08-09 13:09:43 -04:00
Pranav Gaddamadugu
5a1b9efd80 Add NodeID to Literal 2023-08-09 10:46:06 -04:00
Pranav Gaddamadugu
ec3aa4bd75 Update Reconstructor 2023-08-09 10:45:48 -04:00
Pranav Gaddamadugu
2f024c8346 Add id field to AST nodes 2023-08-09 10:13:59 -04:00
Pranav Gaddamadugu
6ab280a935 Add id to Node 2023-08-09 09:30:01 -04:00
collin
7714f55999 chore(leo): bump version for new release 2023-08-08 10:14:56 -07:00
collin
d336be0b7b chore(leo): bump version for new release 2023-07-24 10:51:44 -07:00
collin
6a7748e5fe chore(leo): bump version for new release 2023-07-19 18:17:31 -07:00
dependabot[bot]
0c062b5164
Bump smallvec from 1.10.0 to 1.11.0 (#2472)
Bumps [smallvec](https://github.com/servo/rust-smallvec) from 1.10.0 to 1.11.0.
- [Release notes](https://github.com/servo/rust-smallvec/releases)
- [Commits](https://github.com/servo/rust-smallvec/compare/v1.10.0...v1.11.0)

---
updated-dependencies:
- dependency-name: smallvec
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-10 15:04:24 -07:00
collin
a18899f253 chore(leo): bump version for new release 2023-07-05 21:25:34 -07:00
d0cd
d92d48e4a5
[Fix] Fix issues related to flattening. (#2439)
* Implement fix

* Regen expectations

* Update AST printing for functions

* Fix code generation when there are no output operands

* Fix flattener

* Add additional tests

* Regen expectations

* Fmt

* Regen expectations
2023-07-05 15:45:15 -07:00
Collin Chin
b690a62676
impl Mapping::contains, Mapping::remove (#2436)
* impl Mapping::contains, Mapping::remove

* regen expectations

* Update compiler/passes/src/type_checking/checker.rs

Co-authored-by: Alessandro Coglio <coglio@kestrel.edu>
Signed-off-by: Collin Chin <16715212+collinc97@users.noreply.github.com>

---------

Signed-off-by: Collin Chin <16715212+collinc97@users.noreply.github.com>
Co-authored-by: Alessandro Coglio <coglio@kestrel.edu>
2023-06-29 17:04:55 -07:00
collin
9fccf015d7 chore(leo): bump version for new release 2023-06-28 21:09:44 -07:00
d0cd
b236918df4
[Feature] Support ChaCha::rand_* (#2433)
* Add tests for ChaCha::rand*

* Add Chacha::rand* to AST, tyc, and codegen

* Add lottery example

* Regen expectations

* Add check asserting that command is only used in finalize block

* Update example and related CI
2023-06-28 21:02:50 -07:00
d0cd
c373b898c4
Merge pull request #2427 from AleoHQ/feat/group-to-coordinate
[Feature] Support `to_x_coordinate` for `group`s.
2023-06-28 11:32:57 -04:00
Pranav Gaddamadugu
8062693f3d Support method calls for group coordinates 2023-06-23 21:03:11 -04:00
Pranav Gaddamadugu
9b7a4ba456 WIP associated function syntax for group::to_*_coordinate 2023-06-23 20:22:03 -04:00
collin
80b0976276 chore(leo): bump version for new release 2023-06-23 17:19:25 -07:00
d0cd
07d26ea43f
[Feature] Casting via the as operator. (#2426)
* Revert "Revert WIP"

This reverts commit 5cce8b4a0e.

* Update tyc

* Add parse, compile, and execute tests

* Regen expectations
2023-06-23 17:09:15 -07:00
dependabot[bot]
1025bd965d
Bump itertools from 0.10.5 to 0.11.0 (#2424)
Bumps [itertools](https://github.com/rust-itertools/itertools) from 0.10.5 to 0.11.0.
- [Changelog](https://github.com/rust-itertools/itertools/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-itertools/itertools/compare/v0.10.5...v0.11.0)

---
updated-dependencies:
- dependency-name: itertools
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-23 17:07:51 -07:00
Pranav Gaddamadugu
5cce8b4a0e Revert WIP 2023-06-23 10:24:10 -04:00
Pranav Gaddamadugu
72c6dcd343 Add CastExpression to the AST 2023-06-23 00:15:59 -04:00
collin
7741f5b0c4 chore(leo): bump version for new release 2023-06-15 22:38:02 -07:00
collin
f5867a4fe4 chore(leo): bump version for new release 2023-06-15 22:26:19 -07:00
Collin Chin
e5ae160d1a
Implement new hash and commit functions (#2415)
* refactor hash -> hash_to_field

* refactor commit -> commit_to_field

* implement commit_to_address

* implement hash_to_address

* update hash and commit examples

* implement hash_to_scalar

* update tests

* implement bhp hash to integer variants

* implement bhp pedersen and poseidon integer variants

* Update compiler/passes/src/type_checking/checker.rs

Signed-off-by: Collin Chin <16715212+collinc97@users.noreply.github.com>

* Update compiler/passes/src/type_checking/checker.rs

Co-authored-by: Alessandro Coglio <coglio@kestrel.edu>
Signed-off-by: Collin Chin <16715212+collinc97@users.noreply.github.com>

* fix pedersen hash type checks

---------

Signed-off-by: Collin Chin <16715212+collinc97@users.noreply.github.com>
Co-authored-by: Alessandro Coglio <coglio@kestrel.edu>
2023-06-15 19:55:03 -07:00
Collin Chin
d83c4be330
Implement Mapping::get_or_use (#2413)
* get_or_init -> get_or_use

* use mapping get_or_use in examples

* fix codegen for Mapping::get_or_use

* fix tests for Mapping::get_or_use

* fix warnings, update snarvm rev

* bump circle rust img v1.70

* fix codegen

* update snarkvm rev and regen tests

* Update compiler/parser/src/parser/expression.rs

Co-authored-by: d0cd <pranavsaig@gmail.com>
Signed-off-by: Collin Chin <16715212+collinc97@users.noreply.github.com>

* Delete program.json

Signed-off-by: Collin Chin <16715212+collinc97@users.noreply.github.com>

* Delete program.json

Signed-off-by: Collin Chin <16715212+collinc97@users.noreply.github.com>

---------

Signed-off-by: Collin Chin <16715212+collinc97@users.noreply.github.com>
Co-authored-by: d0cd <pranavsaig@gmail.com>
2023-06-13 12:09:33 -07:00
Collin Chin
4e71f60cb4
Implement additional features to the "group" element type (#2394)
* add new hash and commit symbols

* pedersen commitment methods return fields

* use snarkvm rev a451d91, impl commit_to_group.bhp256

* implement bhp commit to group variants

* implement bhp hash_to_group variants

* implement pedersen commit_to_group and hash_to_scalar variants

* implement poseidon hash_to_group and hash_to_scalar variants

* remove hash_many symbol

* fix tests

* regen test expectations
2023-06-07 13:09:08 -07:00
collin
52dfc097c5 chore(leo): bump version for new release 2023-05-31 20:37:17 -07:00
Collin Chin
42d97d3d89
implement group::GEN Leo syntax (#2401)
* implement group::GEN Leo syntax

* revert unrelated test changes

* move new errors to bottom of file to keep previous error codes consistent
2023-05-31 16:05:56 -07:00