10.07.2015 Views

An ARM Backend for PyPyls Tracing JIT - STUPS Group

An ARM Backend for PyPyls Tracing JIT - STUPS Group

An ARM Backend for PyPyls Tracing JIT - STUPS Group

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

22 5 PYPY’S APPROACH TO TRACING <strong>JIT</strong>Sloop_start(a0, regs0)# MOV_R_A 0a1 = list_getitem(regs0, Const(0))# DECR_Aa2 = int_sub(a1, Const(1))# MOV_A_R 0list_setitem(regs0, Const(0), a2)# MOV_R_A 2a3 = list_getitem(regs0, Const(2))# ADD_R_TO_A 1i0 = list_getitem(regs0, Const(1))a4 = int_add(a3, i0)# MOV_A_R 2list_setitem(regs0, Const(2), a4)# MOV_R_A 0a5 = list_getitem(regs0, Const(0))# JUMP_IF_A 4i1 = int_is_true(a5)guard_true(i1)jump(a5, regs0)Figure 10: Trace when executing the Square function of Figure 7, with the correspondingopcodes as comments. The constant-folding of operations on green variables is enabled.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!