Skip to content

Merge develop into release for 0.5.3. #5836

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 206 commits into from
Jan 22, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
206 commits
Select commit Hold shift + click to select a range
b57a36d
CMake: Use toolchain files
chfast Aug 28, 2017
43d072d
Remove Structs item from FAQ
Dec 19, 2018
ca31a9f
Remove comments FAQ item
Dec 19, 2018
687558f
Remove real username from source tarballs.
chriseth Dec 20, 2018
ef8a679
Set version to 0.5.3
chriseth Dec 20, 2018
245ec29
Merge pull request #5704 from ethereum/bumpVersion
chriseth Dec 20, 2018
b554828
Merge pull request #5705 from ethereum/release
chriseth Dec 20, 2018
639622c
cmake: Do not depend on a C compiler to be present by explicitly stat…
Dec 19, 2018
7209cfb
Merge pull request #5700 from ethereum/wip/docs-comments-faq
chriseth Dec 20, 2018
dd49196
Merge pull request #5701 from ethereum/faq-struct
chriseth Dec 20, 2018
239026b
Update release checklist.
chriseth Dec 20, 2018
f137788
Merge pull request #5707 from ethereum/updateReleaseChecklist
chriseth Dec 20, 2018
8d9186b
Merge pull request #2836 from ethereum/cmake-toolchains
chriseth Dec 20, 2018
8825533
Merge pull request #5699 from ethereum/cmake-no-c-dependency
chriseth Dec 20, 2018
8690898
Formatting.
chriseth Dec 20, 2018
4487567
Only select directories to skip the README.
androlo Dec 20, 2018
09feb9c
Print command.
chriseth Dec 20, 2018
ac6f80b
[DOC] More details about packed encoding.
chriseth Dec 19, 2018
8a9e012
Merge pull request #5709 from ethereum/onlyDirectories
chriseth Dec 20, 2018
88c7975
Move functions to the top.
androlo Dec 20, 2018
bf93665
resolve spelling issues in the docs folder
Dec 21, 2018
444464f
Fix examples in type conversion docs
Dec 23, 2018
cc400db
fix typo in docs
spmvg Dec 30, 2018
fdd24d1
copyright year updated
chankruze Jan 1, 2019
3d64b0b
Update install_deps.sh
HaoXuan40404 Jan 3, 2019
d597b1d
Merge pull request #5733 from HaoXuan40404/patch-2
axic Jan 3, 2019
12d00d3
clarify antecedents in deprecation notices
ItsNickBarry Jan 3, 2019
c7074a3
Fixes SourceLocation extraction on multiline locations with a too lon…
Jan 7, 2019
016f77f
Merge pull request #5729 from chankruze/develop
chriseth Jan 7, 2019
f379903
Merge pull request #5698 from ethereum/chriseth-patch-2
chriseth Jan 7, 2019
9e61dba
Adds new test for SourceReferenceExtractor to extract multiline locat…
Jan 7, 2019
a0b8201
Merge pull request #5727 from spmvg/develop
chriseth Jan 7, 2019
ae107bd
Split Visibility and Getters doc
Jan 7, 2019
96d2201
Merge pull request #5731 from poiresel/docs_spelling_fixes
chriseth Jan 7, 2019
4fa2a68
Merge pull request #5720 from ethereum/docs_type_conversion
chriseth Jan 7, 2019
f7b7c59
Merge pull request #5734 from ItsNickBarry/deprecation-notices
chriseth Jan 7, 2019
aca9e58
Merge pull request #5703 from ethereum/srcTarball
axic Jan 7, 2019
c265bc4
Update to boost 1.68 for emscripten builds.
ekpyron Jan 7, 2019
17e781f
Change uid and gid for source tarball to 0:0.
ekpyron Jan 7, 2019
2e9c70a
Use rematerializer if variable is unreferenced or value is "cheap".
chriseth Dec 5, 2018
6402726
Merge pull request #5743 from ethereum/srcTarball
chriseth Jan 7, 2019
1da2c1f
Split Constant State Variables doc
Jan 7, 2019
cefc6c4
Update non-existant pragma 0.4.99 to 0.5.0
Jan 2, 2019
3631df5
Merge pull request #5620 from ethereum/rematOnlyOne
chriseth Jan 7, 2019
c00c069
Merge pull request #5738 from ethereum/emscriptenBoost168
chriseth Jan 7, 2019
ff7bc85
Merge pull request #5741 from ethereum/fix-5730-SourceLocation
chriseth Jan 7, 2019
b06e845
Merge pull request #5711 from ethereum/printCommandOnError
chriseth Jan 7, 2019
633228f
Merge pull request #5710 from ethereum/moveTests
chriseth Jan 7, 2019
b18c8a6
Use directories for tests.
androlo Dec 20, 2018
6e626ad
Unify json and non-json commandline tests.
chriseth Dec 20, 2018
d2105be
Move actual test files.
androlo Dec 18, 2018
ce0b7e9
Merge pull request #5745 from ethereum/docs-split-cons
chriseth Jan 7, 2019
d9910f2
Merge pull request #5732 from ethereum/pragma-update
chriseth Jan 7, 2019
8b8ccd1
Exclude included files
Jan 7, 2019
165a689
Merge pull request #5685 from androlo/develop
chriseth Jan 7, 2019
b604b87
Add AZTEK code as test.
chriseth Dec 20, 2018
9222eff
Make the dialect available everywhere.
chriseth Dec 20, 2018
9f5d34a
Merge pull request #5752 from ethereum/addDialect
chriseth Jan 7, 2019
5b73c2a
Take special functions that require literals into account.
chriseth Dec 20, 2018
ace601b
Tests.
chriseth Dec 20, 2018
937fc85
Changelog entry.
chriseth Jan 7, 2019
40e1283
Merge pull request #5713 from ethereum/addAztek
chriseth Jan 7, 2019
26d47c7
Split creating contracts
Jan 7, 2019
3503f38
Do not compile the contracts subdirectory.
chriseth Jan 7, 2019
6888e08
Merge pull request #5739 from ethereum/docs-split-create-contracts
chriseth Jan 7, 2019
a2926cd
Merge pull request #5742 from ethereum/docs-split-vis-and-get
chriseth Jan 7, 2019
ee5eac4
Split using for into new file
Jan 7, 2019
c9b2e5d
Split Function modifiers doc into smaller file
Jan 7, 2019
13cd961
Split libraries into new doc
Jan 7, 2019
f69af05
Split Abstract Contracts docs to new file
Jan 7, 2019
da1d70e
Split events docs into file
Jan 7, 2019
5ca509a
Split inheritance into new doc
Jan 7, 2019
3055ade
Merge pull request #5747 from ethereum/docs-split-events
chriseth Jan 7, 2019
139dd9f
Merge pull request #5748 from ethereum/docs-split-inheritance
chriseth Jan 7, 2019
cb4e593
Merge pull request #5749 from ethereum/docs-split-abstract
chriseth Jan 7, 2019
cc99d63
Split interfaces into new file
Jan 7, 2019
cfa1198
Merge pull request #5755 from ethereum/docs-split-using-for
chriseth Jan 7, 2019
44de865
Merge pull request #5753 from ethereum/docs-split-interfaces
chriseth Jan 7, 2019
28c25ef
Merge pull request #5756 from ethereum/docs-split-libraries
chriseth Jan 7, 2019
8da3aa1
Merge pull request #5744 from ethereum/docs-split-func-mod
chriseth Jan 7, 2019
6414d63
Merge pull request #5716 from ethereum/fixDataSizeOffset
chriseth Jan 7, 2019
f5b24a3
Make function grouper idempotent.
chriseth Jan 8, 2019
2d19903
Another ABI test case for the optimizer.
chriseth Jan 8, 2019
a0ca746
Merge pull request #5760 from ethereum/grouperIdempotent
chriseth Jan 8, 2019
884d51c
Merge pull request #5759 from ethereum/anotherBigTest
chriseth Jan 8, 2019
5b8b016
Use the block flattener.
chriseth Jan 8, 2019
60d8364
Merge pull request #5761 from ethereum/useFlattener
chriseth Jan 8, 2019
9244b8e
More code for optimizer tuning.
chriseth Jan 8, 2019
874174b
Split Value Types docs
Jan 9, 2019
47399a6
Split Reference types doc into new file
Jan 9, 2019
4cc102f
Split operators involving LValues into new doc
Jan 9, 2019
63319cf
Merge pull request #5764 from ethereum/moreTuning
chriseth Jan 9, 2019
edda79e
Variables are free with regards to code size.
chriseth Jan 9, 2019
d9c6773
Adjust inlining thresholds.
chriseth Jan 9, 2019
b7ef850
Update tests.
chriseth Jan 9, 2019
0dfd4a7
Warn about unreachable code.
ekpyron Jan 8, 2019
13bf83a
Merge pull request #5768 from ethereum/docs-split-value-types
Jan 10, 2019
31033fb
Merge pull request #5769 from ethereum/docs-split-reference-types
Jan 10, 2019
a414e13
Merge pull request #5771 from ethereum/docs-split-operators
Jan 10, 2019
a379873
Merge pull request #5774 from ethereum/variablesAreFree
chriseth Jan 10, 2019
950e193
Merge pull request #5765 from ethereum/unreachableCode
chriseth Jan 10, 2019
52fd20e
Use latest version in code snippets.
fulldecent Jan 7, 2019
e63aa03
Merge pull request #5757 from fulldecent/feature-latest-version
chriseth Jan 10, 2019
5a99623
Avoid explicit conversion from Block to Statement in CodeSize visit.
ekpyron Jan 11, 2019
94688d2
Merge pull request #5777 from ethereum/windowsCodeSizeFix
christianparpart Jan 11, 2019
06ca903
Split voting example into seperate file
Jan 14, 2019
051df31
Merge pull request #5783 from ethereum/docs-split-ex-vote
Jan 14, 2019
7bc1f1a
Split blind auction example into seperate doc
Jan 14, 2019
ea47e38
Split safe remote example into new file
Jan 14, 2019
29088c4
Split mapping types into new file
Jan 9, 2019
620cbdc
Split conversion sections into new doc
Jan 9, 2019
6d4d0a5
Merge pull request #5772 from ethereum/docs-split-conversion
Jan 14, 2019
dea9999
Merge pull request #5770 from ethereum/docs-split-mapping-types
Jan 14, 2019
dbe8875
Remove random FAQ item
Jan 9, 2019
b49f678
Remove Multi-dimensional array FAQ
Jan 9, 2019
f4ee724
Remove explicit conversion FAQ item, covered elsewhere
Dec 19, 2018
d5d9085
Merge pull request #5789 from ethereum/waq-multid-array
chriseth Jan 14, 2019
185d221
Merge pull request #5788 from ethereum/remove-rnd-faq
chriseth Jan 14, 2019
2d4951e
Merge pull request #5790 from ethereum/faq-explicit-conversion
chriseth Jan 14, 2019
b7eaa4f
Ensuring we use at least boost 1.65, build static on Xenial, and adap…
Jan 14, 2019
18cceba
Split functions docs
Jan 7, 2019
92b39b6
Merge pull request #5746 from ethereum/docs-split-functions
chriseth Jan 14, 2019
7911efb
Merge pull request #5784 from ethereum/docs-split-blind-auction
chriseth Jan 14, 2019
af12697
Merge pull request #5785 from ethereum/docs-split-safe-remote
chriseth Jan 14, 2019
0010371
Split micropayments example into seperate file
Jan 14, 2019
f9ca5b7
Merge pull request #5786 from ethereum/docs-split-micropayment
chriseth Jan 14, 2019
4c8f8e9
Disallow mismatching types in switch cases and detect duplicates by v…
ekpyron Jan 15, 2019
6146c59
Merge pull request #5793 from ethereum/switchLiteralSameValue
chriseth Jan 15, 2019
81f24f2
Add equivalent function combiner as Yul optimizer step.
ekpyron Jan 10, 2019
82453a7
Merge pull request #5787 from ethereum/boost-upgrade-and-circleci
christianparpart Jan 16, 2019
778b14d
Merge pull request #5776 from ethereum/equivalentFunctionCombiner
chriseth Jan 16, 2019
a10db05
[SMTChecker] Support basic typecast
Dec 20, 2018
b58a6a4
Remove FAQ item
Jan 16, 2019
816e23c
Remove FAQ Item
Jan 16, 2019
065c3c8
libyul: changing some AST members from shared_ptr<> to unique_ptr<>
Jan 9, 2019
eab9e58
Add call warning into main docs and remove FAQ item
Jan 16, 2019
131e231
Mention that there is no Cron in Ethereum
Jan 16, 2019
78e764e
Merge pull request #5694 from ethereum/yul-ast-unique_ptr
chriseth Jan 16, 2019
49f74a7
Merge pull request #5798 from ethereum/faq-conversion
Jan 17, 2019
6841d78
Merge pull request #5801 from ethereum/idio-contract
Jan 17, 2019
5279f9f
Update docs/units-and-global-variables.rst
erak Jan 17, 2019
72c2100
Merge pull request #5800 from ethereum/wip/faq-call
Jan 17, 2019
1f06a94
Add missing Changelog entries for Yul switch changes.
ekpyron Jan 17, 2019
d8f6634
Merge pull request #5805 from ethereum/yulSwitchChangelogFix
chriseth Jan 17, 2019
c96b760
Return TypeError is fixed point encoding is attempted.
Jan 17, 2019
83e7233
Change error message and add tests
Jan 17, 2019
ecdc00d
Set emscripten to strict mode (wrt deprecated compiler options).
ekpyron Dec 7, 2018
3f58505
Remove obsolete ETH_EMSCRIPTEN option
axic Jan 17, 2019
6de10cb
Merge pull request #5809 from ethereum/emscripten-strict
chriseth Jan 17, 2019
5baac84
Use emscripten 1.38.8 on both travis and circle.
ekpyron Jul 11, 2018
7c07e94
Merge pull request #4441 from ethereum/emscriptenBoostTest
axic Jan 17, 2019
4423721
Tests.
chriseth Jan 10, 2019
2fcfb21
Syntax for meta type information.
chriseth Jan 10, 2019
e6fee25
Code generation for access to contract code.
chriseth Jan 10, 2019
0bfdaa5
Add code access dependency.
chriseth Jan 14, 2019
4669b06
Warn if type(..).runtimeCode is used with assembly in the constructor.
chriseth Jan 15, 2019
fed56f3
Type is not reserved anymore.
chriseth Jan 15, 2019
01ad4bf
Documentation.
chriseth Jan 16, 2019
a9fa265
Add helper to show if contract can be deployed.
chriseth Jan 17, 2019
29f6aa7
Do not create a copy of the assembly.
chriseth Jan 16, 2019
2a0d4f3
Add test for content of creationCode and runtimeCode.
chriseth Jan 17, 2019
2a92403
Changelog entry.
chriseth Jan 17, 2019
6de2d92
Add SSAReverser to the yul optimiser.
ekpyron Jan 16, 2019
fd16585
Undo second SSA transformation and add more tests.
ekpyron Jan 17, 2019
29f66b2
Stabilize SSAReverser.
ekpyron Jan 17, 2019
369a368
Remove unnecessary word
tkopczynski Jan 17, 2019
3f7bb4d
Merge pull request #5814 from tkopczynski/docs-fix-remove-word
axic Jan 17, 2019
0b14d7a
Merge pull request #5807 from ethereum/fixed_point_encoding
chriseth Jan 17, 2019
0711873
Merge pull request #5794 from ethereum/ssaReverser
chriseth Jan 17, 2019
2ec997e
Merge pull request #5775 from ethereum/codeAccess
chriseth Jan 17, 2019
bda0bc8
improve packed encoding test vector
esaulpaugh Jan 18, 2019
a766efc
Add ContractDefinition::isInterface.
ekpyron Jan 17, 2019
b7a86a1
Refactor TypeChecker::visit(FunctionDefinition const&).
ekpyron Jan 17, 2019
7b75986
Merge pull request #5817 from ethereum/refactoring
axic Jan 18, 2019
870b656
Split up rule list generation further to prevent issues in browsers w…
ekpyron Jan 18, 2019
127c78e
Merge pull request #5818 from ethereum/javascriptRuleListFix
ekpyron Jan 18, 2019
a582f0b
Update to emscripten 1.38.22
axic Jan 18, 2019
272566a
CircleCI: always rebuilt boost cache after emscripten udpate
axic Jan 18, 2019
128d281
Travis: make cache dependent on emscripten version
axic Jan 18, 2019
8c97fb1
Remove boost::filesystem::weakly_canonical workaround
axic Jan 18, 2019
6a32f7e
Remove boost_multiprecision_number_compare_bug_workaround for Boost <…
axic Jan 18, 2019
b1d43a8
Add error condition if compiling with Boost <1.65
axic Jan 18, 2019
d3270bc
Merge pull request #5824 from ethereum/boost-cleanup
ekpyron Jan 19, 2019
f4130d7
Further clarify in-memory arrays
Jan 20, 2019
610ef9f
Disallow calldata structs.
ekpyron Jan 17, 2019
606c2b9
Merge pull request #5816 from esaulpaugh/develop
chriseth Jan 21, 2019
f39993c
Readd example
Jan 21, 2019
a1df27a
Merge payable FAQ item
Jan 16, 2019
da73e25
Merge pull request #5797 from ethereum/faq-array-pass
Jan 21, 2019
ea790e3
Merge pull request #5806 from ethereum/calldataStructs
chriseth Jan 21, 2019
f8e9aed
Merge pull request #5717 from ethereum/smt_typecast
chriseth Jan 21, 2019
7f8ceaa
[SMTChecker] Clear state knowledge after external function calls
Dec 20, 2018
ad20e14
Merge pull request #5827 from ethereum/idio-memory-array
axic Jan 21, 2019
ec6b660
Merge pull request #5822 from ethereum/emscripten-1.38.22
chriseth Jan 21, 2019
8f694d5
Merge pull request #5796 from ethereum/faq-send-payable
chriseth Jan 21, 2019
4c9bbd8
Patch soljson.js to provide backwards compatibility with older emscri…
chriseth Jan 21, 2019
7a69455
Provide ABI encoding options as single struct parameter.
chriseth Jan 21, 2019
05b0d32
Merge pull request #5718 from ethereum/smt_external_functions
chriseth Jan 21, 2019
f33b816
Merge pull request #5831 from ethereum/soljsonPatchBackwardsCompatible
chriseth Jan 21, 2019
7b66eb2
Merge pull request #5832 from ethereum/introduceEncodingOptions
chriseth Jan 21, 2019
43fb38a
Update changelog for release.
chriseth Jan 22, 2019
faa6698
Use v0.5.0 tag of solc-js repository for external tests.
chriseth Jan 21, 2019
d87d9a2
Merge pull request #5834 from ethereum/prepareRelease
chriseth Jan 22, 2019
fd3bdcb
Merge pull request #5833 from ethereum/use050external
chriseth Jan 22, 2019
96fae0c
Move FAQ item about truncation checks
Jan 20, 2019
0ecafe0
Merge pull request #5828 from ethereum/faq-trunc-check
chriseth Jan 22, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
16 changes: 9 additions & 7 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ version: 2
jobs:
build_emscripten:
docker:
- image: trzeci/emscripten:sdk-tag-1.37.21-64bit
- image: trzeci/emscripten:sdk-tag-1.38.22-64bit
environment:
TERM: xterm
steps:
- checkout
- restore_cache:
name: Restore Boost build
key: &boost-cache-key emscripten-boost-{{ checksum "scripts/travis-emscripten/install_deps.sh" }}{{ checksum "scripts/travis-emscripten/build_emscripten.sh" }}
key: &boost-cache-key emscripten-boost-{{ checksum "scripts/travis-emscripten/install_deps.sh" }}{{ checksum "scripts/build_emscripten.sh" }}{{ checksum "scripts/travis-emscripten/build_emscripten.sh" }}
- run:
name: Bootstrap Boost
command: |
Expand All @@ -54,7 +54,7 @@ jobs:
name: Save Boost build
key: *boost-cache-key
paths:
- boost_1_67_0
- boost_1_68_0
- store_artifacts:
path: build/libsolc/soljson.js
destination: soljson.js
Expand Down Expand Up @@ -104,7 +104,7 @@ jobs:
test/externalTests.sh /tmp/workspace/soljson.js || test/externalTests.sh /tmp/workspace/soljson.js
build_x86_linux:
docker:
- image: buildpack-deps:artful
- image: buildpack-deps:bionic
environment:
TERM: xterm
COVERAGE: "ON"
Expand Down Expand Up @@ -212,7 +212,7 @@ jobs:

test_check_style:
docker:
- image: buildpack-deps:artful
- image: buildpack-deps:bionic
steps:
- checkout
- run:
Expand All @@ -238,7 +238,7 @@ jobs:

test_x86_linux:
docker:
- image: buildpack-deps:artful
- image: buildpack-deps:bionic
environment:
TERM: xterm
steps:
Expand Down Expand Up @@ -315,7 +315,9 @@ jobs:

docs:
docker:
- image: buildpack-deps:artful
- image: buildpack-deps:bionic
environment:
DEBIAN_FRONTEND: noninteractive
steps:
- checkout
- run:
Expand Down
14 changes: 12 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,14 +114,24 @@ matrix:
before_install:
- nvm install 8
- nvm use 8
- docker pull trzeci/emscripten:sdk-tag-1.37.21-64bit
- docker pull trzeci/emscripten:sdk-tag-1.38.22-64bit
env:
- SOLC_EMSCRIPTEN=On
- SOLC_INSTALL_DEPS_TRAVIS=Off
- SOLC_RELEASE=Off
- SOLC_TESTS=Off
- ZIP_SUFFIX=emscripten
- SOLC_STOREBYTECODE=On
# Travis doesn't seem to support "dynamic" cache keys where we could include
# the hashes of certain files. Our CircleCI configuration contains the hash of
# relevant emscripten files.
#
# It is important to invalidate the cache with each emscripten update, because
# dependencies, such as boost, might be broken otherwise.
#
# This key here has no significant on anything, apart from caching. Please keep
# it in sync with the version above.
- EMSCRIPTEN_VERSION_KEY="1.38.22"

# OS X Mavericks (10.9)
# https://en.wikipedia.org/wiki/OS_X_Mavericks
Expand Down Expand Up @@ -177,7 +187,7 @@ git:
cache:
ccache: true
directories:
- boost_1_67_0
- boost_1_68_0
- $HOME/.local

install:
Expand Down
6 changes: 4 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@ cmake_minimum_required(VERSION 3.0.0)
set(ETH_CMAKE_DIR "${CMAKE_CURRENT_LIST_DIR}/cmake" CACHE PATH "The the path to the cmake directory")
list(APPEND CMAKE_MODULE_PATH ${ETH_CMAKE_DIR})

include(EthToolchains)

# Set cmake_policies
include(EthPolicy)
eth_policy()

# project name and version should be set after cmake_policy CMP0048
set(PROJECT_VERSION "0.5.2")
project(solidity VERSION ${PROJECT_VERSION})
set(PROJECT_VERSION "0.5.3")
project(solidity VERSION ${PROJECT_VERSION} LANGUAGES CXX)

option(LLL "Build LLL" OFF)
option(SOLC_LINK_STATIC "Link solc executable statically on supported platforms" OFF)
Expand Down
25 changes: 25 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
### 0.5.3 (2019-01-22)

Language Features:
* Provide access to creation and runtime code of contracts via ``type(C).creationCode`` / ``type(C).runtimeCode``.


Compiler Features:
* Control Flow Graph: Warn about unreachable code.
* SMTChecker: Support basic typecasts without truncation.
* SMTChecker: Support external function calls and erase all knowledge regarding storage variables and references.


Bugfixes:
* Emscripten: Split simplification rule initialization up further to work around issues with soljson.js in some browsers.
* Type Checker: Disallow calldata structs until implemented.
* Type Checker: Return type error if fixed point encoding is attempted instead of throwing ``UnimplementedFeatureError``.
* Yul: Check that arguments to ``dataoffset`` and ``datasize`` are literals at parse time and properly take this into account in the optimizer.
* Yul: Parse number literals for detecting duplicate switch cases.
* Yul: Require switch cases to have the same type.


Build System:
* Emscripten: Upgrade to emscripten 1.38.8 on travis and circleci.


### 0.5.2 (2018-12-19)

Language Features:
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ that run on the Ethereum Virtual Machine. Smart contracts are programs that are
network where nobody has special authority over the execution and thus they allow to implement tokens of value,
ownership, voting and other kinds of logics.

When deploying contracts, you should use the latest released version of Solidity. This is because breaking changes as well as new features and bug fixes are introduced regularly. We currently use a 0.x version number [to indicate this fast pace of change](https://semver.org/#spec-item-4).

## Build and Install

Instructions about how to build and install the Solidity compiler can be found in the [Solidity documentation](https://solidity.readthedocs.io/en/latest/installing-solidity.html#building-from-source)
Expand All @@ -29,7 +31,7 @@ Instructions about how to build and install the Solidity compiler can be found i
A "Hello World" program in Solidity is of even less use than in other languages, but still:

```
pragma solidity ^0.4.16;
pragma solidity ^0.5.0;

contract HelloWorld {
function helloWorld() external pure returns (string memory) {
Expand Down
8 changes: 5 additions & 3 deletions ReleaseChecklist.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@ Checklist for making a release:
- [ ] Check that all issues and pull requests from the Github project to be released are merged to ``develop``.
- [ ] Create a commit in ``develop`` that updates the ``Changelog`` to include a release date (run ``./scripts/tests.sh`` to update the bug list). Sort the changelog entries alphabetically and correct any errors you notice.
- [ ] Create a pull request and wait for the tests, merge it.
- [ ] Thank voluntary contributors in the Github release page (use ``git shortlog -s -n -e origin/release..origin/develop``).
- [ ] Create a pull request from ``develop`` to ``release``, wait for the tests, then merge it.
- [ ] Make a final check that there are no platform-dependency issues in the ``solc-test-bytecode`` repository.
- [ ] Make a final check that there are no platform-dependency issues in the ``solidity-test-bytecode`` repository.
- [ ] Wait for the tests for the commit on ``release``, create a release in Github, creating the tag.
- [ ] Thank voluntary contributors in the Github release page (use ``git shortlog -s -n -e origin/release..origin/develop``).
- [ ] Wait for the CI runs on the tag itself (they should push artifacts onto the Github release page).
- [ ] Run ``scripts/create_source_tarball.sh`` while being on the tag to create the source tarball.
- [ ] Upload the source tarball (in the upload directory) to the release page.
- [ ] Run ``scripts/release_ppa.sh release`` to create the PPA release (you need the relevant openssl key).
- [ ] Once the ``~ethereum/ubuntu/ethereum-static`` PPA build is finished and published for all platforms (make sure not to do this earlier), copy the static package to the ``~ethereum/ubuntu/ethereum`` PPA for the destination series ``Trusty`` while selecting ``Copy existing binaries``.
- [ ] Once the ``~ethereum/ubuntu/ethereum-static`` PPA build is finished and published for all platforms (make sure not to do this earlier), copy the static package to the ``~ethereum/ubuntu/ethereum`` PPA for the destination series ``Trusty`` and ``Xenial`` while selecting ``Copy existing binaries``.
- [ ] Check that the Docker release was pushed to Docker Hub (this still seems to have problems, run ``./scripts/docker_deploy_manual.sh release``).
- [ ] Update the homebrew realease in https://github.com/ethereum/homebrew-ethereum/blob/master/solidity.rb (version and hash)
- [ ] Update the default version on readthedocs.
Expand Down
19 changes: 9 additions & 10 deletions cmake/EthCompilerSettings.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ endif()
eth_add_cxx_compiler_flag_if_supported(-Wimplicit-fallthrough)

if (("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang"))

# Use ISO C++14 standard language.
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")

# Enables all the warnings about constructions that some users consider questionable,
# and that are easy to avoid. Also enable some extra warning flags that are not
# enabled by -Wall. Finally, treat at warnings-as-errors, which forces developers
Expand Down Expand Up @@ -78,10 +74,8 @@ if (("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" MA
# into errors, which makes sense.
# http://stackoverflow.com/questions/21617158/how-to-silence-unused-command-line-argument-error-with-clang-without-disabling-i
add_compile_options(-Qunused-arguments)
endif()

if (EMSCRIPTEN)
# Do not emit a separate memory initialiser file
elseif(EMSCRIPTEN)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --memory-init-file 0")
# Leave only exported symbols as public and aggressively remove others
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdata-sections -ffunction-sections -Wl,--gc-sections -fvisibility=hidden")
Expand All @@ -104,7 +98,13 @@ if (("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" MA
# Abort if linking results in any undefined symbols
# Note: this is on by default in the CMake Emscripten module which we aren't using
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s ERROR_ON_UNDEFINED_SYMBOLS=1")
add_definitions(-DETH_EMSCRIPTEN=1)
# Disallow deprecated emscripten build options.
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s STRICT=1")
# Export the Emscripten-generated auxiliary methods which are needed by solc-js.
# Which methods of libsolc itself are exported is specified in libsolc/CMakeLists.txt.
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s EXTRA_EXPORTED_RUNTIME_METHODS=['cwrap','addFunction','removeFunction','Pointer_stringify','lengthBytesUTF8','_malloc','stringToUTF8','setValue']")
# Do not build as a WebAssembly target - we need an asm.js output.
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s WASM=0")
endif()
endif()

Expand Down Expand Up @@ -166,9 +166,8 @@ option(USE_CVC4 "Allow compiling with CVC4 SMT solver integration" ON)
if (("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang"))
option(USE_LD_GOLD "Use GNU gold linker" ON)
if (USE_LD_GOLD)
execute_process(COMMAND ${CMAKE_C_COMPILER} -fuse-ld=gold -Wl,--version ERROR_QUIET OUTPUT_VARIABLE LD_VERSION)
execute_process(COMMAND ${CMAKE_CXX_COMPILER} -fuse-ld=gold -Wl,--version ERROR_QUIET OUTPUT_VARIABLE LD_VERSION)
if ("${LD_VERSION}" MATCHES "GNU gold")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fuse-ld=gold")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fuse-ld=gold")
endif ()
endif ()
Expand Down
5 changes: 4 additions & 1 deletion cmake/EthDependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ function(eth_show_dependency DEP NAME)
get_property(DISPLAYED GLOBAL PROPERTY ETH_${DEP}_DISPLAYED)
if (NOT DISPLAYED)
set_property(GLOBAL PROPERTY ETH_${DEP}_DISPLAYED TRUE)
if (NOT("${${DEP}_VERSION}" STREQUAL ""))
message(STATUS "${NAME} version: ${${DEP}_VERSION}")
endif()
message(STATUS "${NAME} headers: ${${DEP}_INCLUDE_DIRS}")
message(STATUS "${NAME} lib : ${${DEP}_LIBRARIES}")
if (NOT("${${DEP}_DLLS}" STREQUAL ""))
Expand Down Expand Up @@ -38,6 +41,6 @@ set(ETH_SCRIPTS_DIR ${ETH_CMAKE_DIR}/scripts)
set(Boost_USE_MULTITHREADED ON)
option(Boost_USE_STATIC_LIBS "Link Boost statically" ON)

find_package(Boost 1.54.0 QUIET REQUIRED COMPONENTS regex filesystem unit_test_framework program_options system)
find_package(Boost 1.65.0 QUIET REQUIRED COMPONENTS regex filesystem unit_test_framework program_options system)

eth_show_dependency(Boost boost)
8 changes: 8 additions & 0 deletions cmake/EthToolchains.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
if(NOT CMAKE_TOOLCHAIN_FILE)
# Use default toolchain file if none is provided.
set(
CMAKE_TOOLCHAIN_FILE
"${CMAKE_CURRENT_LIST_DIR}/toolchains/default.cmake"
CACHE FILEPATH "The CMake toolchain file"
)
endif()
1 change: 0 additions & 1 deletion cmake/jsoncpp.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ ExternalProject_Add(jsoncpp-project
URL_HASH SHA256=c49deac9e0933bcb7044f08516861a2d560988540b23de2ac1ad443b219afdb6
CMAKE_COMMAND ${JSONCPP_CMAKE_COMMAND}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
-DCMAKE_INSTALL_LIBDIR=lib
# Build static lib but suitable to be included in a shared lib.
Expand Down
4 changes: 4 additions & 0 deletions cmake/toolchains/default.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Require C++14.
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
set(CMAKE_CXX_EXTENSIONS OFF)
2 changes: 2 additions & 0 deletions cmake/toolchains/emscripten.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include("${CMAKE_CURRENT_LIST_DIR}/default.cmake")
include("$ENV{EMSCRIPTEN}/cmake/Modules/Platform/Emscripten.cmake")
10 changes: 5 additions & 5 deletions docs/050-breaking-changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ Command Line and JSON Interfaces
the first 36 hex characters of the keccak256 hash of the fully qualified
library name, surrounded by ``$...$``. Previously,
just the fully qualified library name was used.
This recudes the chances of collisions, especially when long paths are used.
This reduces the chances of collisions, especially when long paths are used.
Binary files now also contain a list of mappings from these placeholders
to the fully qualified names.

Expand Down Expand Up @@ -308,7 +308,7 @@ This will no longer compile with Solidity v0.5.0. However, you can define a comp

::

pragma solidity >0.4.99 <0.6.0;
pragma solidity ^0.5.0;
interface OldContract {
function someOldFunction(uint8 a) external;
function anotherOldFunction() external returns (bool);
Expand All @@ -325,7 +325,7 @@ Given the interface defined above, you can now easily use the already deployed p

::

pragma solidity >0.4.99 <0.6.0;
pragma solidity ^0.5.0;

interface OldContract {
function someOldFunction(uint8 a) external;
Expand All @@ -345,7 +345,7 @@ commandline compiler for linking):

::

pragma solidity >0.4.99 <0.6.0;
pragma solidity ^0.5.0;

library OldLibrary {
function someFunction(uint8 a) public returns(bool);
Expand Down Expand Up @@ -430,7 +430,7 @@ New version:

::

pragma solidity >0.4.99 <0.6.0;
pragma solidity ^0.5.0;

contract OtherContract {
uint x;
Expand Down
34 changes: 21 additions & 13 deletions docs/abi-spec.rst
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ For example,

::

pragma solidity >0.4.99 <0.6.0;
pragma solidity ^0.5.0;

contract Test {
constructor() public { b = hex"12345678901234567890123456789012"; }
Expand Down Expand Up @@ -597,7 +597,7 @@ Strict encoding mode is the mode that leads to exactly the same encoding as defi
This means offsets have to be as small as possible while still not creating overlaps in the data areas and thus no gaps are
allowed.

Usually, ABI decoders are written in a straigthforward way just following offset pointers, but some decoders
Usually, ABI decoders are written in a straightforward way just following offset pointers, but some decoders
might enforce strict mode. The Solidity ABI decoder currently does not enforce strict mode, but the encoder
always creates data in strict mode.

Expand All @@ -609,22 +609,30 @@ Through ``abi.encodePacked()``, Solidity supports a non-standard packed mode whe
- types shorter than 32 bytes are neither zero padded nor sign extended and
- dynamic types are encoded in-place and without the length.

As an example encoding ``int8, bytes1, uint16, string`` with values ``-1, 0x42, 0x2424, "Hello, world!"`` results in:
This packed mode is mainly used for indexed event parameters.

As an example, the encoding of ``int16(-1), bytes1(0x42), uint16(0x03), string("Hello, world!")`` results in:

.. code-block:: none

0xff42242448656c6c6f2c20776f726c6421
^^ int8(-1)
^^ bytes1(0x42)
^^^^ uint16(0x2424)
^^^^^^^^^^^^^^^^^^^^^^^^^^ string("Hello, world!") without a length field
0xffff42000348656c6c6f2c20776f726c6421
^^^^ int16(-1)
^^ bytes1(0x42)
^^^^ uint16(0x03)
^^^^^^^^^^^^^^^^^^^^^^^^^^ string("Hello, world!") without a length field

More specifically:
- Each value type takes as many bytes as its range has.
- The encoding of a struct or fixed-size array is the concatenation of the
encoding of its members/elements without any separator or padding.
- Mapping members of structs are ignored as usual.
- Dynamically-sized types like ``string``, ``bytes`` or ``uint[]`` are encoded without
their length field.

More specifically, each statically-sized type takes as many bytes as its range has
and dynamically-sized types like ``string``, ``bytes`` or ``uint[]`` are encoded without
their length field. This means that the encoding is ambiguous as soon as there are two
dynamically-sized elements.
In general, the encoding is ambiguous as soon as there are two dynamically-sized elements,
because of the missing length field.

If padding is needed, explicit type conversions can be used: ``abi.encodePacked(uint16(0x12)) == hex"0012"``.

Since packed encoding is not used when calling functions, there is no special support
for prepending a function selector.
for prepending a function selector. Since the encoding is ambiguous, there is no decoding function.
2 changes: 1 addition & 1 deletion docs/bugs.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
{
"name": "DelegateCallReturnValue",
"summary": "The low-level .delegatecall() does not return the execution outcome, but converts the value returned by the functioned called to a boolean instead.",
"description": "The return value of the low-level .delegatecall() function is taken from a position in memory, where the call data or the return data resides. This value is interpreted as a boolean and put onto the stack. This means if the called function returns at least 32 zero bytes, .delegatecall() returns false even if the call was successuful.",
"description": "The return value of the low-level .delegatecall() function is taken from a position in memory, where the call data or the return data resides. This value is interpreted as a boolean and put onto the stack. This means if the called function returns at least 32 zero bytes, .delegatecall() returns false even if the call was successful.",
"introduced": "0.3.0",
"fixed": "0.4.15",
"severity": "low"
Expand Down
4 changes: 4 additions & 0 deletions docs/bugs_by_version.json
Original file line number Diff line number Diff line change
Expand Up @@ -620,5 +620,9 @@
"0.5.2": {
"bugs": [],
"released": "2018-12-19"
},
"0.5.3": {
"bugs": [],
"released": "2019-01-22"
}
}
Loading