44 Commits

Author SHA1 Message Date
Hans Svensson
11dc632927 Add handling of auth_tx_hash 2019-06-14 13:14:24 +02:00
Thomas Arts
5513c4de1b New version of aebytecode 2019-06-11 15:24:58 +02:00
Hans Svensson
a14fa93920 Add contract_to_address to FATE 2019-06-11 12:05:58 +02:00
Ulf Norell
7b5db76c13 aebytecode commit 2019-06-05 18:20:20 +02:00
Ulf Norell
a64b72d04b aebytecode commit 2019-06-05 12:11:49 +02:00
Hans Svensson
07c445082a Prepare v3.1.0 2019-06-03 10:58:28 +02:00
Ulf Norell
0409a658b0 Update to new TUPLE instruction
... and minor fixes
2019-05-28 14:18:38 +02:00
Tobias Lindahl
60d9581fae Add missing instructions for FATE 2019-05-28 11:35:24 +02:00
Tobias Lindahl
0fa09467f6
Pt 166148534 refactor fate code (#71)
* Change of module names aeb_fate_code -> aeb_fate_ops

* Add missing call instructions

* Use new adt for fate code

* Add default init function if not present and keep init function if present

* Fix BLOCKHASH function for fate

* Rewrite for clarity and Dialyzer
2019-05-23 14:01:41 +02:00
Hans Svensson
94689dd0e9 Prepare for v3.0.0 2019-05-21 09:55:17 +02:00
Hans Svensson
be7c0e1bd4 Remove escript aesophia 2019-05-21 09:54:42 +02:00
Tobias Lindahl
251b876495
Add value and gas to remote calls (#64)
* Add value and gas to remote calls
2019-05-10 09:00:36 +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
Hans Svensson
3255c62e0e Revert bytes(N) from icode/vm-types 2019-04-23 17:47:50 +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
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
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
e460b84bd0 Update commit hash aebytecode 2019-04-11 09:24:43 +02:00
Hans Svensson
2ed9d17ce5 Switch to generalized_accounts branch of aebytecode 2019-04-08 11:57:07 +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
Luca Favatella
37dfbf78ac
Remove fragile file-based versioning (#46) 2019-03-15 10:12:41 +00:00
Tobias Lindahl
f395649419 Check that VERSION file exists 2019-03-15 09:50:39 +01:00
Tobias Lindahl
177e32c117 Upgrade to latest aebytecode (and by transitivity aeserialization) 2019-03-14 10:59:15 +01:00
Tobias Lindahl
a44b787735 Use latest aebytecode 2019-03-13 11:17:33 +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
5e6e607fa4 Use v2.0.1 of aebytecode including new sub dependencies. 2019-03-05 14:27:01 +01:00
Erik Stenman
a69056c35e Change aebytecode branch ref to a tag. 2019-03-05 14:26:23 +01:00
Erik Stenman
af4f2ad795 Clean up. 2019-03-05 14:24:46 +01:00
Erik Stenman
1cfd4c6f24 Add release target. 2019-03-05 14:24:22 +01:00
Ulf Norell
f07a49c91d Skeleton for Fate backend 2019-03-05 14:23:19 +01:00
Erik Stenman
e33e4cf2cd Use fortuna version of aebytecode in fortuna version of aesophia. 2019-03-05 14:22:59 +01:00
Robert Virding
d330133b3f First version, very much WIP 2019-02-28 16:13:57 +01:00
Hans Svensson
3ba89d9f55 Merge ROMA into MINERVA 2019-02-08 13:38:37 +01:00
Hans Svensson
362373c0d7 Add escript post_hooks 2019-01-30 10:58:19 +01:00
Hans Svensson
87e5562f74 Super simple standalone version of the compiler 2019-01-29 15:25:39 +01:00
Hans Svensson
23ccce4c22 Use ?SHL and ?SHR for 'bsl' and 'bsr' 2019-01-22 21:53:30 +01:00
Ulf Norell
f0dcda27bc Update aebytecode commit 2019-01-22 14:54:38 +01:00
Hans Svensson
e4c46ee16f Bump aebytecode dependency 2019-01-21 20:14:20 +01:00
Hans Svensson
0d78a5e4a0 Add Erlang implementation of Blake2B
This removes the dependency on enacl, and NIFs.
2019-01-14 10:58:25 +01:00
Thomas Arts
66b1d2e98a Update rebar config 2019-01-07 19:17:24 +01:00
Robert Virding
d4d02fd576 First test work commit, don't touch 2018-12-22 01:23:40 +01:00