MCPcopy Index your code
hub / github.com/Shopify/go-lua / close

Method close

stack.go:103–116  ·  view source on GitHub ↗
(level int)

Source from the content-addressed store, hash-verified

101}
102
103func (l *State) close(level int) {
104 // TODO this seems really inefficient - how can we terminate early?
105 var p *openUpValue
106 for e := l.upValues; e != nil; e, p = e.next, e {
107 if e.upValue.isInStackAbove(level) {
108 e.upValue.close()
109 if p != nil {
110 p.next = e.next
111 } else {
112 l.upValues = e.next
113 }
114 }
115 }
116}
117
118// information about a call
119type callInfo struct {

Callers 3

protectedCallMethod · 0.95
executeSwitchMethod · 0.95
initFunction · 0.45

Calls 1

isInStackAboveMethod · 0.80

Tested by

no test coverage detected