Merge pull request #6274 from ethereum/docs-yul-note

[DOCS] Update note to add further details on current status of YUL
This commit is contained in:
Chris Chinchilla 2019-04-15 08:48:14 +10:00 committed by GitHub
commit 6c68904f39
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,16 +6,14 @@ Yul
.. index:: ! assembly, ! asm, ! evmasm, ! yul, julia, iulia .. index:: ! assembly, ! asm, ! evmasm, ! yul, julia, iulia
Yul (previously also called JULIA or IULIA) is an intermediate language that can Yul (previously also called JULIA or IULIA) is an intermediate language that can be
compile to various different backends compiled to bytecode for different backends.
(EVM 1.0, EVM 1.5 and eWASM are planned).
Because of that, it is designed to be a usable common denominator of all three
platforms.
It can already be used for "inline assembly" inside Solidity and
future versions of the Solidity compiler will even use Yul as intermediate
language. It should also be easy to build high-level optimizer stages for Yul.
In its flavour of inline-assembly, Yul can be used as a language setting Support for EVM 1.0, EVM 1.5 and eWASM is planned, and it is designed to be a usable common denominator of all three
platforms. It can already be used for "inline assembly" inside Solidity and future versions of the Solidity compiler
will use Yul as an intermediate language. Yul is a good target for high-level optimisation stages that can benefit all target platforms equally.
With the "inline assembly" flavour, Yul can be used as a language setting
for the :ref:`standard-json interface <compiler-api>`: for the :ref:`standard-json interface <compiler-api>`:
:: ::
@ -29,15 +27,12 @@ for the :ref:`standard-json interface <compiler-api>`:
} }
} }
Furthermore, the commandline interface can be switched to Yul mode And on the command line interface with the ``--strict-assembly`` parameter.
using ``solc --strict-assembly``.
.. note:: .. warning::
Note that the flavour used for "inline assembly" does not have types Yul is in active development and bytecode generation is fully implemented only for untyped Yul (everything is ``u256``)
(everything is ``u256``) and the built-in functions are identical and with EVM 1.0 as target, :ref:`EVM opcodes <opcodes>` are used as built-in functions.
to the EVM opcodes. Please resort to the inline assembly documentation
for details.
The core components of Yul are functions, blocks, variables, literals, The core components of Yul are functions, blocks, variables, literals,
for-loops, if-statements, switch-statements, expressions and assignments to variables. for-loops, if-statements, switch-statements, expressions and assignments to variables.