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

Function opBitNot

protocol/txvm/bitwise.go:12–20  ·  view source on GitHub ↗
(vm *VM)

Source from the content-addressed store, hash-verified

10var ErrBitLen = errorf("mismatched byte lengths for binary bitwise op")
11
12func opBitNot(vm *VM) {
13 s := vm.popBytes()
14 t := make([]byte, len(s))
15 for i := 0; i < len(s); i++ {
16 t[i] = ^s[i]
17 }
18 vm.chargeCreate(Bytes(t))
19 vm.push(Bytes(t))
20}
21
22func opBitAnd(vm *VM) { bitOp(vm, and) }
23func opBitOr(vm *VM) { bitOp(vm, or) }

Callers

nothing calls this directly

Calls 4

BytesTypeAlias · 0.85
popBytesMethod · 0.80
chargeCreateMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected