MCPcopy Index your code
hub / github.com/yuin/gopher-lua / LocalName

Method LocalName

function.go:177–191  ·  view source on GitHub ↗
(regno, pc int)

Source from the content-addressed store, hash-verified

175}
176
177func (fn *LFunction) LocalName(regno, pc int) (string, bool) {
178 if fn.IsG {
179 return "", false
180 }
181 p := fn.Proto
182 for i := 0; i < len(p.DbgLocals) && p.DbgLocals[i].StartPc < pc; i++ {
183 if pc < p.DbgLocals[i].EndPc {
184 regno--
185 if regno == 0 {
186 return p.DbgLocals[i].Name, true
187 }
188 }
189 }
190 return "", false
191}
192
193/* }}} */

Callers 2

findLocalMethod · 0.80
findLocalMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected