[pypy-svn] r77058 - in pypy/branch/gen2-gc/pypy/rpython/memory/gc: . test

arigo at codespeak.net arigo at codespeak.net
Tue Sep 14 13:46:33 CEST 2010


Author: arigo
Date: Tue Sep 14 13:46:31 2010
New Revision: 77058

Added:
   pypy/branch/gen2-gc/pypy/rpython/memory/gc/minimark.py
      - copied unchanged from r77046, pypy/branch/gen2-gc/pypy/rpython/memory/gc/gen2.py
   pypy/branch/gen2-gc/pypy/rpython/memory/gc/test/test_minimark.py
      - copied, changed from r77046, pypy/branch/gen2-gc/pypy/rpython/memory/gc/test/test_gen2.py
Removed:
   pypy/branch/gen2-gc/pypy/rpython/memory/gc/gen2.py
   pypy/branch/gen2-gc/pypy/rpython/memory/gc/test/test_gen2.py
Modified:
   pypy/branch/gen2-gc/pypy/rpython/memory/gc/test/test_direct.py
Log:
Rename the confusingly named "gen2" into "minimark".


Modified: pypy/branch/gen2-gc/pypy/rpython/memory/gc/test/test_direct.py
==============================================================================
--- pypy/branch/gen2-gc/pypy/rpython/memory/gc/test/test_direct.py	(original)
+++ pypy/branch/gen2-gc/pypy/rpython/memory/gc/test/test_direct.py	Tue Sep 14 13:46:31 2010
@@ -458,5 +458,5 @@
     test_varsized_from_prebuilt_gc.GC_PARAMS = {'space_size': 3 * 1024 * WORD}
 
 
-class TestGen2GC(DirectGCTest):
-    from pypy.rpython.memory.gc.gen2 import Gen2GC as GCClass
+class TestMiniMarkGC(DirectGCTest):
+    from pypy.rpython.memory.gc.minimark import MiniMarkGC as GCClass

Copied: pypy/branch/gen2-gc/pypy/rpython/memory/gc/test/test_minimark.py (from r77046, pypy/branch/gen2-gc/pypy/rpython/memory/gc/test/test_gen2.py)
==============================================================================
--- pypy/branch/gen2-gc/pypy/rpython/memory/gc/test/test_gen2.py	(original)
+++ pypy/branch/gen2-gc/pypy/rpython/memory/gc/test/test_minimark.py	Tue Sep 14 13:46:31 2010
@@ -1,6 +1,6 @@
-from pypy.rpython.memory.gc import gen2
-from pypy.rpython.memory.gc.gen2 import WORD, PAGE_NULL, PAGE_HEADER, PAGE_PTR
-from pypy.rpython.memory.gc.gen2 import ARENA, ARENA_NULL
+from pypy.rpython.memory.gc import minimark
+from pypy.rpython.memory.gc.minimark import PAGE_NULL, PAGE_HEADER, PAGE_PTR
+from pypy.rpython.memory.gc.minimark import WORD, ARENA, ARENA_NULL
 from pypy.rpython.lltypesystem import lltype, llmemory, llarena
 
 SHIFT = 4
@@ -9,14 +9,14 @@
 
 
 def test_allocate_arena():
-    a = gen2.allocate_arena(SHIFT + 8*20 + arenasize, 8)
+    a = minimark.allocate_arena(SHIFT + 8*20 + arenasize, 8)
     assert a.freepage == a.arena_base + SHIFT
     assert a.nfreepages == 20
     assert a.nuninitializedpages == 20
     assert a.prevarena == ARENA_NULL
     assert a.nextarena == ARENA_NULL
     #
-    a = gen2.allocate_arena(SHIFT + 8*20 + 7 + arenasize, 8)
+    a = minimark.allocate_arena(SHIFT + 8*20 + 7 + arenasize, 8)
     assert a.freepage == a.arena_base + SHIFT
     assert a.nfreepages == 20
     assert a.nuninitializedpages == 20
@@ -36,7 +36,7 @@
         assert llmemory.cast_ptr_to_adr(page) == page2
         assert page.nextpage == PAGE_NULL
     #
-    ac = gen2.ArenaCollection(arenasize, pagesize, 99)
+    ac = minimark.ArenaCollection(arenasize, pagesize, 99)
     assert ac.arenas_start == ac.arenas_end == ARENA_NULL
     #
     page = ac.allocate_new_page(5)
@@ -64,7 +64,7 @@
 def arena_collection_for_test(pagesize, *pagelayouts):
     nb_pages = len(pagelayouts[0])
     arenasize = pagesize * (nb_pages + 1) - 1
-    ac = gen2.ArenaCollection(arenasize, pagesize, 9*WORD)
+    ac = minimark.ArenaCollection(arenasize, pagesize, 9*WORD)
     #
     def link(pageaddr, size_class, size_block, nblocks, nusedblocks):
         llarena.arena_reserve(pageaddr, llmemory.sizeof(PAGE_HEADER))
@@ -81,7 +81,7 @@
     for layout in pagelayouts:
         assert len(layout) == nb_pages
         assert " " not in layout.rstrip(" ")
-        a = gen2.allocate_arena(arenasize, pagesize)
+        a = minimark.allocate_arena(arenasize, pagesize)
         alist.append(a)
         assert lltype.typeOf(a.freepage) == llmemory.Address
         startpageaddr = a.freepage



More information about the Pypy-commit mailing list