MCPcopy Create free account
hub / github.com/CPChain/chain / opAdd

Function opAdd

core/vm/instructions.go:40–46  ·  view source on GitHub ↗
(pc *uint64, evm *EVM, contract *Contract, memory *Memory, stack *Stack)

Source from the content-addressed store, hash-verified

38)
39
40func opAdd(pc *uint64, evm *EVM, contract *Contract, memory *Memory, stack *Stack) ([]byte, error) {
41 x, y := stack.pop(), stack.peek()
42 math.U256(y.Add(x, y))
43
44 evm.interpreter.intPool.put(x)
45 return nil, nil
46}
47
48func opSub(pc *uint64, evm *EVM, contract *Contract, memory *Memory, stack *Stack) ([]byte, error) {
49 x, y := stack.pop(), stack.peek()

Callers

nothing calls this directly

Calls 4

popMethod · 0.80
AddMethod · 0.65
peekMethod · 0.45
putMethod · 0.45

Tested by

no test coverage detected