lvm.js

changeset 16
9c8710ea2a5a
parent 15
5240eaff785f
child 17
ac02246fc1d1
equal deleted inserted replaced
15:5240eaff785f 16:9c8710ea2a5a
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];

mercurial