Skip to content

Commit

Permalink
Merge pull request ethereum#12060 from acoglio/patch-3
Browse files Browse the repository at this point in the history
Make evaluation of string literals more generic
  • Loading branch information
chriseth authored Nov 11, 2021
2 parents 9240368 + d3b2463 commit 969707c
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions docs/yul.rst
Original file line number Diff line number Diff line change
Expand Up @@ -714,13 +714,15 @@ We will use a destructuring notation for the AST nodes.
L'[$parami] = vi and L'[$reti] = 0 for all i.
Let G'', L'', mode = E(Gn, L', block)
G'', Ln, L''[$ret1], ..., L''[$retm]
E(G, L, l: StringLiteral) = G, L, utf8EncodeLeftAligned(l),
where utf8EncodeLeftAligned performs a UTF-8 encoding of l
and aligns it left into 32 bytes
E(G, L, l: StringLiteral) = G, L, str(l),
where str is the string evaluation function,
which for the EVM dialect is defined in the section 'Literals' above
E(G, L, n: HexNumber) = G, L, hex(n)
where hex is the hexadecimal decoding function
where hex is the hexadecimal evaluation function,
which turns a sequence of hexadecimal digits into their big endian value
E(G, L, n: DecimalNumber) = G, L, dec(n),
where dec is the decimal decoding function
where dec is the decimal evaluation function,
which turns a sequence of decimal digits into their big endian value
.. _opcodes:

Expand Down

0 comments on commit 969707c

Please sign in to comment.