Skip to content

Commit 76d3b7c

Browse files
authored
Merge pull request ethereum#2510 from ethereum/develop
Version 0.4.12
2 parents 7896936 + 2222dde commit 76d3b7c

File tree

177 files changed

+8550
-4408
lines changed

Some content is hidden

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

177 files changed

+8550
-4408
lines changed

.editorconfig

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
insert_final_newline = true
7+
trim_trailing_whitespace = true
8+
9+
[*.{cpp,h}]
10+
indent_style = tab
11+
12+
[*.{py,rst,sh,yml}]
13+
indent_style = space
14+
indent_size = 4
15+
16+
[std/**.sol]
17+
indent_style = space
18+
indent_size = 4

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,4 @@ docs/utils/__pycache__
4141
# IDE files
4242
.idea
4343
browse.VC.db
44+
CMakeLists.txt.user

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ before_script:
191191
&& scripts/create_source_tarball.sh)
192192

193193
script:
194+
- test $SOLC_EMSCRIPTEN != On || (scripts/test_emscripten.sh)
194195
- test $SOLC_DOCS != On || (scripts/docs.sh)
195196
- test $SOLC_TESTS != On || (cd $TRAVIS_BUILD_DIR && scripts/tests.sh)
196197
- test $SOLC_STOREBYTECODE != On || (cd $TRAVIS_BUILD_DIR && scripts/bytecodecompare/storebytecode.sh)

CMakeLists.txt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ include(EthPolicy)
88
eth_policy()
99

1010
# project name and version should be set after cmake_policy CMP0048
11-
set(PROJECT_VERSION "0.4.11")
11+
set(PROJECT_VERSION "0.4.12")
1212
project(solidity VERSION ${PROJECT_VERSION})
1313

1414
# Let's find our dependencies
@@ -24,6 +24,15 @@ include(EthExecutableHelper)
2424
# Include utils
2525
include(EthUtils)
2626

27+
# Create license.h from LICENSE.txt and template
28+
# Converting to char array is required due to MSVC's string size limit.
29+
file(READ ${CMAKE_SOURCE_DIR}/LICENSE.txt LICENSE_TEXT HEX)
30+
string(REGEX MATCHALL ".." LICENSE_TEXT "${LICENSE_TEXT}")
31+
string(REGEX REPLACE ";" ",\n\t0x" LICENSE_TEXT "${LICENSE_TEXT}")
32+
set(LICENSE_TEXT "0x${LICENSE_TEXT}")
33+
34+
configure_file("${CMAKE_SOURCE_DIR}/cmake/templates/license.h.in" "license.h")
35+
2736
include(EthOptions)
2837
configure_project(TESTS)
2938

Changelog.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,41 @@
1+
### 0.4.12 (2017-07-03)
2+
3+
Features:
4+
* Assembly: Add ``CREATE2`` (EIP86), ``STATICCALL`` (EIP214), ``RETURNDATASIZE`` and ``RETURNDATACOPY`` (EIP211) instructions.
5+
* Assembly: Display auxiliary data in the assembly output.
6+
* Assembly: Renamed ``SHA3`` to ``KECCAK256``.
7+
* AST: export all attributes to JSON format.
8+
* C API (``jsonCompiler``): Use the Standard JSON I/O internally.
9+
* Code Generator: Added the Whiskers template system.
10+
* Inline Assembly: ``for`` and ``switch`` statements.
11+
* Inline Assembly: Function definitions and function calls.
12+
* Inline Assembly: Introduce ``keccak256`` as an opcode. ``sha3`` is still a valid alias.
13+
* Inline Assembly: Present proper error message when not supplying enough arguments to a functional
14+
instruction.
15+
* Inline Assembly: Warn when instructions shadow Solidity variables.
16+
* Inline Assembly: Warn when using ``jump``s.
17+
* Remove obsolete Why3 output.
18+
* Type Checker: Enforce strict UTF-8 validation.
19+
* Type Checker: Warn about copies in storage that might overwrite unexpectedly.
20+
* Type Checker: Warn about type inference from literal numbers.
21+
* Static Analyzer: Warn about deprecation of ``callcode``.
22+
23+
Bugfixes:
24+
* Assembly: mark ``MLOAD`` to have side effects in the optimiser.
25+
* Code Generator: Fix ABI encoding of empty literal string.
26+
* Code Generator: Fix negative stack size checks.
27+
* Code generator: Use ``REVERT`` instead of ``INVALID`` for generated input validation routines.
28+
* Inline Assembly: Enforce function arguments when parsing functional instructions.
29+
* Optimizer: Disallow optimizations involving ``MLOAD`` because it changes ``MSIZE``.
30+
* Static Analyzer: Unused variable warnings no longer issued for variables used inside inline assembly.
31+
* Type Checker: Fix address literals not being treated as compile-time constants.
32+
* Type Checker: Fixed crash concerning non-callable types.
33+
* Type Checker: Fixed segfault with constant function parameters
34+
* Type Checker: Disallow comparisons between mapping and non-internal function types.
35+
* Type Checker: Disallow invoking the same modifier multiple times.
36+
* Type Checker: Do not treat strings that look like addresses as addresses.
37+
* Type Checker: Support valid, but incorrectly rejected UTF-8 sequences.
38+
139
### 0.4.11 (2017-05-03)
240

341
Features:

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
[![Join the chat at https://gitter.im/ethereum/solidity](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/ethereum/solidity?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
33

44
## Useful links
5-
To get started you can find an introduction to the language in the [Solidity documentation](https://solidity.readthedocs.org). In the documentation, you can find [code examples](http://solidity.readthedocs.io/en/latest/solidity-by-example.html) as well as [a reference](http://solidity.readthedocs.io/en/latest/solidity-in-depth.html) of the syntax and details on how to write smart contracts.
5+
To get started you can find an introduction to the language in the [Solidity documentation](https://solidity.readthedocs.org). In the documentation, you can find [code examples](https://solidity.readthedocs.io/en/latest/solidity-by-example.html) as well as [a reference](https://solidity.readthedocs.io/en/latest/solidity-in-depth.html) of the syntax and details on how to write smart contracts.
66

77
You can start using [Solidity in your browser](https://ethereum.github.io/browser-solidity/) with no need to download or compile anything.
88

@@ -11,9 +11,9 @@ The changelog for this project can be found [here](https://github.com/ethereum/s
1111
Solidity is still under development. So please do not hesitate and open an [issue in GitHub](https://github.com/ethereum/solidity/issues) if you encounter anything strange.
1212

1313
## Building
14-
See the [Solidity documentation](http://solidity.readthedocs.io/en/latest/installing-solidity.html#building-from-source) for build instructions.
14+
See the [Solidity documentation](https://solidity.readthedocs.io/en/latest/installing-solidity.html#building-from-source) for build instructions.
1515

1616
## How to Contribute
17-
Please see our contribution guidelines in [the Solidity documentation](http://solidity.readthedocs.io/en/latest/contributing.html).
17+
Please see our contribution guidelines in [the Solidity documentation](https://solidity.readthedocs.io/en/latest/contributing.html).
1818

1919
Any contributions are welcome!

appveyor.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ build_script:
6565
- msbuild solidity.sln /p:Configuration=%CONFIGURATION% /m:%NUMBER_OF_PROCESSORS% /v:minimal
6666
- cd %APPVEYOR_BUILD_FOLDER%
6767
- scripts\release.bat %CONFIGURATION%
68-
- scripts\bytecodecompare\storebytecode.bat %CONFIGURATION% %APPVEYOR_REPO_COMMIT%
68+
- ps: $bytecodedir = git show -s --format="%cd-%H" --date=short
69+
- ps: scripts\bytecodecompare\storebytecode.bat $Env:CONFIGURATION $bytecodedir
6970

7071
test_script:
7172
- cd %APPVEYOR_BUILD_FOLDER%

cmake/EthCompilerSettings.cmake

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ if (("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" MA
6565

6666
# Build everything as shared libraries (.so files)
6767
add_definitions(-DSHAREDLIB)
68-
68+
6969
# If supported for the target machine, emit position-independent code, suitable for dynamic
7070
# linking and avoiding any limit on the size of the global offset table.
7171
add_compile_options(-fPIC)
@@ -94,6 +94,12 @@ if (("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" MA
9494
add_compile_options(-fstack-protector)
9595
endif()
9696

97+
# Until https://github.com/ethereum/solidity/issues/2479 is handled
98+
# disable all implicit fallthrough warnings in the codebase for GCC > 7.0
99+
if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.0)
100+
add_compile_options(-Wno-implicit-fallthrough)
101+
endif()
102+
97103
# Additional Clang-specific compiler settings.
98104
elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
99105

cmake/UseDev.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ function(eth_apply TARGET REQUIRED SUBMODULE)
1010
target_link_libraries(${TARGET} ${Boost_RANDOM_LIBRARIES})
1111
target_link_libraries(${TARGET} ${Boost_FILESYSTEM_LIBRARIES})
1212
target_link_libraries(${TARGET} ${Boost_SYSTEM_LIBRARIES})
13+
target_link_libraries(${TARGET} ${Boost_REGEX_LIBRARIES})
1314

1415
if (DEFINED MSVC)
1516
target_link_libraries(${TARGET} ${Boost_CHRONO_LIBRARIES})

cmake/templates/license.h.in

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
#pragma once
2+
3+
#include <string>
4+
5+
static std::string const otherLicenses{R"(Most of the code is licensed under GPLv3 (see below), the license for individual
6+
parts are as follows:
7+
8+
libkeccak-tiny:
9+
A single-file implementation of SHA-3 and SHAKE implemented by David Leon Gil
10+
License: CC0, attribution kindly requested. Blame taken too, but not liability.
11+
12+
jsoncpp:
13+
The JsonCpp library's source code, including accompanying documentation,
14+
tests and demonstration applications, are licensed under the following
15+
conditions...
16+
17+
The JsonCpp Authors explicitly disclaim copyright in all
18+
jurisdictions which recognize such a disclaimer. In such jurisdictions,
19+
this software is released into the Public Domain.
20+
21+
In jurisdictions which do not recognize Public Domain property (e.g. Germany as of
22+
2010), this software is Copyright (c) 2007-2010 by The JsonCpp Authors, and is
23+
released under the terms of the MIT License (see below).
24+
25+
In jurisdictions which recognize Public Domain property, the user of this
26+
software may choose to accept it either as 1) Public Domain, 2) under the
27+
conditions of the MIT License (see below), or 3) under the terms of dual
28+
Public Domain/MIT License conditions described here, as they choose.
29+
30+
The MIT License is about as close to Public Domain as a license can get, and is
31+
described in clear, concise terms at:
32+
33+
http://en.wikipedia.org/wiki/MIT_License
34+
35+
The full text of the MIT License follows:
36+
37+
========================================================================
38+
Copyright (c) 2007-2010 The JsonCpp Authors
39+
40+
Permission is hereby granted, free of charge, to any person
41+
obtaining a copy of this software and associated documentation
42+
files (the "Software"), to deal in the Software without
43+
restriction, including without limitation the rights to use, copy,
44+
modify, merge, publish, distribute, sublicense, and/or sell copies
45+
of the Software, and to permit persons to whom the Software is
46+
furnished to do so, subject to the following conditions:
47+
48+
The above copyright notice and this permission notice shall be
49+
included in all copies or substantial portions of the Software.
50+
51+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
52+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
53+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
54+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
55+
BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
56+
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
57+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
58+
SOFTWARE.
59+
========================================================================
60+
(END LICENSE TEXT)
61+
62+
The MIT license is compatible with both the GPL and commercial
63+
software, affording one all of the rights of Public Domain with the
64+
minor nuisance of being required to keep the above copyright notice
65+
and license text in the source code. Note also that by accepting the
66+
Public Domain "license" you can re-license your copy using whatever
67+
license you like.
68+
69+
All other code is licensed under GPL version 3:
70+
71+
)"};
72+
73+
static char const licenseText[] = {
74+
@LICENSE_TEXT@, 0
75+
};

0 commit comments

Comments
 (0)