More Related Content
Similar to Can A Python Go Beyond The Python
Similar to Can A Python Go Beyond The Python (20)
More from Yusuke Muraoka (13)
Can A Python Go Beyond The Python
- 3. こんな感じ # トレースオプション >>>> __pytrace__ = 1 Tracing enabled >>>> a = 1 + 2 |- <<<< enter <inline>a = 1 + 2 @ 1 >>>> |- 0 LOAD_CONST 1 (W_IntObject(3)) |- 3 STORE_NAME 0 (a) |- hash(W_StringObject('a')) -> W_IntObject(-468864544) |- int_w(W_IntObject(-468864544)) -> -468864544 |- 6 LOAD_CONST 0 (<W_NoneObject()>) |- 9 RETURN_VALUE |- <<<< leave <inline>a = 1 + 2 @ 1 >>>>
- 12. こんな感じ class __exten d__(PyFrame): def dispatch(self, pycode, next_instr, ec): next_instr = r_uint(next_instr) try: while True: pypyjitdriver.jit_merge_point( frame=self, ec=ec, next_instr=next_instr, pycode=pycode) co_code = pycode.co_code self.valuestackdepth = hint(self.valuestackdepth, promote=True) next_instr = self.handle_bytecode(co_code, next_instr, ec) except ExitFrame: return self.popvalue() def JUMP_ABSOLUTE(f, jumpto, next_instr, *ignored): ec = f.space.getexecutioncontext() pypyjitdriver.can_enter_jit(frame=f, ec=ec, next_instr=jumpto, pycode=f.getcode()) return jumpto