From 26a5a3b8ad6e45703df33e06f2a8e7a4b36990ac Mon Sep 17 00:00:00 2001 From: Hans Svensson Date: Tue, 10 Sep 2019 11:31:09 +0200 Subject: [PATCH 1/2] implement option pp_assembler for FATE --- src/aeso_compiler.erl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/aeso_compiler.erl b/src/aeso_compiler.erl index 393a522..4fc00c8 100644 --- a/src/aeso_compiler.erl +++ b/src/aeso_compiler.erl @@ -105,7 +105,7 @@ from_string1(aevm, ContractString, Options) -> #{icode := Icode} = string_to_code(ContractString, Options), TypeInfo = extract_type_info(Icode), Assembler = assemble(Icode, Options), - pp_assembler(Assembler, Options), + pp_assembler(aevm, Assembler, Options), ByteCodeList = to_bytecode(Assembler, Options), ByteCode = << << B:8 >> || B <- ByteCodeList >>, pp_bytecode(ByteCode, Options), @@ -120,6 +120,7 @@ from_string1(aevm, ContractString, Options) -> from_string1(fate, ContractString, Options) -> #{fcode := FCode} = string_to_code(ContractString, Options), FateCode = aeso_fcode_to_fate:compile(FCode, Options), + pp_assembler(fate, FateCode, Options), ByteCode = aeb_fate_code:serialize(FateCode, []), {ok, Version} = version(), {ok, #{byte_code => ByteCode, @@ -532,9 +533,11 @@ pp_sophia_code(C, Opts)-> pp(C, Opts, pp_sophia_code, fun(Code) -> pp_ast(C, Opts) -> pp(C, Opts, pp_ast, fun aeso_ast:pp/1). pp_typed_ast(C, Opts)-> pp(C, Opts, pp_typed_ast, fun aeso_ast:pp_typed/1). pp_icode(C, Opts) -> pp(C, Opts, pp_icode, fun aeso_icode:pp/1). -pp_assembler(C, Opts)-> pp(C, Opts, pp_assembler, fun aeb_asm:pp/1). pp_bytecode(C, Opts) -> pp(C, Opts, pp_bytecode, fun aeb_disassemble:pp/1). +pp_assembler(aevm, C, Opts) -> pp(C, Opts, pp_assembler, fun aeb_asm:pp/1); +pp_assembler(fate, C, Opts) -> pp(C, Opts, pp_assembler, fun(Asm) -> io:format("~s", [aeb_fate_asm:pp(Asm)]) end). + pp(Code, Options, Option, PPFun) -> case proplists:lookup(Option, Options) of {Option, true} -> From d455671e247bad618a89fd6042e7b6f1f6800bca Mon Sep 17 00:00:00 2001 From: Hans Svensson Date: Tue, 10 Sep 2019 15:14:19 +0200 Subject: [PATCH 2/2] Prepare v4.0.0-rc3 --- CHANGELOG.md | 24 +++++++++++++++++++++--- rebar.config | 4 ++-- rebar.lock | 2 +- src/aesophia.app.src | 2 +- 4 files changed, 25 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e693f8d..ae3e0c0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,11 +6,28 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] ### Added -- Added the `[a..b]` language construct, returning the list of numbers between - `a` and `b` (inclusive). Returns the empty list if `a` > `b`. ### Changed ### Removed +## [4.0.0-rc3] - 2019-09-10 +### Added +- `Bytes.concat` and `Bytes.split` are added to be able to + (de-)construct byte arrays. +- `[a..b]` language construct, returning the list of numbers between + `a` and `b` (inclusive). Returns the empty list if `a` > `b`. +- [Standard libraries] (https://github.com/aeternity/protocol/blob/master/contracts/sophia_stdlib.md) +- Checks that `init` is not called from other functions. +### Changed +- Error messages are changed into a uniform format, and more helpful + messages have been added. +- `Crypto.` and `String.` for byte arrays now only + hash the actual byte array - not the internal ABI format. +- More strict checks for polymorphic oracles and higher order oracles + and entrypoints. +- `AENS.claim` is updated with a `NameFee` field - to be able to do + name auctions within contracts. +### Removed + ## [4.0.0-rc1] - 2019-08-22 ### Added - FATE backend - the compiler is able to produce VM code for both `AEVM` and `FATE`. Many @@ -136,7 +153,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Simplify calldata creation - instead of passing a compiled contract, simply pass a (stubbed) contract string. -[Unreleased]: https://github.com/aeternity/aesophia/compare/v4.0.0-rc1...HEAD +[Unreleased]: https://github.com/aeternity/aesophia/compare/v4.0.0-rc3...HEAD +[4.0.0-rc3]: https://github.com/aeternity/aesophia/compare/v4.0.0-rc1...v4.0.0-rc3 [4.0.0-rc1]: https://github.com/aeternity/aesophia/compare/v3.2.0...v4.0.0-rc1 [3.2.0]: https://github.com/aeternity/aesophia/compare/v3.1.0...v3.2.0 [3.1.0]: https://github.com/aeternity/aesophia/compare/v3.0.0...v3.1.0 diff --git a/rebar.config b/rebar.config index befd980..970aba2 100644 --- a/rebar.config +++ b/rebar.config @@ -2,7 +2,7 @@ {erl_opts, [debug_info]}. -{deps, [ {aebytecode, {git, "https://github.com/aeternity/aebytecode.git", {ref,"17c9656"}}} +{deps, [ {aebytecode, {git, "https://github.com/aeternity/aebytecode.git", {ref,"a66dc0a"}}} , {getopt, "1.0.1"} , {eblake2, "1.0.0"} , {jsx, {git, "https://github.com/talentdeficit/jsx.git", @@ -15,7 +15,7 @@ {base_plt_apps, [erts, kernel, stdlib, crypto, mnesia]} ]}. -{relx, [{release, {aesophia, "4.0.0-rc1"}, +{relx, [{release, {aesophia, "4.0.0-rc3"}, [aesophia, aebytecode, getopt]}, {dev_mode, true}, diff --git a/rebar.lock b/rebar.lock index 00572a9..3a272d5 100644 --- a/rebar.lock +++ b/rebar.lock @@ -1,7 +1,7 @@ {"1.1.0", [{<<"aebytecode">>, {git,"https://github.com/aeternity/aebytecode.git", - {ref,"17c9656f5ca60f6522d598aaf2999660030f8664"}}, + {ref,"a66dc0a97facdeaad7e5403018ad195d989e4793"}}, 0}, {<<"aeserialization">>, {git,"https://github.com/aeternity/aeserialization.git", diff --git a/src/aesophia.app.src b/src/aesophia.app.src index 7ac1266..96f5473 100644 --- a/src/aesophia.app.src +++ b/src/aesophia.app.src @@ -1,6 +1,6 @@ {application, aesophia, [{description, "Contract Language for aeternity"}, - {vsn, "4.0.0-rc1"}, + {vsn, "4.0.0-rc3"}, {registered, []}, {applications, [kernel,