mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Support compiling Yul within StandardCompiler
This commit is contained in:
@@ -147,7 +147,7 @@ Input Description
|
||||
.. code-block:: none
|
||||
|
||||
{
|
||||
// Required: Source code language, such as "Solidity", "Vyper", "lll", "assembly", etc.
|
||||
// Required: Source code language. Currently supported are "Solidity" and "Yul".
|
||||
"language": "Solidity",
|
||||
// Required
|
||||
"sources":
|
||||
@@ -263,8 +263,9 @@ Input Description
|
||||
// devdoc - Developer documentation (natspec)
|
||||
// userdoc - User documentation (natspec)
|
||||
// metadata - Metadata
|
||||
// ir - New assembly format before desugaring
|
||||
// evm.assembly - New assembly format after desugaring
|
||||
// ir - Yul intermediate representation of the code before optimization
|
||||
// irOptimized - Intermediate representation after optimization
|
||||
// evm.assembly - New assembly format
|
||||
// evm.legacyAssembly - Old-style assembly format in JSON
|
||||
// evm.bytecode.object - Bytecode object
|
||||
// evm.bytecode.opcodes - Opcodes list
|
||||
@@ -273,8 +274,8 @@ Input Description
|
||||
// evm.deployedBytecode* - Deployed bytecode (has the same options as evm.bytecode)
|
||||
// evm.methodIdentifiers - The list of function hashes
|
||||
// evm.gasEstimates - Function gas estimates
|
||||
// ewasm.wast - eWASM S-expressions format (not supported atm)
|
||||
// ewasm.wasm - eWASM binary format (not supported atm)
|
||||
// ewasm.wast - eWASM S-expressions format (not supported at the moment)
|
||||
// ewasm.wasm - eWASM binary format (not supported at the moment)
|
||||
//
|
||||
// Note that using a using `evm`, `evm.bytecode`, `ewasm`, etc. will select every
|
||||
// target part of that output. Additionally, `*` can be used as a wildcard to request everything.
|
||||
|
||||
@@ -15,6 +15,23 @@ 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
|
||||
for the :ref:`standard-json interface <compiler-api>`:
|
||||
|
||||
::
|
||||
|
||||
{
|
||||
"language": "Yul",
|
||||
"sources": { "input.yul": { "content": "{ sstore(0, 1) }" } },
|
||||
"settings": {
|
||||
"outputSelection": { "*": { "*": ["*"], "": [ "*" ] } },
|
||||
"optimizer": { "enabled": true, "details": { "yul": true } }
|
||||
}
|
||||
}
|
||||
|
||||
Furthermore, the commandline interface can be switched to Yul mode
|
||||
using ``solc --strict-assembly``.
|
||||
|
||||
.. note::
|
||||
|
||||
Note that the flavour used for "inline assembly" does not have types
|
||||
|
||||
Reference in New Issue
Block a user