| 327 | } |
| 328 | |
| 329 | func (l *State) adjustVarArgs(p *prototype, argCount int) int { |
| 330 | fixedArgCount := p.parameterCount |
| 331 | l.assert(argCount >= fixedArgCount) |
| 332 | // move fixed parameters to final position |
| 333 | fixed := l.top - argCount // first fixed argument |
| 334 | base := l.top // final position of first argument |
| 335 | fixedArgs := l.stack[fixed : fixed+fixedArgCount] |
| 336 | copy(l.stack[base:base+fixedArgCount], fixedArgs) |
| 337 | for i := range fixedArgs { |
| 338 | fixedArgs[i] = nil |
| 339 | } |
| 340 | return base |
| 341 | } |
| 342 | |
| 343 | func (l *State) postCall(firstResult int) bool { |
| 344 | ci := l.callInfo |