132 Commits

Author SHA1 Message Date
Ulf Norell
42c7fde413 Shortcut let x = y in ... 2019-05-07 13:16:38 +02:00
Ulf Norell
961af8ba93 Simplify variables bindings in environment 2019-05-07 13:16:38 +02:00
Ulf Norell
66413ae7fe Compile case trees all the way to Fate assembly 2019-05-07 13:16:38 +02:00
Ulf Norell
3a095cde7e Add missing case in renaming 2019-05-07 13:16:38 +02:00
Ulf Norell
e2c48e1069 wip: rewrite case tree compiler to handle catch-alls
still with debug printing, and can't compile it yet
2019-05-07 13:16:38 +02:00
Ulf Norell
ab13222d29 Pattern matching on booleans 2019-05-07 13:16:38 +02:00
Ulf Norell
59845dec54 Limit the number of iterations for the optimization loop
Should finish in one iteration, but we shouldn't loop if there are bugs
or corner cases where it doesn't.
2019-05-07 13:16:38 +02:00
Ulf Norell
4814cfbf96 Keep better track of liveness annotations when swapping instructions 2019-05-07 13:16:38 +02:00
Ulf Norell
d05130a569 Get rid of unnecessary STORE instructions 2019-05-07 13:16:38 +02:00
Ulf Norell
4b6191aa25 Reannotate and repeat optimization pass once it done
Could try hard to keep annotations more precise, but would be more error prone
2019-05-07 13:16:38 +02:00
Ulf Norell
41387ce0b1 Compile nested pattern matching to case trees
(Only tuple and variable patterns so far)
2019-05-07 13:16:38 +02:00
Ulf Norell
ac25a8fc55 Improve instruction analysis and generalize some optimizations 2019-05-07 13:16:38 +02:00
Ulf Norell
788840f0fa Compile tuple construction 2019-05-07 13:16:38 +02:00
Ulf Norell
3ec156a4b4 Refactor optimization rules 2019-05-07 13:16:38 +02:00
Ulf Norell
185487afda Nicer debug printing 2019-05-07 13:16:38 +02:00
Ulf Norell
e224aadff7 Use RETURNR when possible 2019-05-07 13:16:38 +02:00
Ulf Norell
47a48812b8 Fix minor bug 2019-05-07 13:16:38 +02:00
Ulf Norell
68ee18fe70 Liveness analysis for local variables 2019-05-07 13:16:38 +02:00
Ulf Norell
200f80cc89 Compile shallow matching on tuples 2019-05-07 13:16:38 +02:00
Ulf Norell
d37ef8cec2 Basic tuple patterns 2019-05-07 13:16:38 +02:00
Ulf Norell
216fbc6144 Fix and improve broken bytecode optimisations 2019-05-07 13:16:38 +02:00
Ulf Norell
33bb8a37d0 Compile let to FATE 2019-05-07 13:16:38 +02:00
Ulf Norell
bc8b2d1c81 Start on new intermediate code for FATE 2019-05-07 13:16:38 +02:00
Ulf Norell
d2dbb98b7f Update to changes in icode format 2019-05-07 13:16:38 +02:00
Ulf Norell
8a381e5ef1 Support equality on bytes(N) 2019-04-25 16:06:50 +02:00
Hans Svensson
45a62f0807 Simplify ast_typerep 2019-04-24 08:44:05 +02:00
Hans Svensson
3255c62e0e Revert bytes(N) from icode/vm-types 2019-04-23 17:47:50 +02:00
Hans Svensson
5e6af18c7b Address review comment 2019-04-23 11:10:56 +02:00
Hans Svensson
4324bfd49e Add bytes(int), add address_literalsm add ecverify_secp25k1
hash -> bytes(32)
signature -> bytes(64)
address literals
2019-04-23 10:40:02 +02:00
Hans Svensson
330d8929fd Preparing v2.1.0 2019-04-11 13:42:41 +02:00
Hans Svensson
db64978d2e Add Auth.tx_hash 2019-04-08 11:57:07 +02:00
Robert Virding
4a01c852c9 Add more test cases
And some trivial code cleanup.
2019-04-03 22:58:54 +02:00
Robert Virding
df00c3958b First version of final aci
Should have more test cases and code cleanup
2019-04-03 17:53:16 +02:00
Robert Virding
12cb37245b First version of new aci generator
We also include some updated simple tests which are only run by eunit.
2019-04-03 17:53:16 +02:00
Robert Virding
549a0c2201 Move TYPEREP definitions to aebytecode 2019-04-02 16:03:50 +02:00
Robert Virding
9f5f8d4444 Change function references from aeso_sophia to aeb_aevm_data 2019-04-02 16:00:10 +02:00
Robert Virding
fd0dbdf207 Change references from aeso_memory to aeb_memory 2019-04-02 15:59:12 +02:00
Robert Virding
0d8b7c7c79 First commit fixinng references from aeso_ to aeb_
Also remove local copies of modules moved to aebytecode.
2019-04-02 15:59:12 +02:00
Hans Svensson
15ca37342c Remove aeso_blake2, use eblake2 2019-04-02 09:00:20 +02:00
Luca Favatella
d89fd134b5 Fix build warning
Symptom:
```
src/aeso_aci.erl:18: Warning: record namespace is unused
```
2019-03-29 15:25:21 +00:00
Luca Favatella
37dfbf78ac
Remove fragile file-based versioning (#46) 2019-03-15 10:12:41 +00:00
Hans Svensson
4d61ee65df
Merge pull request #43 from aeternity/add_decode_calldata
add aeso_compiler:decode_calldata/3
2019-03-14 09:42:27 +01:00
Hans Svensson
a089af555f More better type specs 2019-03-13 19:57:27 +01:00
Hans Svensson
cd116b23d7 add aeso_compiler:decode_calldata/3 2019-03-13 16:15:48 +01:00
Erik Stenman
ad34363673
Merge branch 'fortuna' into merge_master_to_fortuna 2019-03-05 14:35:10 +01:00
Erik Stenman
7ae4a98360 Use latest aebytecode. (#36)
* Use latest aebytecode.

* Fix argument to dup instruction.
2019-03-05 14:27:01 +01:00
Erik Stenman
8cfa611b20 Use right name for inc/1. Remove dead code. 2019-03-05 14:24:46 +01:00
Ulf Norell
f07a49c91d Skeleton for Fate backend 2019-03-05 14:23:19 +01:00
Erik Stenman
85a014958d
Use latest aebytecode. (#36)
* Use latest aebytecode.

* Fix argument to dup instruction.
2019-03-04 14:22:36 +01:00
Hans Svensson
f266c5eed8 Add a VERSION file at the top level and go from there 2019-03-04 12:17:54 +01:00