Commit Graph

605 Commits

Author SHA1 Message Date
collin
aa17355a72 fix refactored array initializer tests wip 1 2020-11-09 14:27:59 -08:00
collin
1ae66d9908 add support for refactored array initializer in compiler 2020-11-06 19:42:07 -08:00
collin
d7ff808660 add support for refactored array type in compiler 2020-11-06 16:24:38 -08:00
collin
6f3a235c76 Refactor symbol table array type comparison 2020-11-02 13:28:56 -08:00
collin
2fdcb043fc Improve doc comments for compiler phases 2020-11-02 09:19:11 -08:00
collin
4da923eec4 rename core-packages -> core 2020-10-30 17:36:48 -07:00
collin
a8c5885836 rename core-ast -> ast 2020-10-30 17:31:09 -07:00
collin
ffcd93f781 rename ast -> grammar 1 2020-10-30 17:17:17 -07:00
collin
61f4189483 Add documentation for renamed modules 2020-10-30 16:23:18 -07:00
collin
5a46cb5bb0 rename leo-core -> leo-core-packages 2020-10-30 13:02:44 -07:00
collin
7589fa65c5 rename dynamic-check -> type-inference 2 2020-10-30 12:49:01 -07:00
collin
f1e393a9ab rename dynamic-check -> type-inference 1 2020-10-30 12:39:02 -07:00
collin
7e7d1e58a0 rename typed -> core-ast 2 2020-10-30 11:48:40 -07:00
collin
be2a805d49 rename typed -> core-ast 1 2020-10-30 11:30:52 -07:00
collin
7cf41558bc rename static-check -> symbol-table 3 2020-10-30 10:51:45 -07:00
collin
b5a05be09d rename static-check -> symbol-table 2 2020-10-30 10:44:44 -07:00
collin
20ac83265d rename static-check -> symbol-table 1 2020-10-30 10:25:44 -07:00
collin
46f585e2ff refactor compiler methods 2020-10-27 00:31:36 -07:00
collin
52810588ff refactor modules and make function names more clear 2020-10-26 23:42:01 -07:00
collin
fe79cfcf71 merge master 2020-10-26 22:05:03 -07:00
collin
9024fb0968 remove unused code 2020-10-26 17:52:32 -07:00
collin
020773fb2a impl dynamic checks for imports. all tests pass 2020-10-26 16:05:02 -07:00
collin
09d86576ea add import parsing to first pass of static check 2020-10-26 15:51:46 -07:00
collin
9933b8e336 impl dynamic checks for core packages 2020-10-26 12:24:24 -07:00
collin
54bf6ca42d load program input type into symbol table 2020-10-24 23:57:38 -07:00
collin
4aab804148 add type variable for implicit addresses 2020-10-23 15:52:43 -07:00
collin
f1490a994b impl dynamic check errors 2020-10-23 15:23:48 -07:00
ljedrz
4ccc9c31db perf: reduce format!-related allocations and move them to closures where possible
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-10-22 17:36:26 +02:00
ljedrz
e5f47b8254 perf: make Address is_constant method faster
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-10-22 09:36:08 +02:00
ljedrz
7443bffc00 clippy: unbox some arguments
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-10-21 11:16:24 +02:00
ljedrz
5e4f799685 clippy: remove a few redundant clones
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-10-21 11:14:27 +02:00
Collin Chin
61556cca29
Merge pull request #399 from ljedrz/boxing_improvements
Boxing improvements
2020-10-21 02:10:18 -07:00
collin
3870cf785d fix box accesses 2020-10-21 01:32:09 -07:00
collin
8ea2735caa fix string references 2020-10-21 01:15:12 -07:00
collin
c9e044d3c3 cargo fmt 2020-10-21 01:05:56 -07:00
Collin Chin
33d4da7ad5
Merge branch 'master' into alloc_hunting 2020-10-21 01:05:24 -07:00
Collin Chin
bf77207918
Merge branch 'master' into boxing_improvements 2020-10-21 01:03:38 -07:00
Collin Chin
3c0409da16
Merge branch 'master' into boxing_improvements 2020-10-21 00:51:49 -07:00
Collin Chin
e06e9b9ce6
Merge branch 'master' into alloc_hunting 2020-10-21 00:51:22 -07:00
collin
7c9a5ad8aa fix reference error 2020-10-21 00:19:30 -07:00
Collin Chin
d2dcf65b68
Merge branch 'master' into type_tweaks 2020-10-20 22:29:23 -07:00
collin
f30f615655 impl dynamic checker definition statements 2020-10-20 13:14:16 -07:00
ljedrz
49e9a48d90 perf: reduce boxing in typed objects
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-10-20 11:49:28 +02:00
ljedrz
c8299743b8 perf: reduce Expression size from 244B to 152B
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-10-19 16:23:36 +02:00
ljedrz
64774cdab6 refactor: accept &Path instead of PathBuf where sufficient
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-10-16 17:09:44 +02:00
ljedrz
d662b9a236 perf: use Cow to avoid some PathBuf allocations
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-10-16 16:51:58 +02:00
ljedrz
f59416be1b refactor: pass &Path instead of &PathBuf as arguments
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-10-16 16:18:46 +02:00
ljedrz
790f1c472a perf: don't allocate PathBufs for the purposes of PathBuf::push
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-10-16 15:52:45 +02:00
ljedrz
69d35063f2 perf: use .to_string() instead of single-param format!
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-10-16 15:52:45 +02:00
ljedrz
529d87bc88 perf: remove some generic unnecessary allocations
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-10-16 15:52:45 +02:00
collin
323992696c use typed assignee access 2020-10-15 18:11:39 -07:00
ljedrz
970f808290 perf: refactor a lot of the compiler so that Spans and Strings are rarely cloned
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-10-15 18:19:34 +02:00
ljedrz
e1e22a2310 perf: vector pre-allocation and associated tweaks
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-10-08 11:47:03 +02:00
collin
effdfc7628 add leo dynamic check module 2020-10-06 17:20:51 -07:00
ljedrz
300666827e fmt: run cargo +nightly fmt on the changes
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-10-06 13:07:30 +02:00
ljedrz
c09b7eb3b1 clippy: fix if_same_then_else
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-10-06 12:50:43 +02:00
ljedrz
fe016dc168 clippy: fix needless_range_loop
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-10-06 12:50:43 +02:00
ljedrz
08afb0e604 clippy: fix redundant_pattern_matching
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-10-06 12:50:43 +02:00
ljedrz
4d8a91418f clippy: fix unnecessary_unwrap
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-10-06 12:50:43 +02:00
ljedrz
fc4e2ee4ab clippy: fix type_complexity
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-10-06 12:50:43 +02:00
ljedrz
8c099ab8c8 clippy: fix into_iter_on_ref
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-10-06 12:50:43 +02:00
ljedrz
1a3d1fb2b8 clippy: fix collapsible_if
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-10-06 12:50:43 +02:00
ljedrz
b4bb39872b clippy: fix unused_unit
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-10-06 12:50:43 +02:00
ljedrz
bdfb6f5fb5 clippy: fix redundant_closure
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-10-06 12:50:43 +02:00
ljedrz
e9b9c1f72f fix: allow a piece of own deprecated code
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-10-06 12:50:43 +02:00
ljedrz
f016b972fb clippy: fix vec_box
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-10-06 12:50:43 +02:00
ljedrz
ba9fc92229 clippy: fix large_enum_variant
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-10-06 12:50:43 +02:00
ljedrz
c4cdaed923 clippy: allow too_many_arguments
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-10-06 12:50:43 +02:00
ljedrz
1fc9b902dd clippy: fix redundant_clone & clone_on_copy
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-10-06 12:50:43 +02:00
ljedrz
93369aed33 clippy: fix ptr_arg
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-10-06 12:50:43 +02:00
ljedrz
98990721cf clippy: fix redundant_static_lifetimes
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-10-06 12:50:43 +02:00
ljedrz
a872db5ca6 clippy: fix useless_conversion
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-10-06 12:50:43 +02:00
ljedrz
a4891c6f00 clippy: fix len_zero
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-10-06 12:50:43 +02:00
ljedrz
7c15eabd5e clippy: fix or_fun_call
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-10-06 12:50:43 +02:00
ljedrz
ffef5089f7 clippy: fix new_without_default
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-10-06 12:50:43 +02:00
ljedrz
80bb3033fd clippy: fix single_char_pattern
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-10-06 12:50:43 +02:00
ljedrz
c21b5ad2f3 clippy: fix useless_format
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-10-06 12:12:35 +02:00
ljedrz
4f46dd2982 clippy: allow module_inception
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-10-05 17:18:25 +02:00
ljedrz
0cf7a247cc clippy: fix needless_return
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-10-05 17:16:44 +02:00
collin
d5a9cefe7c impl symbol table for pass 1 + pass 2 type resolution 2020-10-01 20:17:47 -07:00
collin
9ee5b58cff Merge branch 'fix/blake2s-test-output-formatting' of github.com:AleoHQ/leo into feature/import-parser 2020-09-18 13:04:10 -07:00
Collin Chin
13dc121091
Merge pull request #368 from AleoHQ/fix/array-return-type
Fix/array return type
2020-09-18 12:47:04 -07:00
Collin Chin
249242266c
Merge pull request #365 from AleoHQ/feature/blake2s
Implement core module with native blake2s circuit
2020-09-18 12:46:31 -07:00
collin
557fccd9da remove old import parser code from compiler 2020-09-18 12:35:27 -07:00
collin
d54749145b use import parser errors in compiler 2020-09-18 12:26:51 -07:00
Collin Chin
7dfbff7795
Merge pull request #351 from AleoHQ/feature/log-numbers
remove types from console.log and formatted strings
2020-09-18 11:30:12 -07:00
collin
6250e95277 impl compare nested array types method for function return type 2020-09-17 12:46:55 -07:00
collin
38d7397c2c add unit and integration tests for core unstable blake2s circuit 2020-09-16 13:41:50 -07:00
collin
facafe6041 add core package parsing errors 2020-09-16 00:05:58 -07:00
collin
2a9d69f07f add core circuit errors 2020-09-15 23:35:30 -07:00
collin
32c85720be make core function arguments and returns generic 2020-09-15 21:18:48 -07:00
collin
3d3a093f2a Merge branch 'master' of github.com:AleoHQ/leo into feature/blake2s 2020-09-15 17:27:55 -07:00
collin
b071b85b8c remove print statements 2020-09-15 14:19:15 -07:00
collin
23bdecf6c4 fix nested return type mismatch error 2020-09-15 13:01:10 -07:00
collin
5341c28805 naive call to blake2s function working 2020-09-15 12:33:28 -07:00
collin
32cf945c61 core package imports wip 2020-09-12 23:10:01 -07:00
collin
9ed64a6627 fix conflicts 2020-09-10 16:44:25 -07:00
collin
8a3f59e9c0 remove types from console.log and formatted strings 2020-09-07 23:40:15 -07:00
collin
e916a53ed9 add error and clean up 2020-09-07 22:04:23 -07:00
collin
5e4877e778 fix static call nested and test 2020-09-07 21:56:39 -07:00
collin
a83795eda3 fix define circuit inside circuit function bug 2020-09-07 21:15:30 -07:00
collin
09e209f5eb fix storing self circuit variables inside circuit function bug 2020-09-07 15:06:52 -07:00
collin
a04160a09e impl mutating a circuit using the self keyword inside a circuit function 2020-09-07 13:27:49 -07:00
collin
59570002f2 mutable self wip 2020-09-05 22:03:02 -07:00
Howard Wu
788300ef93
Merge pull request #343 from AleoHQ/fix/input-error-messages
Add file path to all error messages
2020-09-03 02:50:13 -07:00
howardwu
981d272fa6 Fixes array indices for both nested and tuple cases 2020-09-03 02:40:50 -07:00
howardwu
40ac13e317 Fix critical array indexing bug 2020-09-03 00:30:57 -07:00
collin
60db15596d fix parser syntax errors. fix tests 2020-09-02 23:23:50 -07:00
collin
340e633470 fix state file errors 2020-09-02 23:05:03 -07:00
collin
0bb8c42731 fix input file errors 2020-09-02 22:59:54 -07:00
Howard Wu
179fba27fc
Merge pull request #337 from AleoHQ/fix/missing-license
add missing license headers
2020-09-02 21:53:14 -07:00
collin
ddb40a3b15 add missing license headers 2020-09-02 18:45:48 -07:00
collin
87781fed03 throw an error when assigning to an immutable circuit variable 2020-09-02 17:52:17 -07:00
Collin Chin
7bc803bd32
Merge pull request #333 from AleoHQ/feature/rename-circuit-field
Feature/rename circuit field
2020-09-02 20:36:01 -04:00
collin
df9fb58677 impl mutable circuit variables 2020-09-02 17:31:31 -07:00
collin
51b80d1742 Merge branch 'feature/rename-circuit-field' into feature/mutable-circuit-variables 2020-09-02 16:59:30 -07:00
collin
2d52dd2444 rename circuit_field -> circuit_variable in compiler 2020-09-02 14:13:27 -07:00
collin
d33ca81869 rename circuit_field -> circuit_variable in typed 2020-09-02 14:10:40 -07:00
Howard Wu
37f9b64343
Merge pull request #331 from AleoHQ/feature/newline-after-test
Add newline after each successful test run
2020-09-02 13:44:41 -07:00
Howard Wu
afc8c6b931
Merge pull request #330 from AleoHQ/feature/unsigned-array-access-only
Add compiler check for signed integer array access
2020-09-02 13:44:11 -07:00
Howard Wu
000293aab7
Merge pull request #325 from AleoHQ/refactor/array-type
Refactor/array type
2020-09-02 13:39:11 -07:00
collin
70ebdb3172 add newline after each successful test run 2020-09-02 13:23:29 -07:00
collin
5210b1ec77 Add compiler check for signed integer array access 2020-09-02 13:11:42 -07:00
collin
a4b0fb1a49 impl array-type for inputs in typed 2020-09-02 10:24:53 -07:00
collin
2662fd4a94 impl array-type in compiler 2020-09-02 09:40:09 -07:00
collin
f823d463f2 merge master 2020-08-31 13:31:23 -04:00
collin
4355e1cd5a support n-group notation 2020-08-31 13:27:44 -04:00
collin
55fdb24bfb add tracing spans to commands. fix clean command 2020-08-21 19:22:01 -07:00
collin
bcab2df709 fix proving output 2020-08-21 18:44:19 -07:00
collin
551595026b fix test output formatting 2020-08-21 18:08:14 -07:00
collin
2e3333cd25 fix test, login, build console output 2020-08-21 17:39:48 -07:00
collin
912a192b5c use tracing in compiler 2020-08-21 16:36:50 -07:00
collin
da843e452e use tracing for build command 2020-08-21 15:49:51 -07:00
Howard Wu
16f0e0b5f6
Merge pull request #262 from AleoHQ/feature/allocated-address
Feature/allocated address
2020-08-20 22:37:30 -07:00
collin
147a87ec24 fix imported static access bug 2020-08-20 21:12:51 -07:00
collin
a86018c0ea impl tests for allocated addresses 2020-08-19 03:11:30 -07:00
collin
5aad40a678 impl cond select gadget for address 2020-08-19 02:58:51 -07:00
collin
0ac23ffb97 impl alloc, enforce eq, eval eq gadgets for address 2020-08-19 02:19:02 -07:00
collin
8f2f39be86 impl address gadget 2020-08-19 01:49:58 -07:00
collin
c686115305 Merge branch 'master' of github.com:AleoHQ/leo into fix/synthesis-error-stack-overflow 2020-08-19 00:12:54 -07:00
Howard Wu
f57a0cc497
Merge pull request #249 from AleoHQ/feature/console
Implement console functions
2020-08-19 00:10:44 -07:00
collin
c3a89764bf fix example naming and manifest files 2020-08-18 22:58:14 -07:00
collin
4cf1a55ce9 add value from implicit group type 2020-08-18 22:38:20 -07:00
collin
c7c2d14597 impl group number syntax in compiler and test zero and one 2020-08-18 13:28:08 -07:00
collin
f675e895f5 merge master 2020-08-18 11:22:56 -07:00
raychu86
ae10a78eb5 Add license header 2020-08-18 03:50:26 -07:00
collin
a8530c9012 comment out field gadget eq 2020-08-17 23:13:54 -07:00
collin
6631da0c7e Merge branch 'master' of github.com:AleoHQ/leo into fix/synthesis-error-stack-overflow 2020-08-17 01:21:24 -07:00
collin
ddfe8fa08a merge master 2020-08-17 01:12:16 -07:00
howardwu
73f134130e Fix Cargo.lock 2020-08-17 01:00:26 -07:00