Skip to content

Commit 66ce74b

Browse files
authored
Automatically merged updates to draft EIP(s) 2315 (#2527)
Hi, I'm a bot! This change was automatically merged because: - It only modifies existing Draft or Last Call EIP(s) - The PR was approved or written by at least one author of each modified EIP - The build is passing
1 parent 42eb4bb commit 66ce74b

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

EIPS/eip-2315.md

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -138,28 +138,32 @@ contract fun {
138138
```
139139
Here is solc 0.6.3 assembly code with labeled destinations.
140140
```
141-
TEST:
141+
TEST:
142+
jumpdest
142143
0x00
143144
RTN
144145
0x02
145146
0x03
146147
TEST_MUL
147148
jump
148-
TEST_MUL:
149+
TEST_MUL:
150+
jumpdest
149151
0x00
150152
RTN
151153
dup4
152154
dup4
153155
MULTIPLY
154156
jump
155-
RTN:
157+
RTN:
158+
jumpdest
156159
swap4
157160
swap3
158161
pop
159162
pop
160163
pop
161164
jump
162-
MULTIPLY:
165+
MULTIPLY:
166+
jumpdest
163167
mul
164168
swap1
165169
jump
@@ -168,17 +172,20 @@ solc does a good job with the multiply() function, which is a leaf. Non-leaf fu
168172

169173
This is the same code written using `jumpsub` and `returnsub`. Calling `fun.test()` will cost _34 gas_ (plus 5).
170174
```
171-
TEST:
175+
TEST:
176+
beginsub
172177
0x02
173178
0x03
174179
TEST_MUL
175180
jumpsub
176181
returnsub
177-
TEST_MUL:
182+
TEST_MUL:
183+
beginsub
178184
MULTIPLY
179185
jumpsub
180186
returnsub
181-
MULTIPLY:
187+
MULTIPLY:
188+
beginsub
182189
mul
183190
returnsub
184191
```

0 commit comments

Comments
 (0)