310 break; |
310 break; |
311 case OP_CLOSURE: |
311 case OP_CLOSURE: |
312 var prototype_id = INS_Bx(instruction); |
312 var prototype_id = INS_Bx(instruction); |
313 var chunk = this.frame.f.chunk.prototypes[prototype_id]; |
313 var chunk = this.frame.f.chunk.prototypes[prototype_id]; |
314 var f = new LFunction(chunk, this.frame.f.environment); |
314 var f = new LFunction(chunk, this.frame.f.environment); |
315 f.me = "Yes, it's me!"; |
|
316 for(var i=0;i<chunk.numUpvalues;i++) |
315 for(var i=0;i<chunk.numUpvalues;i++) |
317 { |
316 { |
318 var upval_instruction = this.frame.f.instructions[this.frame.pc++]; |
317 var upval_instruction = this.frame.f.instructions[this.frame.pc++]; |
319 switch(INS_OPCODE(upval_instruction)) |
318 switch(INS_OPCODE(upval_instruction)) |
320 { |
319 { |