305 var f = new LFunction(chunk, this.frame.f.environment); |
305 var f = new LFunction(chunk, this.frame.f.environment); |
306 this.frame.reg[INS_A(instruction)] = new LValue("function", f); |
306 this.frame.reg[INS_A(instruction)] = new LValue("function", f); |
307 break; |
307 break; |
308 case OP_RETURN: |
308 case OP_RETURN: |
309 this.callstack.pop(); |
309 this.callstack.pop(); |
|
310 this.frame = this.callstack[this.callstack.length-1]; |
310 break; |
311 break; |
311 default: |
312 default: |
312 throw "Unhandled opcode: "+INS_OPCODE(instruction); |
313 throw "Unhandled opcode: "+INS_OPCODE(instruction); |
313 } |
314 } |
314 } |
315 } |