26 Commits

Author SHA1 Message Date
Ulf Norell
9dac134477 Print the error kind in error messages 2019-09-06 09:51:17 +02:00
Hans Svensson
5a1acd9d18 Make aeso_compiler errors structured as well 2019-09-05 14:20:40 +02:00
Ulf Norell
510935d945 Framework and tests for code generation (icode/fcode) errors 2019-09-03 14:35:13 +02:00
Hans Svensson
249b61238e Structured parse_errors and type_errors 2019-09-03 14:35:13 +02:00
Ulf Norell
470970d937 Disallow calling init from inside the contract 2019-09-03 12:22:15 +02:00
Ulf Norell
850221aaf3 Remove no_implicit_stdlib option 2019-08-27 14:10:40 +02:00
Radosław Rowicki
b669d2df1e Added list comprehensions and standard List, Option, Func, Pair, and Triple library (#105)
* Added standard List library and list comprehensions

Added List library.

Flatmaps WIP

Fixed dependency in flat_map

fcode generation

Updated tests to use custom list lib

Added comprehension test

Added stdlib

sanity

Test

* Extended stdlib for lists. Added error message for redefinition of stdlibx

* Fixed type template

* Improved stdlib

* More functions

* Fixed cyclic includes

* Refixed imports and added few tests

* Added fail test

* Undelete removed type spec

* Remove typo

* Fix iter function

* Fixed typo

* Added if guards and let statements in list comp

* Added more fail tests

* Option stliv

* 2 and 3 tuple stdlib

* Updated stdlib to new syntax. Added recursor and changed all/any functions

* Fixed performance issues. Changed include management

* Fixed hash type
2019-08-14 13:53:58 +02:00
radrow
5ff983b0b3 Updated tests 2019-07-22 13:56:45 +02:00
Ulf Norell
6a59e455ce Update tests for entrypoints 2019-06-28 09:42:28 +02:00
Thomas Arts
d3ce5010d0 Update tests 2019-06-20 13:10:08 +02:00
Hans Svensson
bb4ef61a50 Allow negative literals in calldata and result 2019-06-03 09:08:53 +02:00
Hans Svensson
ea17dae93e Silence compiler warning 2019-05-28 11:08:36 +02:00
Ulf Norell
5aed8b3ef5 Check stateful annotations
Functions must be annotated as `stateful` in order to
- Update the contract state (using `put`)
- Call `Chain.spend` or other primitive functions that cost tokens
- Call an Oracle or AENS function that requires a signature
- Make a remote call with a non-zero value
- Construct a lambda calling a stateful function

It does not need to be stateful to
- Read the contract state
- Call another contract with value=0, even when the remote function is stateful
2019-05-13 13:39:17 +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
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
cd116b23d7 add aeso_compiler:decode_calldata/3 2019-03-13 16:15:48 +01:00
Ulf Norell
3efde2a2a1 handle hash literals when permissive_address_literals 2019-03-01 11:36:28 +01:00
Ulf Norell
20f2a05638 fix problem with indent detection when inserting the __call function 2019-03-01 11:08:14 +01:00
Ulf Norell
56f70fea6c test oracle calldata fixes 2019-03-01 09:36:43 +01:00
Hans Svensson
95bf0d4b6c Fix handling of init in create_calldata 2019-02-27 20:42:42 +01:00
Ulf Norell
4c79f7b9f2 tests for calldata creation 2019-02-26 17:41:04 +01:00
Ulf Norell
5a4a84805f change create_calldata function to also take fun name and arguments 2019-02-26 15:01:27 +01:00
Ulf Norell
cc3e322179 new version of to_sophia_value
takes function name and binary blob
2019-02-26 14:34:57 +01:00
Ulf Norell
dc4a2ca2f9 tests for aeso:compiler:to_sophia_value/2 2019-02-25 14:24:16 +01:00
Ulf Norell
367f87b612 Implement namespaces
This includes a massive refactoring of the type checker, getting
rid of most of the ets tables and keeping a proper environment.
2019-02-08 14:16:06 +01:00
Robert Virding
d4d02fd576 First test work commit, don't touch 2018-12-22 01:23:40 +01:00