mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Document change to BlockFlattener.
This commit is contained in:
parent
9fb77b139c
commit
f2d9a806e0
@ -972,10 +972,13 @@ BlockFlattener
|
||||
^^^^^^^^^^^^^^
|
||||
|
||||
This stage eliminates nested blocks by inserting the statement in the
|
||||
inner block at the appropriate place in the outer block:
|
||||
inner block at the appropriate place in the outer block. It depends on the
|
||||
FunctionGrouper and does not flatten the outermost block to keep the form
|
||||
produced by the FunctionGrouper.
|
||||
|
||||
.. code-block:: yul
|
||||
|
||||
{
|
||||
{
|
||||
let x := 2
|
||||
{
|
||||
@ -983,16 +986,19 @@ inner block at the appropriate place in the outer block:
|
||||
mstore(x, y)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
is transformed to
|
||||
|
||||
.. code-block:: yul
|
||||
|
||||
{
|
||||
{
|
||||
let x := 2
|
||||
let y := 3
|
||||
mstore(x, y)
|
||||
}
|
||||
}
|
||||
|
||||
As long as the code is disambiguated, this does not cause a problem because
|
||||
the scopes of variables can only grow.
|
||||
|
Loading…
Reference in New Issue
Block a user