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

Method swap

core/vm/stack.go:60–62  ·  view source on GitHub ↗
(n int)

Source from the content-addressed store, hash-verified

58}
59
60func (st *Stack) swap(n int) {
61 st.data[st.len()-n], st.data[st.len()-1] = st.data[st.len()-1], st.data[st.len()-n]
62}
63
64func (st *Stack) dup(pool *intPool, n int) {
65 st.push(pool.get().Set(st.data[st.len()-n]))

Callers 1

makeSwapFunction · 0.80

Calls 1

lenMethod · 0.95

Tested by

no test coverage detected