Skip to content

Commit 969707c

Browse files
authored
Merge pull request #12060 from acoglio/patch-3
Make evaluation of string literals more generic
2 parents 9240368 + d3b2463 commit 969707c

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

docs/yul.rst

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -714,13 +714,15 @@ We will use a destructuring notation for the AST nodes.
714714
L'[$parami] = vi and L'[$reti] = 0 for all i.
715715
Let G'', L'', mode = E(Gn, L', block)
716716
G'', Ln, L''[$ret1], ..., L''[$retm]
717-
E(G, L, l: StringLiteral) = G, L, utf8EncodeLeftAligned(l),
718-
where utf8EncodeLeftAligned performs a UTF-8 encoding of l
719-
and aligns it left into 32 bytes
717+
E(G, L, l: StringLiteral) = G, L, str(l),
718+
where str is the string evaluation function,
719+
which for the EVM dialect is defined in the section 'Literals' above
720720
E(G, L, n: HexNumber) = G, L, hex(n)
721-
where hex is the hexadecimal decoding function
721+
where hex is the hexadecimal evaluation function,
722+
which turns a sequence of hexadecimal digits into their big endian value
722723
E(G, L, n: DecimalNumber) = G, L, dec(n),
723-
where dec is the decimal decoding function
724+
where dec is the decimal evaluation function,
725+
which turns a sequence of decimal digits into their big endian value
724726
725727
.. _opcodes:
726728

0 commit comments

Comments
 (0)