227 Commits

Author SHA1 Message Date
Ulf Norell
b3131504b0 Handle switch_body in optimizations 2019-05-07 13:16:38 +02:00
Ulf Norell
ee7bc126fc Another renaming bug 2019-05-07 13:16:38 +02:00
Ulf Norell
cca83a5dfa Fix renaming bug 2019-05-07 13:16:38 +02:00
Ulf Norell
f73a0934d4 Pretty printer for fcode 2019-05-07 13:16:38 +02:00
Ulf Norell
771e4aa967 Fix various bugs in pattern match compilation 2019-05-07 13:16:38 +02:00
Ulf Norell
e597a3780a compile list literals 2019-05-07 13:16:38 +02:00
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
71b97cba62
Merge pull request #61 from aeternity/PT-165597438-equality-on-bytes
Support equality on bytes(N)
2019-04-26 08:47:14 +02:00
Ulf Norell
8a381e5ef1 Support equality on bytes(N) 2019-04-25 16:06:50 +02:00
Hans Svensson
386419f112
Merge pull request #60 from aeternity/PT-164629541-generic_hash_and_signature
Revert bytes(N) from icode/vm-types
2019-04-24 08:58:43 +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
51b63f9559
Merge pull request #59 from aeternity/PT-164629541-generic_hash_and_signature
Add bytes(int), add address_literalsm add ecverify_secp256k1
2019-04-23 11:23:32 +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
Erik Stenman
faa0ef9772
Merge pull request #57 from aeternity/PT-165312102-setelement
Point to latest aebytecode with setelement instruction.
2019-04-15 10:57:10 +02:00
Erik Stenman
f07954f62c Point to latest aebytecode with setelement instruction. 2019-04-15 08:54:02 +02:00
Hans Svensson
ef761a4c57
Merge pull request #56 from aeternity/prepare_2.1.0
Preparing v2.1.0
v2.1.0
2019-04-11 14:22:54 +02:00
Hans Svensson
330d8929fd Preparing v2.1.0 2019-04-11 13:42:41 +02:00
Thomas Arts
491b1211d1
Merge pull request #55 from aeternity/PT-165246396-prepare-remove-dependency
Update commit hash aebytecode
2019-04-11 10:30:41 +02:00
Thomas Arts
e460b84bd0 Update commit hash aebytecode 2019-04-11 09:24:43 +02:00
Hans Svensson
9109712826
Merge pull request #53 from aeternity/generalized_accounts
Add Auth.tx_hash - namespace + primop
2019-04-08 14:45:56 +02:00
Hans Svensson
d6a55e144e Test Auth.tx_hash compilation 2019-04-08 11:57:07 +02:00
Hans Svensson
db64978d2e Add Auth.tx_hash 2019-04-08 11:57:07 +02:00
Hans Svensson
2ed9d17ce5 Switch to generalized_accounts branch of aebytecode 2019-04-08 11:57:07 +02:00
Robert Virding
7bf7cb0b8f
Merge pull request #52 from aeternity/new-aci-generator
PT-163022973 Make a new aci generator
2019-04-05 15:14:17 +02:00
Robert Virding
4a01c852c9 Add more test cases
And some trivial code cleanup.
2019-04-03 22:58:54 +02:00