diff options
author | obscuren <geffobscura@gmail.com> | 2014-11-05 01:38:19 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-11-05 01:38:19 +0800 |
commit | 99d5769c2b966a2d6858b888bcb9e41cb6a87255 (patch) | |
tree | 2cee65c1df11d476a1473786bb36cb61add4708b /vm | |
parent | 1b1fa049fa483b3996d3582ad247638045657282 (diff) | |
download | go-tangerine-99d5769c2b966a2d6858b888bcb9e41cb6a87255.tar go-tangerine-99d5769c2b966a2d6858b888bcb9e41cb6a87255.tar.gz go-tangerine-99d5769c2b966a2d6858b888bcb9e41cb6a87255.tar.bz2 go-tangerine-99d5769c2b966a2d6858b888bcb9e41cb6a87255.tar.lz go-tangerine-99d5769c2b966a2d6858b888bcb9e41cb6a87255.tar.xz go-tangerine-99d5769c2b966a2d6858b888bcb9e41cb6a87255.tar.zst go-tangerine-99d5769c2b966a2d6858b888bcb9e41cb6a87255.zip |
There'll be jumping in to jumps
Diffstat (limited to 'vm')
-rw-r--r-- | vm/vm_debug.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/vm/vm_debug.go b/vm/vm_debug.go index df5d7e346..ce7a29f99 100644 --- a/vm/vm_debug.go +++ b/vm/vm_debug.go @@ -83,6 +83,8 @@ func (self *DebugVm) RunClosure(closure *Closure) (ret []byte, err error) { nop := OpCode(closure.GetOp(p)) if !(nop == JUMPDEST || destinations[from.Int64()] != nil) { panic(fmt.Sprintf("JUMP missed JUMPDEST (%v) %v", nop, p)) + } else if nop == JUMP || nop == JUMPI { + panic(fmt.Sprintf("not allowed to JUMP(I) in to JUMP")) } pc = to |