(vm *VM)
| 49 | } |
| 50 | |
| 51 | func opLen(vm *VM) { |
| 52 | d := vm.popData() |
| 53 | switch d := d.(type) { |
| 54 | case Bytes: |
| 55 | vm.push(Int(len(d))) |
| 56 | case Tuple: |
| 57 | vm.push(Int(len(d))) |
| 58 | default: |
| 59 | panic(errors.WithData(ErrType, "want", "Bytes, Tuple", "got", fmt.Sprintf("%T", d))) |
| 60 | } |
| 61 | } |
| 62 | |
| 63 | func opTuple(vm *VM) { |
| 64 | n := int64(vm.popInt()) |