aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordm4 <sunrisedm4@gmail.com>2018-04-19 21:31:30 +0800
committerFelix Lange <fjl@users.noreply.github.com>2018-04-19 21:31:30 +0800
commitc514fbccc036faafef995d422a74dbe5630e7e00 (patch)
treecf6e0f53e0a868a58a7e0dffcaa66e2eaac9b631
parent52b046c9b6a0f6a280ff797f90784f76bfd310b9 (diff)
downloadgo-tangerine-c514fbccc036faafef995d422a74dbe5630e7e00.tar
go-tangerine-c514fbccc036faafef995d422a74dbe5630e7e00.tar.gz
go-tangerine-c514fbccc036faafef995d422a74dbe5630e7e00.tar.bz2
go-tangerine-c514fbccc036faafef995d422a74dbe5630e7e00.tar.lz
go-tangerine-c514fbccc036faafef995d422a74dbe5630e7e00.tar.xz
go-tangerine-c514fbccc036faafef995d422a74dbe5630e7e00.tar.zst
go-tangerine-c514fbccc036faafef995d422a74dbe5630e7e00.zip
core/asm: accept uppercase instructions (#16531)
-rw-r--r--core/asm/compiler.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/asm/compiler.go b/core/asm/compiler.go
index e2130957c..c273e7c51 100644
--- a/core/asm/compiler.go
+++ b/core/asm/compiler.go
@@ -236,12 +236,12 @@ func (c *Compiler) pushBin(v interface{}) {
// isPush returns whether the string op is either any of
// push(N).
func isPush(op string) bool {
- return op == "push"
+ return strings.ToUpper(op) == "PUSH"
}
// isJump returns whether the string op is jump(i)
func isJump(op string) bool {
- return op == "jumpi" || op == "jump"
+ return strings.ToUpper(op) == "JUMPI" || strings.ToUpper(op) == "JUMP"
}
// toBinary converts text to a vm.OpCode