AbsIndex converts the acceptable index index to an absolute index (that is, one that does not depend on the stack top). http://www.lua.org/manual/5.2/manual.html#lua_absindex
(index int)
| 539 | // |
| 540 | // http://www.lua.org/manual/5.2/manual.html#lua_absindex |
| 541 | func (l *State) AbsIndex(index int) int { |
| 542 | if index > 0 || isPseudoIndex(index) { |
| 543 | return index |
| 544 | } |
| 545 | return l.top - l.callInfo.function + index |
| 546 | } |
| 547 | |
| 548 | // SetTop accepts any index, or 0, and sets the stack top to index. If the |
| 549 | // new top is larger than the old one, then the new elements are filled with |
no test coverage detected