mirror of
https://gitlab.com/pulsechaincom/go-pulse.git
synced 2025-01-03 09:17:38 +00:00
core/asm: accept uppercase instructions (#16531)
This commit is contained in:
parent
52b046c9b6
commit
c514fbccc0
@ -236,12 +236,12 @@ func (c *Compiler) pushBin(v interface{}) {
|
|||||||
// isPush returns whether the string op is either any of
|
// isPush returns whether the string op is either any of
|
||||||
// push(N).
|
// push(N).
|
||||||
func isPush(op string) bool {
|
func isPush(op string) bool {
|
||||||
return op == "push"
|
return strings.ToUpper(op) == "PUSH"
|
||||||
}
|
}
|
||||||
|
|
||||||
// isJump returns whether the string op is jump(i)
|
// isJump returns whether the string op is jump(i)
|
||||||
func isJump(op string) bool {
|
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
|
// toBinary converts text to a vm.OpCode
|
||||||
|
Loading…
Reference in New Issue
Block a user