24 Commits

Author SHA1 Message Date
Erik Stenman
0d1899b32a
Pt 165352420 dissallow stack n (#42)
* Get rid of redundant arity field from op defs. Reorder and renumber ops. Fix bb_end for abort and exit.

* FATE does not accept arbitrary stack positions, only the accumulator aka stack 0.
2019-05-23 13:40:49 +02:00
Erik Stenman
3e0e289f2f
Get rid of redundant arity field from op defs. Reorder and renumber ops. Fix bb_end for abort and exit. (#41) 2019-05-23 13:37:32 +02:00
Tobias Lindahl
11a8997ac7
Pt 166148534 refactor fate code (#40)
* Change names of generated aeb_fate_code -> aeb_fate_ops

* Break out fate code to separate adt module

* Fix documentation of the SPEND op

* More compact implementation of serialization/deserialization

* Changed argument specification order
2019-05-23 08:15:18 +02:00
Tobias Lindahl
a9389e4e69 Add the CALL_VALUE instruction 2019-05-09 10:57:18 +02:00
Tobias Lindahl
2d3cede235 Add value to remote calls and the new ops CALL_GR and CALL_GTR 2019-05-09 10:57:18 +02:00
Ulf Norell
2555868990
Merge pull request #37 from aeternity/fate-compiler
Fate compiler
2019-05-07 13:04:53 +02:00
Tobias Lindahl
3ed0fcbe05 Add test for parsing immediate objects 2019-05-07 11:28:54 +02:00
Ulf Norell
91fc56c322 Change local calls to allow dynamic function name 2019-05-07 09:04:24 +02:00
Ulf Norell
1887486d36 Replace STR_EQ by APPEND
STR_EQ is not needed, the regular EQ instruction can handle strings as well. Having
an instruction for list append is quite handy though (would need two passes to do it
tail recursive in FATE assembly)
2019-05-07 09:04:24 +02:00
Tobias Lindahl
31d188ce81 Update test of BLOCKHASH to correct arity 2019-05-02 10:52:07 +02:00
Erik Stenman
56cf62b487
Add setelement instruction. (#29) 2019-04-12 15:47:16 +02:00
Erik Stenman
662b611e6d
New representation of variant values. (#23)
* New representation of variant values.

* Specify type of elments (byte) in arities list.
2019-03-29 14:52:22 +01:00
Erik Stenman
9abeb21eee
Pt 164601244 add hash and signature type (#22)
* Add hash, signature and object types.
* Add serilaize/deserialize test for new types.
* Document new types.
* Use aeserialization for base58c encoding/decoding.
2019-03-25 17:57:12 +01:00
Erik Stenman
417a34ecd1
Remove typespec from element op. (#20)
* Remove typespec from element op.

* Remove unused code from pretty printer.
2019-03-14 10:48:34 +01:00
Erik Stenman
9763a1a6f5
Pt 164460166 generate documentation (#17)
* Generate docs.

* Test lists of length 16.
2019-03-08 07:59:09 +01:00
Erik Stenman
43652e0843
Handle 5 to 8 args. Generate a test file with all instructions for as… (#14)
* Handle 5 to 8 args. Generate a test file with all instructions for asm/disasm.

* Add ops to test 7 and 8 arguments.
2019-03-04 10:34:17 +01:00
Erik Stenman
6f67da1292
Pt 164325512 variant constants (#13)
* Handle varaint constants and types.

* Format Readme.

* Format Readme step 2.

* Format Readme step 3.

* Format Readme step 4.

* Format Readme step 5.

* Update src/aeb_fate_asm.erl

Co-Authored-By: happi <happi@stenmans.org>

* Update README.md

Co-Authored-By: happi <happi@stenmans.org>

* Get rid of size from varaint type representation.
2019-03-01 13:05:24 +01:00
Erik Stenman
fccc570bee
Pt 164259596 generate format op (#10)
* Generate code for fate ops from spec.

* Generate the code from the makefile. Remove generated files.

* Test targets and cleanup.

* Spell eunit the right way.

* Use test target for ci.

* Renumber opcodes. Add primops.

* Generate tokens in scanner from definitions.

* Rename NUMBER op to GENERATION and add MICROBLOCK instruction.

* Since Tag < Size, Size cannot be zero

* unit is printed `()`

* Formatting differently

* Add eqc profile

* Generate code for fate ops from spec.

* Generate the code from the makefile. Remove generated files.

* Test targets and cleanup.

* Generate op pretty printer.

* Removed unused function.

* Polish Makefile file references (#11)

* Parse all types of values except variants.
2019-02-28 19:18:25 +01:00
Erik Stenman
01ae99f7e8
Removed unused enacl lib. Use eblake2 for hash. (#8)
* Removed unused lib.

* Replace local blake2 implementation with eblake2.

* Add eblake2 dep to app file.

* Add eblake2 to rebar config.

* Use hex for eblake2.

* Bump version.

* Replace local rlp with aeserialization repo. Use ref till first release is available.

* Remove unused vars.
2019-02-26 08:53:46 +01:00
Erik Stenman
a35307f61b Add annotations (comments) to bytecode. Add strip function to remove symboltable and annotations from bytecode. 2019-02-25 07:57:08 +01:00
Erik Stenman
d04a827f05 Add fate code pretty printer. Add symbol table to binary. Add tests of rundtrip serialization and deserialization. 2019-02-23 22:13:19 +01:00
Erik Stenman
16644ded72 Handle most ops. 2019-02-18 18:09:00 +01:00
Erik Stenman
a539378405
Pt 162805963 fate opcodes (#6)
* First iteration of assembler.
* Stand alone assembler.
2019-02-15 11:24:25 +01:00
Thomas Arts
2269a01e18 Copy respository files and add rebar.config 2018-12-21 10:27:02 +01:00