aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2017-06-15 00:35:16 +0800
committerGitHub <noreply@github.com>2017-06-15 00:35:16 +0800
commitfd5bf16101d514d77cf4c7c64de367ec398995a2 (patch)
tree747e33bfd3c8c8ccf189b3eb1d237f44b85fe131 /docs
parentd693822a6fce5d1c853e50f4c7758bc003542644 (diff)
parent98139ead42e8641f99eb98cbe7997493f03ae099 (diff)
downloaddexon-solidity-fd5bf16101d514d77cf4c7c64de367ec398995a2.tar.gz
dexon-solidity-fd5bf16101d514d77cf4c7c64de367ec398995a2.tar.zst
dexon-solidity-fd5bf16101d514d77cf4c7c64de367ec398995a2.zip
Merge pull request #2384 from ethereum/parseFunctionalInstructions
Enforce function arguments when parsing functional instructions.
Diffstat (limited to 'docs')
-rw-r--r--docs/assembly.rst6
1 files changed, 4 insertions, 2 deletions
diff --git a/docs/assembly.rst b/docs/assembly.rst
index cd3ff4c0..9455dfb3 100644
--- a/docs/assembly.rst
+++ b/docs/assembly.rst
@@ -318,8 +318,10 @@ would be written as follows
mstore(0x80, add(mload(0x80), 3))
-Functional style and instructional style can be mixed, but any opcode inside a
-functional style expression has to return exactly one stack slot (most of the opcodes do).
+Functional style expressions cannot use instructional style internally, i.e.
+``1 2 mstore(0x80, add)`` is not valid assembly, it has to be written as
+``mstore(0x80, add(2, 1))``. For opcodes that do not take arguments, the
+parentheses can be omitted.
Note that the order of arguments is reversed in functional-style as opposed to the instruction-style
way. If you use functional-style, the first argument will end up on the stack top.