Skip to content

Commit 023e203

Browse files
committed
make all opcodes proper type
1 parent d109b76 commit 023e203

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

core/vm/opcodes.go

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,11 @@ const (
154154
PUSH30
155155
PUSH31
156156
PUSH32
157-
DUP1
157+
)
158+
159+
// 0x80 range - dups.
160+
const (
161+
DUP1 OpCode = 0x80 + iota
158162
DUP2
159163
DUP3
160164
DUP4
@@ -170,7 +174,11 @@ const (
170174
DUP14
171175
DUP15
172176
DUP16
173-
SWAP1
177+
)
178+
179+
// 0x90 range - swaps.
180+
const (
181+
SWAP1 OpCode = 0x90 + iota
174182
SWAP2
175183
SWAP3
176184
SWAP4

0 commit comments

Comments
 (0)