291 var ret = f.apply(null, args.map(function (a) { return a.value; })); |
291 var ret = f.apply(null, args.map(function (a) { return a.value; })); |
292 } |
292 } |
293 else |
293 else |
294 { |
294 { |
295 // Lua function |
295 // Lua function |
|
296 this.frame = {f:f,pc:0,reg:args}; |
|
297 this.callstack.push(this.frame); |
296 } |
298 } |
297 break; |
299 break; |
298 case OP_CLOSURE: |
300 case OP_CLOSURE: |
299 var prototype_id = INS_Bx(instruction); |
301 var prototype_id = INS_Bx(instruction); |
300 var chunk = this.frame.f.chunk.prototypes[prototype_id]; |
302 var chunk = this.frame.f.chunk.prototypes[prototype_id]; |