def run_lua_closure(self): while True: pc = self.get_pc() + 1 inst = Instruction(self.fetch()) inst.execute(self) #print('(%3d) [%02d] %-12s ' % (self.time, pc, inst.op_name()), end='') #self.print_stack() self.time += 1 if inst.op_code() == OpCode.RETURN: break
def print_code(self): for i in range(len(self.code)): line = self.line_infos[i] if len(self.line_infos) > 0 else '-' inst = Instruction(self.code[i]) print('\t%d\t[%s]\t' % (i + 1, line), end='') inst.dump()