Skip to content

Commit 5b0b510

Browse files
authored
Merge pull request #7716 from ethereum/develop
Merge develop into release for 0.5.13
2 parents 7709ece + 42338a5 commit 5b0b510

File tree

374 files changed

+14896
-9560
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

374 files changed

+14896
-9560
lines changed

.circleci/config.yml

Lines changed: 40 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -104,17 +104,6 @@ defaults:
104104
name: command line tests
105105
command: ./test/cmdlineTests.sh
106106

107-
- test_ubuntu1904: &test_ubuntu1904
108-
docker:
109-
- image: ethereum/solidity-buildpack-deps:ubuntu1904
110-
steps:
111-
- checkout
112-
- attach_workspace:
113-
at: build
114-
- run: *run_soltest
115-
- store_test_results: *store_test_results
116-
- store_artifacts: *artifacts_test_results
117-
118107
- test_ubuntu1904_clang: &test_ubuntu1904_clang
119108
docker:
120109
- image: ethereum/solidity-buildpack-deps:ubuntu1904-clang
@@ -126,7 +115,7 @@ defaults:
126115
- store_test_results: *store_test_results
127116
- store_artifacts: *artifacts_test_results
128117

129-
- test_ubuntu1904_all: &test_ubuntu1904
118+
- test_ubuntu1904: &test_ubuntu1904
130119
docker:
131120
- image: ethereum/solidity-buildpack-deps:ubuntu1904
132121
steps:
@@ -423,40 +412,61 @@ jobs:
423412

424413
b_osx:
425414
macos:
426-
xcode: "10.0.0"
415+
xcode: "11.0.0"
427416
environment:
428417
TERM: xterm
429418
CMAKE_BUILD_TYPE: Debug
430-
CMAKE_OPTIONS: -DLLL=ON
431419
steps:
432420
- checkout
421+
- restore_cache:
422+
keys:
423+
- dependencies-osx-{{ .Branch }}-{{ checksum ".circleci/config.yml" }}-{{ checksum ".circleci/osx_install_dependencies.sh" }}
433424
- run:
434425
name: Install build dependencies
435-
command: |
436-
brew unlink python
437-
brew install z3
438-
brew install boost
439-
brew install cmake
440-
brew install wget
441-
./scripts/install_obsolete_jsoncpp_1_7_4.sh
426+
command: ./.circleci/osx_install_dependencies.sh
427+
- save_cache:
428+
key: dependencies-osx-{{ .Branch }}-{{ checksum ".circleci/config.yml" }}-{{ checksum ".circleci/osx_install_dependencies.sh" }}
429+
paths:
430+
- /usr/local/bin
431+
- /usr/local/sbin
432+
- /usr/local/lib
433+
- /usr/local/include
434+
- /usr/local/Cellar
435+
- /usr/local/Homebrew
442436
- run: *run_build
443437
- store_artifacts: *artifacts_solc
444-
- persist_to_workspace: *artifacts_executables
438+
- persist_to_workspace: *artifacts_build_dir
439+
440+
t_osx_soltest:
441+
macos:
442+
xcode: "11.0.0"
443+
environment:
444+
EVM: constantinople
445+
OPTIMIZE: 0
446+
TERM: xterm
447+
steps:
448+
- checkout
449+
- restore_cache:
450+
keys:
451+
- dependencies-osx-{{ .Branch }}-{{ checksum ".circleci/config.yml" }}-{{ checksum ".circleci/osx_install_dependencies.sh" }}
452+
- attach_workspace:
453+
at: build
454+
- run: *run_soltest
455+
- store_test_results: *store_test_results
456+
- store_artifacts: *artifacts_test_results
445457

446458
t_osx_cli:
447459
macos:
448-
xcode: "10.0.0"
460+
xcode: "11.0.0"
449461
environment:
450462
TERM: xterm
451463
steps:
452464
- checkout
465+
- restore_cache:
466+
keys:
467+
- dependencies-osx-{{ .Branch }}-{{ checksum ".circleci/config.yml" }}-{{ checksum ".circleci/osx_install_dependencies.sh" }}
453468
- attach_workspace:
454469
at: build
455-
- run:
456-
name: Install dependencies
457-
command: |
458-
brew unlink python
459-
brew install z3
460470
- run: *run_cmdline_tests
461471
- store_artifacts: *artifacts_test_results
462472

@@ -568,7 +578,7 @@ jobs:
568578
environment:
569579
EVM: constantinople
570580
OPTIMIZE: 0
571-
flags: --no-smt
581+
SOLTEST_FLAGS: --no-smt
572582
ASAN_OPTIONS: check_initialization_order=true:detect_stack_use_after_return=true:strict_init_order=true:strict_string_checks=true:detect_invalid_pointer_pairs=2
573583

574584
t_ems_solcjs:
@@ -660,6 +670,7 @@ workflows:
660670
# OS/X build and tests
661671
- b_osx: *workflow_trigger_on_tags
662672
- t_osx_cli: *workflow_osx
673+
- t_osx_soltest: *workflow_osx
663674

664675
# Ubuntu build and tests
665676
- b_ubu: *workflow_trigger_on_tags

.circleci/docker/Dockerfile.clang.ubuntu1904

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,12 @@ RUN git clone --recursive -b boost-1.69.0 https://github.com/boostorg/boost.git
5757
./bootstrap.sh --with-toolset=clang --prefix=/usr; \
5858
./b2 toolset=clang headers; \
5959
./b2 toolset=clang variant=release \
60-
system regex filesystem unit_test_framework program_options \
60+
system filesystem unit_test_framework program_options \
6161
install -j $(($(nproc)/2)); \
6262
rm -rf /usr/src/boost
6363

6464
# Z3
65-
RUN git clone --depth 1 -b Z3-4.8.5 https://github.com/Z3Prover/z3.git \
65+
RUN git clone --depth 1 -b z3-4.8.6 https://github.com/Z3Prover/z3.git \
6666
/usr/src/z3; \
6767
cd /usr/src/z3; \
6868
python scripts/mk_make.py --prefix=/usr ; \

.circleci/docker/Dockerfile.ubuntu1804

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ RUN set -ex; \
3434
build-essential \
3535
software-properties-common \
3636
cmake ninja-build clang++-8 \
37-
libboost-regex-dev libboost-filesystem-dev libboost-test-dev libboost-system-dev \
37+
libboost-filesystem-dev libboost-test-dev libboost-system-dev \
3838
libboost-program-options-dev \
3939
libjsoncpp-dev \
4040
llvm-8-dev libz3-static-dev \

.circleci/docker/Dockerfile.ubuntu1904

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ RUN set -ex; \
3434
build-essential \
3535
software-properties-common \
3636
cmake ninja-build clang++-8 libc++-8-dev libc++abi-8-dev \
37-
libboost-regex-dev libboost-filesystem-dev libboost-test-dev libboost-system-dev \
37+
libboost-filesystem-dev libboost-test-dev libboost-system-dev \
3838
libboost-program-options-dev \
3939
libjsoncpp-dev \
4040
llvm-8-dev libcvc4-dev libz3-static-dev libleveldb1d \

.circleci/osx_install_dependencies.sh

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
#! /bin/bash
2+
#------------------------------------------------------------------------------
3+
# Bash script to install osx dependencies
4+
#
5+
# The documentation for solidity is hosted at:
6+
#
7+
# https://solidity.readthedocs.org
8+
#
9+
# ------------------------------------------------------------------------------
10+
# This file is part of solidity.
11+
#
12+
# solidity is free software: you can redistribute it and/or modify
13+
# it under the terms of the GNU General Public License as published by
14+
# the Free Software Foundation, either version 3 of the License, or
15+
# (at your option) any later version.
16+
#
17+
# solidity is distributed in the hope that it will be useful,
18+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
19+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20+
# GNU General Public License for more details.
21+
#
22+
# You should have received a copy of the GNU General Public License
23+
# along with solidity. If not, see <http://www.gnu.org/licenses/>
24+
#
25+
# (c) 2016-2019 solidity contributors.
26+
# ------------------------------------------------------------------------------
27+
28+
# note that the following directories may be cached by circleci:
29+
# - /usr/local/bin
30+
# - /usr/local/sbin
31+
# - /usr/local/lib
32+
# - /usr/local/include
33+
# - /usr/local/Cellar
34+
# - /usr/local/Homebrew
35+
36+
if [ ! -f /usr/local/lib/libz3.a ] # if this file does not exists (cache was not restored), rebuild dependencies
37+
then
38+
brew unlink python
39+
brew install boost
40+
brew install cmake
41+
brew install wget
42+
brew install coreutils
43+
./scripts/install_obsolete_jsoncpp_1_7_4.sh
44+
45+
# z3
46+
wget https://github.com/Z3Prover/z3/releases/download/z3-4.8.6/z3-4.8.6-x64-osx-10.14.6.zip
47+
unzip z3-4.8.6-x64-osx-10.14.6.zip
48+
rm -f z3-4.8.6-x64-osx-10.14.6.zip
49+
cp z3-4.8.6-x64-osx-10.14.6/bin/libz3.a /usr/local/lib
50+
cp z3-4.8.6-x64-osx-10.14.6/bin/z3 /usr/local/bin
51+
cp z3-4.8.6-x64-osx-10.14.6/include/* /usr/local/include
52+
rm -rf z3-4.8.6-x64-osx-10.14.6
53+
54+
# evmone
55+
wget https://github.com/ethereum/evmone/releases/download/v0.1.0/evmone-0.1.0-darwin-x86_64.tar.gz
56+
tar xzpf evmone-0.1.0-darwin-x86_64.tar.gz -C /usr/local
57+
rm -f evmone-0.1.0-darwin-x86_64.tar.gz
58+
fi
59+

.circleci/soltest.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
# EVM=version_string Specifies EVM version to compile for (such as homestead, etc)
1313
# OPTIMIZE=1 Enables backend optimizer
1414
# ABI_ENCODER_V2=1 Enables ABI encoder version 2
15+
# SOLTEST_FLAGS=<flags> Appends <flags> to default SOLTEST_ARGS
1516
#
1617
# ------------------------------------------------------------------------------
1718
# This file is part of solidity.
@@ -54,7 +55,7 @@ get_logfile_basename() {
5455
}
5556

5657
BOOST_TEST_ARGS="--color_output=no --show_progress=yes --logger=JUNIT,error,test_results/`get_logfile_basename`.xml"
57-
SOLTEST_ARGS="--evm-version=$EVM --evmonepath /usr/lib/libevmone.so $flags"
58+
SOLTEST_ARGS="--evm-version=$EVM $SOLTEST_FLAGS"
5859
test "${OPTIMIZE}" = "1" && SOLTEST_ARGS="${SOLTEST_ARGS} --optimize"
5960
test "${ABI_ENCODER_V2}" = "1" && SOLTEST_ARGS="${SOLTEST_ARGS} --abiencoderv2 --optimize-yul"
6061

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ include(EthPolicy)
1010
eth_policy()
1111

1212
# project name and version should be set after cmake_policy CMP0048
13-
set(PROJECT_VERSION "0.5.12")
13+
set(PROJECT_VERSION "0.5.13")
1414
project(solidity VERSION ${PROJECT_VERSION} LANGUAGES C CXX)
1515

1616
include(TestBigEndian)

CODING_STYLE.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ Use `solAssert` and `solUnimplementedAssert` generously to check assumptions tha
119119
4. Favour declarations close to use; don't habitually declare at top of scope ala C.
120120
5. Pass non-trivial parameters as const reference, unless the data is to be copied into the function, then either pass by const reference or by value and use std::move.
121121
6. If a function returns multiple values, use std::tuple (std::pair acceptable) or better introduce a struct type. Do not use */& arguments.
122-
7. Use parameters of pointer type only if ``nullptr`` is a valid argument, use references otherwise. Often, ``boost::optional`` is better suited than a raw pointer.
122+
7. Use parameters of pointer type only if ``nullptr`` is a valid argument, use references otherwise. Often, ``std::optional`` is better suited than a raw pointer.
123123
8. Never use a macro where adequate non-preprocessor C++ can be written.
124124
9. Only use ``auto`` if the type is very long and rather irrelevant.
125125
10. Do not pass bools: prefer enumerations instead.
@@ -135,12 +135,12 @@ enum class Accuracy
135135
};
136136
struct MeanSigma
137137
{
138-
float mean;
139-
float standardDeviation;
138+
float mean = 0.0f;
139+
float standardDeviation = 1.0f;
140140
};
141141
double const d = 0;
142-
int i;
143-
int j;
142+
int i = 0;
143+
int j = 0;
144144
char* s;
145145
MeanAndSigma ms meanAndSigma(std::vector<float> const& _v, Accuracy _a);
146146
Derived* x = dynamic_cast<Derived*>(base);

Changelog.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,30 @@
1+
### 0.5.13 (2019-11-14)
2+
3+
Language Features:
4+
* Allow to obtain the address of a linked library with ``address(LibraryName)``.
5+
6+
7+
Compiler Features:
8+
* Code Generator: Use SELFBALANCE opcode for ``address(this).balance`` if using Istanbul EVM.
9+
* EWasm: Experimental EWasm binary output via ``--ewasm`` and as documented in standard-json.
10+
* SMTChecker: Add break/continue support to the CHC engine.
11+
* SMTChecker: Support assignments to multi-dimensional arrays and mappings.
12+
* SMTChecker: Support inheritance and function overriding.
13+
* Standard JSON Interface: Output the storage layout of a contract when artifact ``storageLayout`` is requested.
14+
* TypeChecker: List possible candidates when overload resolution fails.
15+
* TypeChecker: Disallow variables of library types.
16+
17+
18+
Bugfixes:
19+
* Code Generator: Fixed a faulty assert that would wrongly trigger for array sizes exceeding unsigned integer.
20+
* SMTChecker: Fix internal error when accessing indices of fixed bytes.
21+
* SMTChecker: Fix internal error when using function pointers as arguments.
22+
* SMTChecker: Fix internal error when implicitly converting string literals to fixed bytes.
23+
* Type Checker: Disallow constructor of the same class to be used as modifier.
24+
* Type Checker: Treat magic variables as unknown identifiers in inline assembly.
25+
26+
27+
128
### 0.5.12 (2019-10-01)
229

330
Language Features:
@@ -10,6 +37,7 @@ Compiler Features:
1037
* SMTChecker: Add loop support to the CHC engine.
1138
* Yul Optimizer: Take side-effect-freeness of user-defined functions into account.
1239
* Yul Optimizer: Remove redundant mload/sload operations.
40+
* Yul Optimizer: Use the fact that branch conditions have certain value inside the branch.
1341

1442

1543
Bugfixes:

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ Please follow the
6060
[Developers Guide](https://solidity.readthedocs.io/en/latest/contributing.html)
6161
if you want to help.
6262

63+
You can find our current feature and bug priorities for forthcoming releases [in the projects section](https://github.com/ethereum/solidity/projects).
64+
6365
## Maintainers
6466
* [@axic](https://github.com/axic)
6567
* [@chriseth](https://github.com/chriseth)

0 commit comments

Comments
 (0)