MCPcopy Create free account
hub / github.com/chain/txvm / opLen

Function opLen

protocol/txvm/data.go:51–61  ·  view source on GitHub ↗
(vm *VM)

Source from the content-addressed store, hash-verified

49}
50
51func 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
63func opTuple(vm *VM) {
64 n := int64(vm.popInt())

Callers

nothing calls this directly

Calls 4

WithDataFunction · 0.92
IntTypeAlias · 0.85
popDataMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected