Releases: ethereum/solidity
Version 0.3.1
This release mainly introduces inline assembly (documentation). Inline assembly provides a way to write low-level but still well readable code. Together with the coming features of inline library functions and templates, it allows to move much of the development that had to be done in the compiler itself into libraries written in Solidity. In the future, it will be possible to introduce new versatile types that still look like builtins.
Features:
- inline assembly
Fixes:
- Code generation: array access with narrow types did not clean higher order bits
- Error reporting: error reporting with unknown source location caused a crash
note: The source below cannot be used without the dependent repositories.
Version 0.3.0 (includes breaking changes)
This version is synchronized to the Homestead changes on the main Ethereum network and introduces various breaking changes.
BREAKING CHANGES:
- You should not rely on division for literals resulting in a (truncated) integer. This is still the case but will change once we implement fixed point types, i.e. in the future
1/2 == 0.5
will be true, currently we have1/2 == 0
. Note that this only applies to literals ((2 + 7) / 2
) and not variables (x / 2
). - Library calls now default to use DELEGATECALL (e.g. called library functions see the same value as the calling function for
msg.value
andmsg.sender
). - Added new keywords
assembly
,fixed
,ufixed
,fixedNxM
,ufixedNxM
(for various values of M and N),inline
in preparation for future features.
Features:
<address>.delegatecall
is provided as a low-level calling interface for DELEGATECALL
Bugfixes:
- Fixed a bug in the optimizer that resulted in comparisons being wrong.
note: The source below cannot be used without the dependent repositories.
Version 0.2.2
Features:
- Index access for types
bytes1
, ...,bytes32
(only read access for now).
Bugfixes:
- Type checker crash for wrong number of base constructor parameters.
note: The source below cannot be used without the dependent repositories.
Version 0.2.1
This release includes three major features and one very important bugfix in the optimizer.
In some situations, the optimizer generated incorrect code. Please always test your code before you use it, unfortunately, we can never guarantee 100% correctness.
We are especially grateful about the many voluntary community contributions this release received.
Two fearless individuals dived deep into the solidity code and delivered two major features: Thanks a lot to @VoR0220 for the inline arrays and to @guanqun for the ternary operator!
Furthermore, @bobsummerwill spent a lot of free time handling build issues on MacOS and other platforms.
Other contributions came from @axic, @chfast, @ethers, @janx, @pipermerriam and @u2.
Features:
- Inline arrays, i.e.
var y = [1,x,f()];
if there is a common type for1
,x
andf()
. Note that the result is always a fixed-length memory array and conversion to dynamic-length memory arrays is not yet possible. - Import similar to ECMAScript6 import (
import "abc.sol" as d
andimport {x, y} from "abc.sol"
). Documentation - Commandline compiler solc automatically resolves missing imports and allows for "include directories". Documentation
- Conditional / ternary operator:
x ? y : z
Fixed bugs:
- Several bugs where the optimizer generated invalid code.
- Enums and structs were not accessible to other contracts.
- Fixed segfault connected to function paramater types, appeared during gas estimation.
- Type checker crash for wrong number of base constructor parameters.
- Allow function overloads with different array types.
- Allow assignments of type
(x) = 7
. - Type
uint176
was not available. - Fixed crash during type checking concerning constructor calls.
- Fixed crash during code generation concerning invalid accessors for struct types.
- Fixed crash during code generating concerning computing a hash of a struct type.
note: The source below cannot be used without the dependent repositories.
Version 0.2.0 (breaking change)
Features:
- Allocation of memory arrays using
new
. - Binding library functions to types via
using x for y
- Breaking Change:
new ContractName.value(10)()
has to be written as(new ContractName).value(10)()
- Added
selfdestruct
as an alias forsuicide
.
Bugfixes:
- Constructor arguments of fixed array type were not read correctly.
- Memory allocation of structs containing arrays or strings.
- Data location for explicit memory parameters in libraries was set to storage.
The two main features of this release is the ability to create memory arrays (of dynamic length) and to
attach library functions to types. The latter provides a way to make elegant use of complex data types in the way we are used to from other languages and paves the way to creating an extensive and easy to use standard library. The next step into that direction is the introduction of a clean module system.
note: The source below cannot be used without the dependent repositories.
Version 0.1.7
Features:
- Improved error messages for unexpected tokens.
- Proof-of-concept transcompilation to why3 for formal verification of contracts.
Bugfixes:
- Writing to elements of
bytes
orstring
overwrite others. - Arrays (also strings) as indexed parameters of events.
- "Successor block not found" on Windows.
- Using string literals in tuples.
- Cope with invalid commit hash in version for libraries.
- Some test framework fixes on windows.
Note: The source code download automatically generated by github below is not usable due to the way the repositories are laid out.
Version 0.1.6
Features:
.push()
for dynamic storage arrays.- Tuple expressions (
(1,2,3)
orreturn (1,2,3);
) - Declaration and assignment of multiple variables (
var (x,y,) = (1,2,3,4,5);
orvar (x,y) = f();
) - Destructuring assignment (
(x,y,) = (1,2,3)
) - Handling of multiple source files in the json compiler.
Bugfixes:
- Internal error about usage of library function with invalid types.
- Correctly parse
Library.structType a
at statement level. - Correctly report source locations of parenthesized expressions (as part of "tuple" story).
Version 0.1.5
Changes:
- Breaking change in storage encoding: Encode short byte arrays and strings together with their length in storage.
- Report warnings.
- Allow storage reference types for public library functions.
- Access to types declared in other contracts and libraries via
.
. - Version stamp at beginning of runtime bytecode of libraries.
- Bugfix: Problem with initialized string state variables and dynamic data in constructor.
- Bugfix: Resolve dependencies concerning
new
automatically. - Bugfix: Allow four indexed arguments for anonymous events.
- Bugfix: Detect too large integer constants in functions that accept arbitrary parameters.
Version 0.1.4
Changes:
- Bugfix: combined-json output of solc incorrectly returned the runtime binary instead of the binary.
- Bugfix: Accessing fixed-size array return values.
- Bugfix: Disallow assignment from literal strings to storage pointers.
- Refactoring: Move type checking into its own module.
Version 0.1.3
Changes:
throw
statement.- Libraries that contain functions which are called via CALLCODE.
- Linker stage for compiler to insert other contract's addresses (used for libraries).
- Compiler option to output runtime part of contracts.
- Compile-time out of bounds check for access to fixed-size arrays by integer constants.
- Version string includes libevmasm/libethereum's version (contains the optimizer).
- Bugfix: Accessors for constant public state variables.
- Bugfix: Propagate exceptions in clone contracts.
- Bugfix: Empty single-line comments are now treated properly.
- Bugfix: Properly check the number of indexed arguments for events.
- Bugfix: Strings in struct constructors.