(idx int)
| 1243 | } |
| 1244 | |
| 1245 | func (ls *LState) SetTop(idx int) { |
| 1246 | base := ls.currentLocalBase() |
| 1247 | newtop := ls.indexToReg(idx) + 1 |
| 1248 | if newtop < base { |
| 1249 | ls.reg.SetTop(base) |
| 1250 | } else { |
| 1251 | ls.reg.SetTop(newtop) |
| 1252 | } |
| 1253 | } |
| 1254 | |
| 1255 | func (ls *LState) Replace(idx int, value LValue) { |
| 1256 | base := ls.currentLocalBase() |