Commit Graph

730 Commits

Author SHA1 Message Date
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
d3125a0f9f add new dynamic check errors and tests for variables 2020-10-26 18:41:51 -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
b3c140d5bb fix array function input bug 2020-10-26 13:14:36 -07:00
collin
9bae1037f7 fix core package tests 2020-10-26 12:55:00 -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
17a65fe54a add dynamic check errors for circuits 3 2020-10-24 19:27:30 -07:00
collin
6e124e52ff add dynamic check errors for statements 2020-10-24 17:01:40 -07:00
collin
22d6c98c77 add dynamic check errors for functions 2020-10-24 16:50:07 -07:00
collin
e19616b4e5 add dynamic check errors for circuits 2 2020-10-24 13:07:27 -07:00
collin
973e2a6afc add dynamic check errors for circuits 1 2020-10-24 02:53:09 -07:00
collin
8e75e36532 manually impl PartialEq for array types 2020-10-23 21:54:19 -07:00
collin
f2a808cbe7 impl membership type assertion error handling 2020-10-23 17:31:41 -07:00
collin
dbade1f4fe fix mismatched types test 2020-10-23 17:00:11 -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
4591a0eb04 refactor: use &Path instead of (&)PathBuf in tests 2020-10-16 17:23:22 +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
98baae93c1 clippy: assorted fixes to tests and benches
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-10-06 15:09:03 +02: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
a76f4f6767 fix test 2020-09-18 12:57:44 -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
3164f6ce33 fix import tests 2020-09-18 12:41:38 -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
22422c1b55 create separate module for imports 2020-09-18 12:04:10 -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
733561cc93 remove unused test dependencies 2020-09-16 13:45:53 -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
d2810f2789 fix tests 2020-09-10 11:18:49 -07:00
collin
8a3f59e9c0 remove types from console.log and formatted strings 2020-09-07 23:40:15 -07:00
collin
5db13fa904 test Self keyword fails in main function 2020-09-07 22:07:26 -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
17784ffb23 add tests for mutable circuit variables using self keyword 2020-09-07 13:47:50 -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
collin
2d7886f951 add test comments 2020-09-03 13:58:04 -07:00
collin
3ef023b87a impl tests for nested and tuple array combinations in Leo programs 2020-09-03 13:56:45 -07:00
collin
4932eb688e support all combinations of nested and tuple array syntax. Test small and large arrays 2020-09-03 13:22:05 -07:00
collin
b6dc77e112 support nested array type in leo inputs 2020-09-03 11:24:23 -07:00
collin
de3564b98d support nested array type in leo programs 2020-09-03 10:02:59 -07:00
howardwu
2620ae7bc2 chore(leo): bump version for new release 2020-09-03 03:08:33 -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
ad53cdc9ba
Merge pull request #341 from AleoHQ/refactor/keywords
Refactor/keywords
2020-09-02 21:54:59 -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
603438b216 impl self keyword protected name and add tests 2020-09-02 20:59:05 -07:00
collin
42b03a3ccb impl input keyword protected name 2020-09-02 20:24:21 -07:00
collin
94f6c00f30 add data types to protected names. add identifier tests 2020-09-02 19:23:16 -07:00
collin
ddb40a3b15 add missing license headers 2020-09-02 18:45:48 -07:00
collin
c84227f69a Merge branch 'master' of github.com:AleoHQ/leo into feature/mutable-circuit-variables 2020-09-02 18:04:00 -07:00
collin
d35188abcb test mutable circuit variables 2020-09-02 18:01:47 -07:00
collin
87781fed03 throw an error when assigning to an immutable circuit variable 2020-09-02 17:52:17 -07:00
Collin Chin
6fc3393f5c
Merge pull request #334 from AleoHQ/feature/array-init-parenthesis
Feature/array init parenthesis
2020-09-02 20:36:13 -04: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
84a874b0ce add tests for large array initializer 2020-09-02 16:49:06 -07:00
collin
bd3b465a4f add tests for input array initializer 2020-09-02 16:04:41 -07:00
collin
28fca854d2 rename circuit_field -> circuit_variable in compiler tests 2020-09-02 14:15: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
f286ba241d add type fail tests 2020-09-02 11:40:58 -07:00
collin
8cf5eb8790 all tests pass 2020-09-02 11:25:49 -07:00
collin
e7091b18ed fix tests 2020-09-02 11:12:12 -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
howardwu
bf82bf4d1b chore(leo): bump version for new release 2020-08-28 23:26:19 -07:00