Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
60
func
(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
64
func
(st *Stack) dup(pool *intPool, n int) {
65
st.push(pool.get().Set(st.data[st.len()-n]))
Callers
1
makeSwap
Function · 0.80
Calls
1
len
Method · 0.95
Tested by
no test coverage detected