Skip to content
Permalink
Browse files

fixed jit tests for real

  • Loading branch information
Alex Gaynor
Alex Gaynor committed Mar 20, 2013
1 parent 96d20f1 commit 3edc8dc09e955b00932f8e3e106a020198a45b29
Showing with 24 additions and 23 deletions.
  1. +9 −9 tests/jit/test_basic.py
  2. +15 −14 tests/jit/test_closure.py
@@ -10,27 +10,27 @@ def test_while_loop(self, topaz, tmpdir):
end
""")
self.assert_matches(traces[0].loop, """
label(p0, p1, p3, p4, p5, p6, p9, i36, p19, p21, p28, p27, descr=TargetToken(4324574448))
label(p0, p1, p3, p4, p5, p6, p9, i35, p19, p21, p27, p28, descr=TargetToken(4324574448))
debug_merge_point(0, 0, '<main> at LOAD_DEREF')
debug_merge_point(0, 0, '<main> at LOAD_CONST')
debug_merge_point(0, 0, '<main> at SEND')
setfield_gc(p21, 21, descr=<FieldS topaz.executioncontext.ExecutionContext.inst_last_instr 24>)
guard_not_invalidated(descr=<Guard0x101c91268>)
guard_not_invalidated(descr=<Guard0x101c93268>)
p37 = force_token()
setfield_gc(p21, -1, descr=<FieldS topaz.executioncontext.ExecutionContext.inst_last_instr 24>)
i38 = int_lt(i36, 10000)
guard_true(i38, descr=<Guard0x101c91178>)
i38 = int_lt(i35, 10000)
guard_true(i38, descr=<Guard0x101c93178>)
debug_merge_point(0, 0, '<main> at JUMP_IF_FALSE')
debug_merge_point(0, 0, '<main> at LOAD_DEREF')
debug_merge_point(0, 0, '<main> at LOAD_CONST')
debug_merge_point(0, 0, '<main> at SEND')
p39 = force_token()
i40 = int_add(i36, 1)
i40 = int_add(i35, 1)
debug_merge_point(0, 0, '<main> at STORE_DEREF')
debug_merge_point(0, 0, '<main> at DISCARD_TOP')
debug_merge_point(0, 0, '<main> at JUMP')
debug_merge_point(0, 0, '<main> at LOAD_DEREF')
jump(p0, p1, p3, p4, p5, p6, p9, i40, p19, p21, p28, p27, descr=TargetToken(4324574448))
setfield_gc(p21, 35, descr=<FieldS topaz.executioncontext.ExecutionContext.inst_last_instr 24>)
jump(p0, p1, p3, p4, p5, p6, p9, i40, p19, p21, p27, p28, descr=TargetToken(4324574448))
""")

def test_ivar_while_loop(self, topaz, tmpdir):
@@ -50,7 +50,6 @@ def test_ivar_while_loop(self, topaz, tmpdir):
guard_not_invalidated(descr=<Guard0x101c8f970>)
p43 = force_token()
i44 = getfield_gc_pure(p41, descr=<FieldS topaz.objects.intobject.W_FixnumObject.inst_intvalue 8>)
setfield_gc(p19, -1, descr=<FieldS topaz.executioncontext.ExecutionContext.inst_last_instr 24>)
i45 = int_lt(i44, 10000)
guard_true(i45, descr=<Guard0x101c8f8f8>)
debug_merge_point(0, 0, '<main> at JUMP_IF_FALSE')
@@ -65,7 +64,8 @@ def test_ivar_while_loop(self, topaz, tmpdir):
debug_merge_point(0, 0, '<main> at DISCARD_TOP')
debug_merge_point(0, 0, '<main> at JUMP')
debug_merge_point(0, 0, '<main> at LOAD_SELF')
p48 = new_with_vtable(4300561464)
setfield_gc(p19, 39, descr=<FieldS topaz.executioncontext.ExecutionContext.inst_last_instr 24>)
p48 = new_with_vtable(4300565608)
setfield_gc(p48, i47, descr=<FieldS topaz.objects.intobject.W_FixnumObject.inst_intvalue 8>)
setarrayitem_gc(p25, 0, p48, descr=<ArrayP 8>)
i49 = arraylen_gc(p25, descr=<ArrayP 8>)
@@ -10,43 +10,44 @@ def test_int_closure_cells(self, topaz, tmpdir):
end
""")
self.assert_matches(traces[0].loop, """
label(p0, p1, p3, p4, p5, p6, p7, p9, p12, i75, p20, p22, p24, p26, p28, p31, p33, p35, i55, p46, p47, p68, p66, descr=TargetToken(4324574536))
label(p0, p1, p3, p4, p5, p6, p7, p9, p12, i72, p20, p22, p24, p26, p28, p31, p33, p35, i53, p46, p47, p66, p64, descr=TargetToken(4324574536))
debug_merge_point(0, 0, 'each at LOAD_DEREF')
debug_merge_point(0, 0, 'each at LOAD_SELF')
debug_merge_point(0, 0, 'each at SEND')
setfield_gc(p35, 188, descr=<FieldS topaz.executioncontext.ExecutionContext.inst_last_instr 24>)
guard_not_invalidated(descr=<Guard0x101dacbd8>)
p78 = force_token()
p76 = force_token()
debug_merge_point(0, 0, 'each at SEND')
p79 = force_token()
setfield_gc(p35, -1, descr=<FieldS topaz.executioncontext.ExecutionContext.inst_last_instr 24>)
i80 = int_lt(i75, i55)
guard_true(i80, descr=<Guard0x101dacb60>)
p77 = force_token()
setfield_gc(p35, 193, descr=<FieldS topaz.executioncontext.ExecutionContext.inst_last_instr 24>)
i78 = int_lt(i72, i53)
guard_true(i78, descr=<Guard0x101dacb60>)
debug_merge_point(0, 0, 'each at LOAD_CONST')
debug_merge_point(0, 0, 'each at SEND')
p81 = force_token()
p79 = force_token()
debug_merge_point(0, 0, 'each at JUMP_IF_FALSE')
debug_merge_point(0, 0, 'each at LOAD_DEREF')
debug_merge_point(0, 0, 'each at YIELD')
p82 = force_token()
p80 = force_token()
debug_merge_point(1, 1, 'block in <main> at LOAD_DEREF')
debug_merge_point(1, 1, 'block in <main> at STORE_DEREF')
debug_merge_point(1, 1, 'block in <main> at RETURN')
debug_merge_point(0, 0, 'each at DISCARD_TOP')
debug_merge_point(0, 0, 'each at LOAD_DEREF')
debug_merge_point(0, 0, 'each at SEND')
p83 = force_token()
p81 = force_token()
debug_merge_point(1, 2, 'succ at LOAD_SELF')
debug_merge_point(1, 2, 'succ at LOAD_CONST')
debug_merge_point(1, 2, 'succ at SEND')
p84 = force_token()
i85 = int_add(i75, 1)
p82 = force_token()
i83 = int_add(i72, 1)
debug_merge_point(1, 2, 'succ at RETURN')
debug_merge_point(0, 0, 'each at STORE_DEREF')
debug_merge_point(0, 0, 'each at DISCARD_TOP')
debug_merge_point(0, 0, 'each at JUMP')
debug_merge_point(0, 0, 'each at LOAD_DEREF')
setfield_gc(p68, i75, descr=<FieldS topaz.closure.IntCell.inst_intvalue 16>)
i86 = arraylen_gc(p66, descr=<ArrayP 8>)
jump(p0, p1, p3, p4, p5, p6, p7, p9, p12, i85, p20, p22, p24, p26, p28, p31, p33, p35, i55, p46, p47, p68, p66, descr=TargetToken(4324574536))
setfield_gc(p35, 9, descr=<FieldS topaz.executioncontext.ExecutionContext.inst_last_instr 24>)
setfield_gc(p66, i72, descr=<FieldS topaz.closure.IntCell.inst_intvalue 16>)
i84 = arraylen_gc(p64, descr=<ArrayP 8>)
jump(p0, p1, p3, p4, p5, p6, p7, p9, p12, i83, p20, p22, p24, p26, p28, p31, p33, p35, i53, p46, p47, p66, p64, descr=TargetToken(4324574536))
""")

0 comments on commit 3edc8dc

Please sign in to comment.
You can’t perform that action at this time.