200 Commits

Author SHA1 Message Date
Hans Svensson
f8ee8f7129
Merge pull request #63 from aeternity/PT-165440601-165713319-sophia_addons
Add Contract.creator and address checking primitives
2019-05-09 10:34:45 +02:00
Hans Svensson
192ec207a7 Add Contract.creator and address checking primitives 2019-05-09 09:54:04 +02:00
Ulf Norell
0aa1c89556
Fate compiler (#62)
* Update to changes in icode format

* Start on new intermediate code for FATE

* Compile `let` to FATE

* Fix and improve broken bytecode optimisations

* Basic tuple patterns

* Compile shallow matching on tuples

* Liveness analysis for local variables

* Fix minor bug

* Use RETURNR when possible

* Nicer debug printing

* Refactor optimization rules

* Compile tuple construction

* Improve instruction analysis and generalize some optimizations

* Compile nested pattern matching to case trees

(Only tuple and variable patterns so far)

* Reannotate and repeat optimization pass once it done

Could try hard to keep annotations more precise, but would be more error prone

* Get rid of unnecessary STORE instructions

* Keep better track of liveness annotations when swapping instructions

* 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.

* Pattern matching on booleans

* wip: rewrite case tree compiler to handle catch-alls

still with debug printing, and can't compile it yet

* Add missing case in renaming

* Compile case trees all the way to Fate assembly

* Simplify variables bindings in environment

* Shortcut let x = y in ...

* compile list literals

* Fix various bugs in pattern match compilation

* Pretty printer for fcode

* Fix renaming bug

* Another renaming bug

* Handle switch_body in optimizations

* Remove optimization for if-then-else

* Tag instructions in annotated scode

* Remove 'if' from fcode

* Fix dialyzer things

* Remove unused argument

* Compile pattern matching on integer literals

* Compile list patterns

* Use op_view in more places

* allow leaving out fields from record patterns

* compile records (patterns and construction)

* Compile record update

* Use SETELEMENT instruction

* Compile variants

* Remove incorrect push for tuple switches

* Optimize matching on single constructors datatypes

* Use the fact that SWITCH and JUMPIF can use args and vars

* string literals and pattern matching on the same

* Compile character literals

* Minor refactoring of op instruction handling

* compile address literals

* Get rid of unit in AST

* Unary operators

* Compile function calls

(to fully saturated top-level functions only)

* fix breakage after unary operators

* variables are now lists of names in fcode

* pretty printing for function calls

* use STORE ?a instead of PUSH during optimizations

* no-op fcode optimization pass

* some constant propagation optimizations

* Case on constructor optimization

* fix minor bugs

* Compile all the operators

* Compile maps

* Simplify JUMPIF on true/false

* Fixed left-over reference to STR_EQ

* Add compile-time evaluation for more operators

* Distinguish local vars and top-level names already in fcode

* Compile builtins

* Compile bytes(N)

Compile to FATE strings for now

* Improve inlining of PUSH

* Fix name resolution bug

* Change map_get/set to operators in fcode

* Compile lambdas and higher-order functions

* Optimize single variable closure envs

* Handle unapplied builtins and top-level functions

* Missing case in fcode pretty printer

* Fix variable binding bug in fcode compiler

* Compiler side of state updates

No support in FATE yet though

* Compile statements

* Compile events

But no FATE support for events yet

* Compile remote calls

* Clearer distinction between applied and unapplied top-level things (def/builtin) in fcode

* Tag for literals in fcode to make code cleaner

* We now have block hash at height in FATE

* Update aebytecode commit

* Get rid of catchall todos

* Jump some hoops to please Dialyzer
2019-05-07 15:48:47 +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
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
Tino Breddin
562ad5ee87
Merge pull request #51 from aeternity/PT-165081160-update-rebar3
Upgrade rebar3 to 3.9.1-aeternity.2
2019-04-03 11:00:26 +02:00
Tino Breddin
4e78756b90 Upgrade rebar3 to 3.9.1-aeternity.2
Reference: https://github.com/aeternity/rebar3/releases/tag/3.9.1-aeternity.2
2019-04-03 10:23:02 +02:00
Robert Virding
9f32fb1925
Merge pull request #50 from aeternity/PT-164597852-move-aesophia-heap
PT-164597852 Move aesophia heap handling into aebytecode
2019-04-02 17:53:28 +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
Erik Stenman
3271d6fba4
Merge pull request #49 from aeternity/PT-164597736-variant-types
Pt 164597736 variant types
2019-04-02 13:59:47 +02:00
Erik Stenman
30fbcc50c5 Longer ref. 2019-04-02 13:53:54 +02:00
Erik Stenman
27bc5474cb Upgrade aebytecode to new variant type representation. 2019-04-02 12:44:51 +02:00
Hans Svensson
efeb391805
Merge pull request #48 from aeternity/cleanup_blake2
Remove aeso_blake2, use eblake2
2019-04-02 10:32:41 +02:00
Hans Svensson
15ca37342c Remove aeso_blake2, use eblake2 2019-04-02 09:00:20 +02:00
Luca Favatella
8b7e4db490
Merge pull request #47 from aeternity/PT-164834227-too-verbose-build
Fix build warning
2019-04-01 12:13:28 +01: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
Tobias Lindahl
188916c61f
Merge pull request #45 from aeternity/PT-164655050-fail-on-removed-VERSION
Check that VERSION file exists
2019-03-15 10:15:04 +01:00
Tobias Lindahl
f395649419 Check that VERSION file exists 2019-03-15 09:50:39 +01:00
Tobias Lindahl
36395b597a
Merge pull request #44 from aeternity/PT-164626753-latest-aebytecode
Upgrade to latest aebytecode (and by transitivity aeserialization)
2019-03-14 11:32:29 +01:00
Tobias Lindahl
177e32c117 Upgrade to latest aebytecode (and by transitivity aeserialization) 2019-03-14 10:59:15 +01: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
Tobias Lindahl
fba6609c3a
Merge pull request #42 from aeternity/fortuna2
Merge Fortuna to master
2019-03-13 13:44:48 +01:00
Tobias Lindahl
e7c477d4de
Merge pull request #41 from aeternity/PT-164595944-use-latest-aebytecode
Use latest aebytecode
2019-03-13 11:34:42 +01:00
Tobias Lindahl
a44b787735 Use latest aebytecode 2019-03-13 11:17:33 +01:00