From e7501540743041bd65781ef47b65c17cba4fb139 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Tue, 10 Dec 2019 15:58:01 +0000 Subject: [PATCH 1/3] Some wording fixes in the changelog --- Changelog.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Changelog.md b/Changelog.md index 4b5934301..965febce4 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,16 +1,16 @@ ### 0.6.0 (unreleased) Breaking changes: - * ABI: remove the deprecated ``constant`` and ``payable`` fields. - * ABI: the ``type`` field is now required and no longer specified to default to ``function``. - * C API (``libsolc``): the provided callback now takes two parameters, kind and data. The callback can then be used for multiple purposes, such has file imports and SMT queries. - * C API (``libsolc``): Introduce context parameter. - * Commandline interface: remove the text-based ast printer (``--ast``). - * Command line interface: Switch to the new error reporter by default. ``--old-reporter`` falls back to the deprecated old error reporter. - * Command line interface: Add option to disable or choose hash method between IPFS and Swarm for the bytecode metadata. + * ABI: Remove the deprecated ``constant`` and ``payable`` fields. + * ABI: The ``type`` field is now required and no longer specified to default to ``function``. + * C API (``libsolc``): Introduce context parameter to both ``solidity_compile`` and the callback. + * C API (``libsolc``): The provided callback now takes two parameters, kind and data. The callback can then be used for multiple purposes, such has file imports and SMT queries. + * Commandline Interface: Remove the text-based AST printer (``--ast``). + * Commandline Interface: Switch to the new error reporter by default. ``--old-reporter`` falls back to the deprecated old error reporter. + * Commandline Interface: Add option to disable or choose hash method between IPFS and Swarm for the bytecode metadata. * General: Disallow explicit conversions from external function types to ``address`` and add a member called ``address`` to them as replacement. * General: Enable Yul optimizer as part of standard optimization. - * General: New reserved keywords: ``virtual``. + * General: New reserved keyword: ``virtual``. * General: Split unnamed fallback functions into two cases defined using ``fallback()`` and ``receive()``. * Standard JSON Interface: Add option to disable or choose hash method between IPFS and Swarm for the bytecode metadata. * Syntax: ``push(element)`` for dynamic storage arrays do not return the new length anymore. @@ -18,7 +18,7 @@ Breaking changes: * Inline Assembly: Only strict inline assembly is allowed. * Inline Assembly: Variable declarations cannot shadow declarations outside the assembly block. * Syntax: ``length`` member of arrays is now always read-only, even for storage arrays. - * Type checker: Resulting type of exponentiation is equal to the type of the base. Also allow signed types for the base. + * Type Checker: Resulting type of exponentiation is equal to the type of the base. Also allow signed types for the base. * Natspec JSON Interface: Properly support multiple ``@return`` statements in ``@dev`` documentation and enforce named return parameters to be mentioned documentation. * Source mappings: Add "modifier depth" as a fifth field in the source mappings. * AST: Inline assembly is exported as structured JSON instead of plain string. @@ -51,7 +51,7 @@ Language Features: Compiler Features: - * Commandline Interface: Allow translation from yul / strict assembly to EWasm using ``solc --yul --yul-dialect evm --machine eWasm`` + * Commandline Interface: Allow translation from yul / strict assembly to EWasm using ``solc --yul --yul-dialect evm --machine ewasm`` * Set the default EVM version to "Istanbul". * SMTChecker: Add support to constructors including constructor inheritance. * Yul: When compiling via Yul, string literals from the Solidity code are kept as string literals if every character is safely printable. From b71a4d6ce30131107813aa51edc7ddc86ed9e033 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Tue, 10 Dec 2019 16:51:59 +0000 Subject: [PATCH 2/3] Sort the changelog --- Changelog.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/Changelog.md b/Changelog.md index 965febce4..3fda67fca 100644 --- a/Changelog.md +++ b/Changelog.md @@ -3,6 +3,7 @@ Breaking changes: * ABI: Remove the deprecated ``constant`` and ``payable`` fields. * ABI: The ``type`` field is now required and no longer specified to default to ``function``. + * AST: Inline assembly is exported as structured JSON instead of plain string. * C API (``libsolc``): Introduce context parameter to both ``solidity_compile`` and the callback. * C API (``libsolc``): The provided callback now takes two parameters, kind and data. The callback can then be used for multiple purposes, such has file imports and SMT queries. * Commandline Interface: Remove the text-based AST printer (``--ast``). @@ -11,31 +12,30 @@ Breaking changes: * General: Disallow explicit conversions from external function types to ``address`` and add a member called ``address`` to them as replacement. * General: Enable Yul optimizer as part of standard optimization. * General: New reserved keyword: ``virtual``. + * General: ``private`` cannot be used together with ``virtual``. * General: Split unnamed fallback functions into two cases defined using ``fallback()`` and ``receive()``. + * Inheritance: State variable shadowing is now disallowed. + * Inline Assembly: Only strict inline assembly is allowed. + * Inline Assembly: Variable declarations cannot shadow declarations outside the assembly block. + * JSON AST: Replace ``superFunction`` attribute by ``baseFunctions``. + * Natspec JSON Interface: Properly support multiple ``@return`` statements in ``@dev`` documentation and enforce named return parameters to be mentioned documentation. + * Source mappings: Add "modifier depth" as a fifth field in the source mappings. * Standard JSON Interface: Add option to disable or choose hash method between IPFS and Swarm for the bytecode metadata. * Syntax: ``push(element)`` for dynamic storage arrays do not return the new length anymore. * Syntax: Abstract contracts need to be marked explicitly as abstract by using the ``abstract`` keyword. - * Inline Assembly: Only strict inline assembly is allowed. - * Inline Assembly: Variable declarations cannot shadow declarations outside the assembly block. * Syntax: ``length`` member of arrays is now always read-only, even for storage arrays. * Type Checker: Resulting type of exponentiation is equal to the type of the base. Also allow signed types for the base. - * Natspec JSON Interface: Properly support multiple ``@return`` statements in ``@dev`` documentation and enforce named return parameters to be mentioned documentation. - * Source mappings: Add "modifier depth" as a fifth field in the source mappings. - * AST: Inline assembly is exported as structured JSON instead of plain string. - * JSON AST: Replace ``superFunction`` attribute by ``baseFunctions``. - * General: ``private`` cannot be used together with ``virtual``. - * Inheritance: State variable shadowing is now disallowed. Language Features: - * Allow global enums and structs. - * Allow underscores as delimiters in hex strings. * Allow explicit conversions from ``address`` to ``address payable`` via ``payable(...)``. + * Allow global enums and structs. + * Allow public variables to override external functions. + * Allow underscores as delimiters in hex strings. * Introduce syntax for array slices and implement them for dynamic calldata arrays. * Introduce ``push()`` for dynamic storage arrays. It returns a reference to the newly allocated element, if applicable. * Introduce ``virtual`` and ``override`` keywords. * Modify ``push(element)`` for dynamic storage arrays such that it does not return the new length anymore. * Yul: Introduce ``leave`` statement that exits the current function. - * Allow public variables to override external functions. Compiler Features: * Allow revert strings to be stripped from the binary using the ``--revert-strings`` option or the ``settings.debug.revertStrings`` setting. From 2456c6d5038aab1c815d0b0875ef6588e336ad87 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Tue, 10 Dec 2019 17:22:20 +0000 Subject: [PATCH 3/3] Update documentation about (reserved) keywords --- Changelog.md | 2 +- docs/060-breaking-changes.rst | 2 +- docs/miscellaneous.rst | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Changelog.md b/Changelog.md index 3fda67fca..e65221425 100644 --- a/Changelog.md +++ b/Changelog.md @@ -11,7 +11,7 @@ Breaking changes: * Commandline Interface: Add option to disable or choose hash method between IPFS and Swarm for the bytecode metadata. * General: Disallow explicit conversions from external function types to ``address`` and add a member called ``address`` to them as replacement. * General: Enable Yul optimizer as part of standard optimization. - * General: New reserved keyword: ``virtual``. + * General: New reserved keywords: ``override``, ``receive``, and ``virtual``. * General: ``private`` cannot be used together with ``virtual``. * General: Split unnamed fallback functions into two cases defined using ``fallback()`` and ``receive()``. * Inheritance: State variable shadowing is now disallowed. diff --git a/docs/060-breaking-changes.rst b/docs/060-breaking-changes.rst index 5f906cd19..1d327b824 100644 --- a/docs/060-breaking-changes.rst +++ b/docs/060-breaking-changes.rst @@ -30,7 +30,7 @@ This section lists purely syntactic changes that do not affect the behavior of e longer possible to resize storage arrays assigning a new value to their length. Use ``push()``, ``push(value)`` or ``pop()`` instead, or assign a full array, which will of course overwrite existing content. -* New reserved keywords: ``virtual``. +* New reserved keywords: ``override``, ``receive``, and ``virtual``. * The names of variables declared in inline assembly may no longer end in ``_slot`` or ``_offset``. diff --git a/docs/miscellaneous.rst b/docs/miscellaneous.rst index 24ae5557c..58836cba5 100644 --- a/docs/miscellaneous.rst +++ b/docs/miscellaneous.rst @@ -719,9 +719,9 @@ These keywords are reserved in Solidity. They might become part of the syntax in ``abstract``, ``after``, ``alias``, ``apply``, ``auto``, ``case``, ``catch``, ``copyof``, ``default``, ``define``, ``final``, ``immutable``, ``implements``, ``in``, ``inline``, ``let``, ``macro``, ``match``, -``mutable``, ``null``, ``of``, ``override``, ``partial``, ``promise``, ``reference``, ``relocatable``, +``mutable``, ``null``, ``of``, ``partial``, ``promise``, ``reference``, ``relocatable``, ``sealed``, ``sizeof``, ``static``, ``supports``, ``switch``, ``try``, ``typedef``, ``typeof``, -``unchecked``, ``virtual``. +``unchecked``. Language Grammar ================