(idx int)
| 1456 | } |
| 1457 | |
| 1458 | func (ls *LState) SetTop(idx int) { |
| 1459 | base := ls.currentLocalBase() |
| 1460 | newtop := ls.indexToReg(idx) + 1 |
| 1461 | if newtop < base { |
| 1462 | ls.reg.SetTop(base) |
| 1463 | } else { |
| 1464 | ls.reg.SetTop(newtop) |
| 1465 | } |
| 1466 | } |
| 1467 | |
| 1468 | func (ls *LState) Replace(idx int, value LValue) { |
| 1469 | base := ls.currentLocalBase() |