d0cd
31592a9b02
Integrate function inlining into compiler
2023-02-10 09:30:28 -08:00
d0cd
ccae285408
Minor refactors and cleaning
2023-02-10 09:07:14 -08:00
d0cd
53cbaa5f96
Initial impl of function inling
2023-02-10 09:06:26 -08:00
d0cd
3a1f66c6dd
Introduce Replacer
2023-02-10 09:05:58 -08:00
d0cd
335fb6efcb
Update doc to reflect function inlining occuring after flattening
2023-02-09 20:26:59 -08:00
d0cd
f7267b3daa
Cleanup
2023-02-09 19:36:14 -08:00
d0cd
c934bb35b3
WIP function inlining
2023-02-09 19:36:01 -08:00
d0cd
b3ef6f79c3
Add typechecking for inline functions
2023-02-08 17:09:17 -08:00
d0cd
b5c22e23ee
Remove occurences of 'call_type'
2023-02-08 16:37:47 -08:00
d0cd
4e8cd3ce52
Add parser support for inline functions
2023-02-08 16:37:28 -08:00
d0cd
44e378b84b
Rename CallType to Variant
2023-02-08 16:32:08 -08:00
d0cd
c71ed3429c
Add inline keyword
2023-02-08 16:20:07 -08:00
d0cd
afac7b55bc
Add more test cases; fmt
2023-02-08 11:32:53 -08:00
d0cd
b921f959b4
Fmt & clippy
2023-02-08 11:32:53 -08:00
d0cd
ef0e455e2b
Add support for expected errors
2023-02-08 11:32:53 -08:00
d0cd
f0c7314e17
Regen expectations
2023-02-08 11:32:53 -08:00
d0cd
44eb8ad453
Cleanup; add bytecode to expected outputs
2023-02-08 11:27:29 -08:00
d0cd
59915ed315
Initial implementation of Execute namespace; fmt
2023-02-08 11:21:20 -08:00
d0cd
789c2e6443
Remove input files from compiler tests
2023-02-08 11:18:40 -08:00
d0cd
085f8fbdae
Factor out test helpers
2023-02-08 11:14:22 -08:00
d0cd
dc92ec36d2
Refactor tests to separate directory
2023-02-08 11:13:41 -08:00
d0cd
4bb6ceb5ea
Update license and clippy
2023-02-05 13:43:10 -08:00
d0cd
0a8b41b025
Address feedback
2023-02-05 12:46:21 -08:00
d0cd
f65ad5dc69
Fmt
2023-02-05 12:46:21 -08:00
d0cd
5565150f30
Regen expectations
2023-02-05 12:46:21 -08:00
d0cd
74e358dde6
Add test for out of order functions
2023-02-05 12:46:21 -08:00
d0cd
e633c62b71
Implement post-ordering for functions during code-generation
2023-02-05 12:46:21 -08:00
d0cd
f06b83c7f4
Implement check for cyclic call graph
2023-02-05 12:46:20 -08:00
d0cd
b17702e019
Fix graph init; regen expectations
2023-02-05 12:46:20 -08:00
d0cd
899c12d85a
Implement post-order codegen for structs and records
2023-02-05 12:46:20 -08:00
d0cd
a4d76c644a
Refactor AST
2023-02-05 12:46:20 -08:00
d0cd
d91233f06e
Implement cycle detection for structs and records
2023-02-05 12:46:20 -08:00
d0cd
5e331bbf36
Cleanup
2023-02-05 12:46:20 -08:00
d0cd
dd33eb024d
Add test
2023-02-05 12:46:20 -08:00
d0cd
940d357c5e
Cleanup
2023-02-05 12:46:20 -08:00
d0cd
9edbf0a74e
Add tests for graph
2023-02-05 12:46:20 -08:00
d0cd
8b8c7b5c0a
Get cycle if toposort fails
2023-02-05 12:46:20 -08:00
d0cd
9fbcdfc9f3
Add graph data structure
2023-02-05 12:46:19 -08:00
d0cd
063cb15d97
Reorg common module
2023-02-05 12:46:19 -08:00
ljedrz
b20308f049
chore: update the license headers ( #2252 )
...
Signed-off-by: ljedrz <ljedrz@gmail.com>
2023-02-02 14:27:06 -08:00
d0cd
b044b002a7
Check that functions cannot output records
2023-01-18 12:33:04 -08:00
Alessandro Coglio
5c223460c1
[parser] Extend and update some documentation.
2023-01-13 20:12:47 -08:00
Alessandro Coglio
1cbea97f27
[span] Extend and improve some doc.
2023-01-13 20:07:49 -08:00
dependabot[bot]
6df6bb5ef9
Bump serde from 1.0.150 to 1.0.152 ( #2221 )
2023-01-03 19:26:07 -08:00
Collin Chin
5a7feb28f7
Improve testing infrastructure ( #2227 )
...
* wip
* re-enable get_process call for test programs
* remove local tests
* clean up
* remove rust version from cargo.toml
2023-01-03 17:51:13 -08:00
Collin Chin
52c29b23e0
clippy: remove useless .into_iter() ( #2225 )
2023-01-03 11:44:52 -08:00
collin
d7b1b9ca56
chore(leo): bump version for new release
2022-12-12 19:31:56 -05:00
d0cd
48a1f0590b
Rename console.assert*
to assert*
. ( #2205 )
...
* Add assert statements to AST
* Add support in passes
* Add parser support
* Add tyc support
* Add support for assert statements in the remaining passes
* Fix examples, tests, and regen expectations
* Fmt
* Regen expectations
2022-12-06 21:56:48 -08:00
collin
1e01a3a686
chore(leo): bump version for new release
2022-11-30 13:40:52 -08:00
Collin Chin
3f2df5389c
use cargo workspace for dependencies ( #2195 )
2022-11-30 13:31:33 -08:00
Collin Chin
23f5828804
bump aleo v0.3.1 snarkvm v0.9.8 ( #2193 )
2022-11-30 00:49:50 -08:00
dependabot[bot]
6413f3ecac
Bump serde from 1.0.147 to 1.0.148 ( #2189 )
...
Bumps [serde](https://github.com/serde-rs/serde ) from 1.0.147 to 1.0.148.
- [Release notes](https://github.com/serde-rs/serde/releases )
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.147...v1.0.148 )
---
updated-dependencies:
- dependency-name: serde
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-29 16:37:19 -08:00
d0cd
23615c6858
Fixes code generation for ExpressionStatements ( #2192 )
...
* Fix codegen for call instruction
* Cleanup
2022-11-29 16:36:37 -08:00
d0cd
8986be33e8
Create common module; move pass data structures ( #2173 )
...
Co-authored-by: collin <16715212+collinc97@users.noreply.github.com>
2022-11-23 15:05:05 -05:00
collin
f6f286ac8a
pull testnet3, regen tests
2022-11-23 02:37:57 -05:00
collin
9e28591589
pull testnet3, regen tests
2022-11-23 01:56:37 -05:00
collin
ac4c38d921
clippy
2022-11-23 01:28:33 -05:00
collin
801df56f9c
pull testnet3, regen tests
2022-11-22 20:55:12 -05:00
Collin Chin
40e56f8613
Merge pull request #2100 from AleoHQ/feat/tuple
...
Supports tuples.
2022-11-22 20:49:25 -05:00
d0cd
a8a8086f18
Fmt
2022-11-16 10:24:29 -08:00
d0cd
9370c11a2b
Implement fix
2022-11-16 10:24:29 -08:00
d0cd
ae329c521b
Deprecate (async) finalize statements
2022-11-15 13:18:39 -08:00
collin
44bca58821
chore(leo): bump version for new release
2022-11-14 18:56:09 -08:00
collin
49786b3d79
bump snarkvm-v0.9.7 aleo-v0.3.0
2022-11-14 18:53:32 -08:00
d0cd
80d53ee908
Fmt
2022-11-12 16:36:26 -08:00
d0cd
d82fa641a2
Fix parser
2022-11-12 16:35:37 -08:00
d0cd
682b67e184
Fix flattening logic
2022-11-12 16:23:16 -08:00
d0cd
c6fd32c032
Fix flattening pass
2022-11-12 11:28:03 -08:00
d0cd
1f977e5c45
Fix tyc pass
2022-11-12 10:48:16 -08:00
d0cd
1a9c95ce05
Fix SSA pass
2022-11-12 10:21:36 -08:00
d0cd
3227f9bdb4
Fix codegen pass
2022-11-12 10:21:36 -08:00
d0cd
81d7c5c9a4
Update parser; remove async token
2022-11-12 10:17:41 -08:00
d0cd
060f57d971
Remove standalone finalize statement from the AST
2022-11-12 10:13:23 -08:00
d0cd
1e2a7f222d
Fmt
2022-11-12 09:58:52 -08:00
d0cd
b16926449c
Support private mode in parser and passes
2022-11-12 09:53:20 -08:00
d0cd
111a19761a
Fmt
2022-11-11 21:09:57 -08:00
d0cd
31972e1b38
Fix SSA for expr statements
2022-11-11 21:03:11 -08:00
d0cd
2f9bfd7ab9
Cleanup debug prints; fix bug, the flatten test builds
2022-11-08 17:10:39 -08:00
d0cd
ef4ae89b92
Add more test cases
2022-11-08 15:52:31 -08:00
d0cd
ca89010e59
Fix failing case
2022-11-08 15:49:47 -08:00
d0cd
f606a8b74a
Restrict tuples in parser; cleanup
2022-11-08 15:49:47 -08:00
d0cd
5bf16064ab
WIP Impl codegen for tuples
2022-11-08 15:49:47 -08:00
d0cd
2287e86b56
WIP flattening
2022-11-08 15:49:47 -08:00
d0cd
910d373afd
WIP support tuples on lhs of definitions
2022-11-08 15:49:47 -08:00
d0cd
40ff47882f
Add support for expression statements in compiler passes
2022-11-08 15:49:47 -08:00
d0cd
a7795b72db
Add parser support for expression statements
2022-11-08 15:49:47 -08:00
d0cd
30391c8bd4
Add ExpressionStatement to AST
2022-11-08 15:49:47 -08:00
d0cd
af08c4f2e5
Some cleanup
2022-11-08 15:49:47 -08:00
d0cd
678f8b02a1
Fix unit expression
2022-11-08 15:49:47 -08:00
d0cd
34fa2cb2c6
Parse empty return statement as a unit expression
2022-11-08 15:49:47 -08:00
d0cd
6789bc8aae
Add unit expressions to the AST
2022-11-08 15:49:47 -08:00
d0cd
3ab83f45f3
Fix bug, regen tests
2022-11-08 15:49:47 -08:00
d0cd
0439981d01
Add TODO
2022-11-08 15:49:47 -08:00
d0cd
134fc1860c
Remove debug prints
2022-11-08 15:49:47 -08:00
d0cd
b60cd7e4b0
Remove redundant check
2022-11-08 15:49:47 -08:00
d0cd
c07e07d9d1
Fix tuple flattening
2022-11-08 15:49:47 -08:00
d0cd
c651da0581
wip tuples
2022-11-08 15:49:47 -08:00
d0cd
4963a11ee7
More tyc restricting nested tuples
2022-11-08 15:49:47 -08:00
d0cd
2839de13c6
Forbid tuples in input and output types
2022-11-08 15:49:47 -08:00
d0cd
29369b2a42
Better tyc for tuples in composite data types
2022-11-08 15:49:47 -08:00
d0cd
fdddb8054a
Remove flattening circuits and nested tuples
2022-11-08 15:49:47 -08:00
Pranav Gaddamadugu
6ae2d9727b
Cleanup
2022-11-08 15:49:47 -08:00
Pranav Gaddamadugu
605f675ff6
More tyc
2022-11-08 15:49:47 -08:00
Pranav Gaddamadugu
6d82f83c37
WIP
2022-11-08 15:49:46 -08:00
Pranav Gaddamadugu
b622d35d8f
Implement logic for flattening circuit definitions
2022-11-08 15:49:46 -08:00
Pranav Gaddamadugu
9994a0451f
wip: basic tyc for empty and singleton tuples
2022-11-08 15:49:46 -08:00
Pranav Gaddamadugu
8d204a898b
Add tests for tuples
2022-11-08 15:49:46 -08:00
collin
12267cd99d
merge snarkvm v0.9.3
2022-11-07 19:14:51 -08:00
collin
dee937c040
update snarkvm v0.9.3
2022-11-07 19:01:06 -08:00
d0cd
2341f293f6
Update snarkVM dependencies
2022-11-07 16:22:58 -08:00
d0cd
a05b7e6b70
Codegen uses struct instead of interface
2022-11-05 18:18:48 -07:00
collin
6f311e7602
bump snarkvm to 0.9.1 bump aleo rev
2022-11-04 18:31:59 -07:00
Collin Chin
f68b117907
Merge pull request #2153 from AleoHQ/dependabot/cargo/testnet3/scoped-tls-1.0.1
...
Bump scoped-tls from 1.0.0 to 1.0.1
2022-11-04 13:00:22 -07:00
collin
e6c3700945
merge testnet3
2022-11-04 12:46:32 -07:00
Collin Chin
d329181999
Merge pull request #2151 from AleoHQ/fix/span-for-function-call-tyc
...
Better error messages for mistyped function calls.
2022-11-04 12:34:08 -07:00
Collin Chin
1c7fefac53
Merge pull request #2150 from AleoHQ/fix/tyc-for-member-access
...
Fix type checking for member access.
2022-11-04 12:33:37 -07:00
collin
3226120503
fix clippy lints
2022-11-04 12:28:59 -07:00
dependabot[bot]
33643f5be0
Bump scoped-tls from 1.0.0 to 1.0.1
...
Bumps [scoped-tls](https://github.com/alexcrichton/scoped-tls ) from 1.0.0 to 1.0.1.
- [Release notes](https://github.com/alexcrichton/scoped-tls/releases )
- [Commits](https://github.com/alexcrichton/scoped-tls/compare/1.0.0...1.0.1 )
---
updated-dependencies:
- dependency-name: scoped-tls
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-11-01 10:25:07 +00:00
Pranav Gaddamadugu
7e70da2326
Implement check for nested import
2022-10-31 18:05:46 -07:00
Pranav Gaddamadugu
41a8bc5a73
Add span associated with the import statement to ast
2022-10-31 18:05:14 -07:00
d0cd
43919a9644
Disable string type in type checker
2022-10-31 18:01:04 -07:00
d0cd
3c2da076ff
Merge pull request #2144 from AleoHQ/fix/conditional-assert
...
Fixes flattening for `console` statements.
2022-10-31 17:11:43 -07:00
d0cd
c4279e2a83
Merge pull request #2146 from AleoHQ/fix/tyc-for-loop-bounds
...
Fix/tyc for loop bounds
2022-10-31 17:11:19 -07:00
d0cd
160a89494f
Merge pull request #2142 from AleoHQ/fix/finalize-output
...
Fix output type for finalize block.
2022-10-31 17:02:27 -07:00
d0cd
0b7d5c4892
Implement fix
2022-10-31 13:53:40 -07:00
d0cd
b32bfba376
Fmt; clippy
2022-10-31 13:16:32 -07:00
d0cd
76d302dbad
Implement fix; fix span produced by parser
2022-10-31 13:14:15 -07:00
d0cd
9907d89886
Implement fix
2022-10-27 20:21:18 -07:00
d0cd
462d3105a0
Update doc
2022-10-25 18:29:27 -07:00
d0cd
9c44c38dc2
Fix logical formula
2022-10-25 16:21:57 -07:00
d0cd
fe28cabb72
Impl flattening for console statements
2022-10-25 15:54:45 -07:00
d0cd
52ff7b82c5
Refactor guard construction
2022-10-25 15:21:43 -07:00
d0cd
fe0266c1da
Prepend program name to AST outfile
2022-10-25 10:40:23 -07:00
d0cd
8ae7c0da99
Fmt
2022-10-24 22:59:18 -07:00
d0cd
e07887e9c7
Cleanup
2022-10-24 22:44:43 -07:00
d0cd
df01360010
Clippy
2022-10-24 22:41:10 -07:00
d0cd
28eb05f56d
Implement fix
2022-10-24 22:18:05 -07:00
dependabot[bot]
3af57cbfc5
Bump serde from 1.0.146 to 1.0.147
...
Bumps [serde](https://github.com/serde-rs/serde ) from 1.0.146 to 1.0.147.
- [Release notes](https://github.com/serde-rs/serde/releases )
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.146...v1.0.147 )
---
updated-dependencies:
- dependency-name: serde
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-10-24 10:17:51 +00:00
d0cd
44722d1fbf
Merge pull request #2136 from AleoHQ/dependabot/cargo/testnet3/serde-1.0.146
...
Bump serde from 1.0.145 to 1.0.146
2022-10-21 12:40:28 -07:00
Haruka
aab179c676
Preserve struct member order when reordering owner
and gates
2022-10-22 02:46:22 +09:00
dependabot[bot]
22722ddde0
Bump serde from 1.0.145 to 1.0.146
...
Bumps [serde](https://github.com/serde-rs/serde ) from 1.0.145 to 1.0.146.
- [Release notes](https://github.com/serde-rs/serde/releases )
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.145...v1.0.146 )
---
updated-dependencies:
- dependency-name: serde
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-10-21 10:56:37 +00:00
d0cd
1f9f1750fe
Clippy; add compiler check
2022-10-12 00:22:55 -05:00
d0cd
264e60c6ee
Update doc
2022-10-12 00:15:06 -05:00
Pranav Gaddamadugu
047575f9bf
Fix failing case
2022-10-12 00:15:06 -05:00
Pranav Gaddamadugu
8e3cd83bb8
Fix failing case
2022-10-12 00:15:06 -05:00
Collin Chin
8b9ad3811d
Merge pull request #2114 from AleoHQ/update/aleo-snarkvm
...
Update revs.
2022-10-06 14:21:02 -07:00
Collin Chin
4256167bfe
Merge pull request #2112 from AleoHQ/feat/program-scope
...
Introduces `program` scope.
2022-10-06 14:19:35 -07:00
Pranav Gaddamadugu
97b299ac8a
Update revs
2022-10-06 11:31:58 -07:00
Pranav Gaddamadugu
d7813923d2
More examples
2022-10-06 00:17:51 -07:00
Pranav Gaddamadugu
028a01efde
More fixes
2022-10-05 23:51:56 -07:00