101 Commits

Author SHA1 Message Date
Hans Svensson
eb77a73d15 Correctly handle ArgTypes in create_calldata 2019-02-28 14:44:16 +01:00
Hans Svensson
62aa06cc3a
Merge pull request #32 from aeternity/fix_create_calldata
Fix handling of init in create_calldata
2019-02-28 10:12:15 +01:00
Hans Svensson
6d6fff2612 Better error handling when init is present but wrong 2019-02-28 09:56:16 +01:00
Hans Svensson
95bf0d4b6c Fix handling of init in create_calldata 2019-02-27 20:42:42 +01:00
Hans Svensson
e94c1f9d84
Merge pull request #30 from aeternity/to-sophia-value-revisited
To sophia value revisited
2019-02-27 11:36:03 +01:00
Hans Svensson
a263b09e57 Remove leftover io:format 2019-02-27 11:00:00 +01:00
Hans Svensson
5a3c8530b4 Dialyzer found an error 2019-02-26 21:03:52 +01:00
Ulf Norell
4c79f7b9f2 tests for calldata creation 2019-02-26 17:41:04 +01:00
Ulf Norell
e0fff00e64 get rid of byte code argument to create_calldata
This means that there is less type checking at calldata creation time.
Make sure that we check that the function hash exists before calling
a contract!
2019-02-26 17:31:53 +01:00
Hans Svensson
7c95aafbb8
Merge pull request #29 from aeternity/more_better_errors
Improve Events error message + more tests
2019-02-26 16:21:35 +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
f16d699f6d
Merge pull request #28 from aeternity/decode-vm-to-sophia
Add function to decode VM values to Sophia abstract syntax
2019-02-26 09:00:48 +01:00
Hans Svensson
7b474e439c Improve Events error message + more tests 2019-02-25 21:53:52 +01:00
Ulf Norell
eb926b1352 fix type signature 2019-02-25 14:42:47 +01:00
Ulf Norell
dc4a2ca2f9 tests for aeso:compiler:to_sophia_value/2 2019-02-25 14:24:16 +01:00
Ulf Norell
f866e24624 pretty print nullary constructor applications without the parens 2019-02-25 14:23:44 +01:00
Ulf Norell
ccad660eac add compiler function to translate a vm value to Sophia AST 2019-02-25 14:23:23 +01:00
Robert Virding
202a06a580
Merge pull request #25 from aeternity/PT-156466783-namespaces
PT-156466783 namespaces
2019-02-13 15:54:07 +01:00
Ulf Norell
b5b0d30fc4 Less hacky handling of Chain.event 2019-02-08 14:48:38 +01:00
Ulf Norell
236ef6eb89 Dialyzed! 2019-02-08 14:16:06 +01:00
Ulf Norell
aa6d56ce9b Allow passing an explicit "file system" for included files to the compiler 2019-02-08 14:16:06 +01:00
Ulf Norell
0b86cdc318 Clean up test case 2019-02-08 14:16:06 +01:00
Ulf Norell
27cbedc7ab Further generalise used names computation 2019-02-08 14:16:06 +01:00
Ulf Norell
2ac47059c1 Refactor used_ids and used_types into a generic fold 2019-02-08 14:16:06 +01:00
Hans Svensson
421bc01012 Add error messages for bad include and nested namespace 2019-02-08 14:16:06 +01:00
Hans Svensson
2b7490776e Add include directive
Add an include directive to include namespaces into a contract. Only allowed at the top level.

To allow includes, either call through aeso_compiler:file or set the option `allow_include` (and add `include_path`(s)).
2019-02-08 14:16:06 +01:00
Ulf Norell
0a5b80668f Don't mess up on multiple namespaces in icode compiler 2019-02-08 14:16:06 +01:00
Ulf Norell
6cdba58e35 Update error messages 2019-02-08 14:16:06 +01:00
Ulf Norell
8262d7780f Fix some issues pointed out by dialyzer 2019-02-08 14:16:06 +01:00
Ulf Norell
e6f01481bf Bind state and event primitives only in contracts (and with the right types) 2019-02-08 14:16:06 +01:00
Ulf Norell
d9188d58a7 Proper checking of types 2019-02-08 14:16:06 +01:00
Ulf Norell
dfa286d43c Deadcode elimination (icode post pass) 2019-02-08 14:16:06 +01:00
Ulf Norell
478da2af33 Don't expose namespace functions as entrypoints 2019-02-08 14:16:06 +01:00
Ulf Norell
10be09fe30 Add checks on event constructor arguments to type checker 2019-02-08 14:16:06 +01:00
Ulf Norell
e6c9d0fac1 Put event index information in constructor annotation instead of in argument types 2019-02-08 14:16:06 +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
Hans Svensson
026ff52528
Merge pull request #24 from aeternity/merge_roma
Merge ROMA branch to master
2019-02-08 14:13:10 +01:00
Hans Svensson
3ba89d9f55 Merge ROMA into MINERVA 2019-02-08 13:38:37 +01:00
Robert Virding
0b4c2f14fe
Move module documentation to separate files (#23) 2019-02-08 10:31:35 +01:00
Robert Virding
b65c4edd19
Merge pull request #22 from aeternity/fix-compiler-interface
Remove specific filename extension handling
2019-02-06 15:17:53 +01:00
Robert Virding
515f444e7c Remove specific filename extension handling
And take the chance to make file handling errors ahve the same format
as other errors.
2019-02-06 14:02:46 +01:00
Hans Svensson
267fef3a5b
Merge pull request #21 from aeternity/roma_standalone
Roma standalone
roma-v1
2019-01-31 09:51:56 +01:00
Hans Svensson
362373c0d7 Add escript post_hooks 2019-01-30 10:58:19 +01:00
Dincho Todorov
65b6791176 Initial CircleCI integration (#20) 2019-01-30 10:54:52 +01:00
Hans Svensson
87e5562f74 Super simple standalone version of the compiler 2019-01-29 15:25:39 +01:00
Dincho Todorov
d3fa04483e
Initial CircleCI integration (#20) 2019-01-29 15:35:41 +02:00
Ulf Norell
b8cb7ab1b5 Fix incorrect type specs
h/t OTP-21 dialyzer
2019-01-29 13:58:05 +01:00
Hans Svensson
ceb7de2119 Remove a leftover reference to enacl 2019-01-29 13:58:00 +01:00
Ulf Norell
2edafe0adc
Merge pull request #19 from aeternity/dialyzer-warnings
Fix incorrect type specs
2019-01-29 09:19:13 +01:00