828 Commits

Author SHA1 Message Date
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
Ulf Norell
3a7c8f905a Fix incorrect type specs
h/t OTP-21 dialyzer
2019-01-28 14:54:34 +01:00
Hans Svensson
9026e1fe6b
Merge pull request #18 from aeternity/minor_fixing_up
Cleanup whitespace, bad typespec, and remaining enacl reference
2019-01-28 11:24:29 +01:00
Hans Svensson
f1f2b09294 Cleanup whitespace, bad typespec, and remaining enacl reference 2019-01-28 10:50:32 +01:00
Ulf Norell
53299b9b17
Merge pull request #17 from aeternity/PT-163478903-builtin-bits-type
PT-163478903 builtin bits type
2019-01-28 10:05:09 +01:00
Robert Virding
64fd91197b
Merge pull request #9 from aeternity/interface-to-sophia
PT-163063316 Interface to sophia
2019-01-25 16:20:38 +01:00
Robert Virding
a73abf8e8e Fix testing to use new error message format 2019-01-25 16:16:20 +01:00
Robert Virding
db1c0fa05a Improve pretty printing the code AST 2019-01-25 16:16:20 +01:00
Robert Virding
70ad303e16 Document the aeso_compiler module
The module doc format is loosely based on the standard erlang doc
formats.
2019-01-25 16:16:20 +01:00
Robert Virding
fe1a2758c3 Improve the interface to the compiler
It is now more consistent though we can still discuss how we want the
interface to look.
2019-01-25 16:16:20 +01:00
Ulf Norell
79de25b3a5 Fix minor bugs in compilation of bit fields 2019-01-25 16:09:31 +01:00
Ulf Norell
3e1290efaf Add Bits.all and rename Bits.zero to Bits.none 2019-01-25 16:09:31 +01:00
Ulf Norell
9c77622c7c Add set operations on bit fields (union, isect, diff) 2019-01-25 16:09:31 +01:00
Ulf Norell
a367d5040a Add builtin bit field type 2019-01-25 16:09:31 +01:00
Ulf Norell
d8bf0bda45 Remove integer bit operations 2019-01-25 16:09:31 +01:00
Hans Svensson
922107e438
Merge pull request #16 from aeternity/git_mess_up_fix
Fix git mess up
2019-01-25 10:53:06 +01:00
Hans Svensson
f133483a90 Fix git mess up 2019-01-25 10:49:36 +01:00
Hans Svensson
be42ee08ab
Merge pull request #15 from aeternity/fix_string_concat
Refactor String.concat to not shift 256 bits
2019-01-25 10:36:09 +01:00
Hans Svensson
86285a8ae0 Refactor String.concat to not shift 256 bits
Adding SafeMath to VM_AEVM_SOPHIA_2 will break String.concat otherwise.
2019-01-25 09:57:23 +01:00
Hans Svensson
c5c73097fc
Merge pull request #13 from aeternity/PT-163388694-add_native_bit_shift
Use ?SHL and ?SHR for 'bsl' and 'bsr'
2019-01-23 13:15:14 +01:00
Hans Svensson
23ccce4c22 Use ?SHL and ?SHR for 'bsl' and 'bsr' 2019-01-22 21:53:30 +01:00
Ulf Norell
387fdf5c34
Merge pull request #12 from aeternity/PT-163362624-generic-hash
PT-163362624 generic hash functions
2019-01-22 15:04:47 +01:00
Ulf Norell
f0dcda27bc Update aebytecode commit 2019-01-22 14:54:38 +01:00
Ulf Norell
5fd24fec86 Add more hash primops 2019-01-22 09:09:37 +01:00