[pypy-svn] r53229 - in pypy/branch/jit-merging-logic/pypy/jit/timeshifter: . test

arigo at codespeak.net arigo at codespeak.net
Tue Apr 1 11:16:04 CEST 2008


Author: arigo
Date: Tue Apr  1 11:16:04 2008
New Revision: 53229

Modified:
   pypy/branch/jit-merging-logic/pypy/jit/timeshifter/rvalue.py
   pypy/branch/jit-merging-logic/pypy/jit/timeshifter/test/test_merging.py
Log:
Update the last test too (still failing).


Modified: pypy/branch/jit-merging-logic/pypy/jit/timeshifter/rvalue.py
==============================================================================
--- pypy/branch/jit-merging-logic/pypy/jit/timeshifter/rvalue.py	(original)
+++ pypy/branch/jit-merging-logic/pypy/jit/timeshifter/rvalue.py	Tue Apr  1 11:16:04 2008
@@ -218,6 +218,7 @@
         try:
             return memo[self]
         except KeyError:
+            xxx # use self.most_recent_frozen
             if self.is_constant():
                 result = FrozenBoolConst(self.genvar)
             else:
@@ -241,6 +242,7 @@
         try:
             return memo[self]
         except KeyError:
+            xxx # use self.most_recent_frozen
             if self.is_constant():
                 result = FrozenDoubleConst(self.genvar)
             else:

Modified: pypy/branch/jit-merging-logic/pypy/jit/timeshifter/test/test_merging.py
==============================================================================
--- pypy/branch/jit-merging-logic/pypy/jit/timeshifter/test/test_merging.py	(original)
+++ pypy/branch/jit-merging-logic/pypy/jit/timeshifter/test/test_merging.py	Tue Apr  1 11:16:04 2008
@@ -106,28 +106,27 @@
         gc = FakeGenConst(prebuilt_s)
         box = rvalue.PtrRedBox(gc)
         frozen = box.freeze(rvalue.freeze_memo())
-        assert box.future_usage is not None # attached by freeze
-        frozen_timestamp = 0
+        assert box.most_recent_frozen is not None # attached by freeze
 
         jitstate = FakeJITState()
 
         x_box = rtimeshift.gengetfield(jitstate, False, self.fielddesc, box)
         assert x_box.genvar.revealconst(lltype.Signed) == 42
         assert x_box.future_usage is not None   # attached by gengetfield()
-        x_box.future_usage.see_promote(timestamp=1)
+        x_box.see_promote()
 
-        memo = rvalue.exactmatch_memo(frozen_timestamp=frozen_timestamp)
+        memo = rvalue.exactmatch_memo()
         assert frozen.exactmatch(box, [], memo)
 
         prebuilt_s2 = lltype.malloc(self.STRUCT)
         prebuilt_s2.x = 42
         box2 = rvalue.PtrRedBox(FakeGenConst(prebuilt_s2))
-        memo = rvalue.exactmatch_memo(frozen_timestamp=frozen_timestamp)
+        memo = rvalue.exactmatch_memo()
         assert not frozen.exactmatch(box2, [], memo)
         # ^^^no DontMerge because box2.x is equal, so we don't loose its value
 
         prebuilt_s3 = lltype.malloc(self.STRUCT)
         prebuilt_s3.x = 43
         box3 = rvalue.PtrRedBox(FakeGenConst(prebuilt_s3))
-        memo = rvalue.exactmatch_memo(frozen_timestamp=frozen_timestamp)
+        memo = rvalue.exactmatch_memo()
         py.test.raises(rvalue.DontMerge, frozen.exactmatch, box3, [], memo)



More information about the Pypy-commit mailing list