lvm.js

changeset 23
70fc1cb387e1
parent 22
8391b51517df
child 24
5c9d8a65c87d
equal deleted inserted replaced
22:8391b51517df 23:70fc1cb387e1
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 {

mercurial