[pypy-commit] pypy default: Move the 'rpython.rtyper.memory' subpackage to simply 'rpython.memory'.
arigo
noreply at buildbot.pypy.org
Sat Feb 23 11:04:33 CET 2013
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r61652:99168b9efe53
Date: 2013-02-23 11:04 +0100
http://bitbucket.org/pypy/pypy/changeset/99168b9efe53/
Log: Move the 'rpython.rtyper.memory' subpackage to simply
'rpython.memory'.
diff --git a/pypy/doc/garbage_collection.rst b/pypy/doc/garbage_collection.rst
--- a/pypy/doc/garbage_collection.rst
+++ b/pypy/doc/garbage_collection.rst
@@ -42,7 +42,7 @@
Two arenas of equal size, with only one arena in use and getting filled
with new objects. When the arena is full, the live objects are copied
into the other arena using Cheney's algorithm. The old arena is then
-cleared. See `rpython/rtyper/memory/gc/semispace.py`_.
+cleared. See `rpython/memory/gc/semispace.py`_.
On Unix the clearing is done by reading ``/dev/zero`` into the arena,
which is extremely memory efficient at least on Linux: it lets the
@@ -55,7 +55,7 @@
Generational GC
---------------
-This is a two-generations GC. See `rpython/rtyper/memory/gc/generation.py`_.
+This is a two-generations GC. See `rpython/memory/gc/generation.py`_.
It is implemented as a subclass of the Semispace copying collector. It
adds a nursery, which is a chunk of the current semispace. Its size is
@@ -86,7 +86,7 @@
Each generation is collected much less often than the previous one. The
division of the generations is slightly more complicated than just
nursery / semispace / external; see the diagram at the start of the
-source code, in `rpython/rtyper/memory/gc/hybrid.py`_.
+source code, in `rpython/memory/gc/hybrid.py`_.
Mark & Compact GC
-----------------
@@ -161,7 +161,7 @@
to the old stage. The dying case 2 objects are immediately freed.
- The old stage is an area of memory containing old (small) objects. It
- is handled by `rpython/rtyper/memory/gc/minimarkpage.py`_. It is organized
+ is handled by `rpython/memory/gc/minimarkpage.py`_. It is organized
as "arenas" of 256KB or 512KB, subdivided into "pages" of 4KB or 8KB.
Each page can either be free, or contain small objects of all the same
size. Furthermore at any point in time each object location can be
diff --git a/pypy/doc/index.rst b/pypy/doc/index.rst
--- a/pypy/doc/index.rst
+++ b/pypy/doc/index.rst
@@ -286,7 +286,7 @@
`rpython/rtyper/ootypesystem/`_ the `object-oriented type system`_
for OO backends
-`rpython/rtyper/memory/`_ the `garbage collector`_ construction
+`rpython/memory/`_ the `garbage collector`_ construction
framework
`rpython/translator/`_ translation_ backends and support code
diff --git a/rpython/jit/backend/arm/regalloc.py b/rpython/jit/backend/arm/regalloc.py
--- a/rpython/jit/backend/arm/regalloc.py
+++ b/rpython/jit/backend/arm/regalloc.py
@@ -736,7 +736,7 @@
classptr = y_val
# here, we have to go back from 'classptr' to the value expected
# from reading the 16 bits in the object header
- from rpython.rtyper.memory.gctypelayout import GCData
+ from rpython.memory.gctypelayout import GCData
sizeof_ti = rffi.sizeof(GCData.TYPE_INFO)
type_info_group = llop.gc_get_type_info_group(llmemory.Address)
type_info_group = rffi.cast(lltype.Signed, type_info_group)
diff --git a/rpython/jit/backend/llsupport/gc.py b/rpython/jit/backend/llsupport/gc.py
--- a/rpython/jit/backend/llsupport/gc.py
+++ b/rpython/jit/backend/llsupport/gc.py
@@ -17,7 +17,7 @@
from rpython.jit.backend.llsupport.descr import get_array_descr
from rpython.jit.backend.llsupport.descr import get_call_descr
from rpython.jit.backend.llsupport.rewrite import GcRewriterAssembler
-from rpython.rtyper.memory.gctransform import asmgcroot
+from rpython.memory.gctransform import asmgcroot
# ____________________________________________________________
@@ -698,7 +698,7 @@
def _make_layoutbuilder(self):
# make a TransformerLayoutBuilder and save it on the translator
# where it can be fished and reused by the FrameworkGCTransformer
- from rpython.rtyper.memory.gctransform import framework
+ from rpython.memory.gctransform import framework
translator = self.translator
self.layoutbuilder = framework.TransformerLayoutBuilder(translator)
self.layoutbuilder.delay_encoding()
@@ -706,7 +706,7 @@
self.gcrootmap.add_jit2gc_hooks(translator._jit2gc)
def _setup_gcclass(self):
- from rpython.rtyper.memory.gcheader import GCHeaderBuilder
+ from rpython.memory.gcheader import GCHeaderBuilder
self.GCClass = self.layoutbuilder.GCClass
self.moving_gc = self.GCClass.moving_gc
self.HDRPTR = lltype.Ptr(self.GCClass.HDR)
@@ -727,7 +727,7 @@
self.write_barrier_descr = WriteBarrierDescr(self)
def _make_functions(self, really_not_translated):
- from rpython.rtyper.memory.gctypelayout import check_typeid
+ from rpython.memory.gctypelayout import check_typeid
llop1 = self.llop1
(self.standard_array_basesize, _, self.standard_array_length_ofs) = \
symbolic.get_array_token(lltype.GcArray(lltype.Signed),
@@ -813,7 +813,7 @@
[lltype.Signed] * 2)
def _bh_malloc(self, sizedescr):
- from rpython.rtyper.memory.gctypelayout import check_typeid
+ from rpython.memory.gctypelayout import check_typeid
llop1 = self.llop1
type_id = llop.extract_ushort(llgroup.HALFWORD, sizedescr.tid)
check_typeid(type_id)
@@ -822,7 +822,7 @@
False, False, False)
def _bh_malloc_array(self, num_elem, arraydescr):
- from rpython.rtyper.memory.gctypelayout import check_typeid
+ from rpython.memory.gctypelayout import check_typeid
llop1 = self.llop1
type_id = llop.extract_ushort(llgroup.HALFWORD, arraydescr.tid)
check_typeid(type_id)
diff --git a/rpython/jit/backend/llsupport/test/test_symbolic.py b/rpython/jit/backend/llsupport/test/test_symbolic.py
--- a/rpython/jit/backend/llsupport/test/test_symbolic.py
+++ b/rpython/jit/backend/llsupport/test/test_symbolic.py
@@ -1,7 +1,7 @@
import py
from rpython.jit.backend.llsupport.symbolic import *
from rpython.rtyper.lltypesystem import lltype, rffi
-from rpython.rtyper.memory.lltypelayout import convert_offset_to_int
+from rpython.memory.lltypelayout import convert_offset_to_int
WORD = rffi.sizeof(lltype.Signed)
diff --git a/rpython/jit/backend/x86/assembler.py b/rpython/jit/backend/x86/assembler.py
--- a/rpython/jit/backend/x86/assembler.py
+++ b/rpython/jit/backend/x86/assembler.py
@@ -426,7 +426,7 @@
@rgc.no_collect
def _release_gil_asmgcc(css):
# similar to trackgcroot.py:pypy_asm_stackwalk, first part
- from rpython.rtyper.memory.gctransform import asmgcroot
+ from rpython.memory.gctransform import asmgcroot
new = rffi.cast(asmgcroot.ASM_FRAMEDATA_HEAD_PTR, css)
next = asmgcroot.gcrootanchor.next
new.next = next
@@ -446,7 +446,7 @@
if after:
after()
# similar to trackgcroot.py:pypy_asm_stackwalk, second part
- from rpython.rtyper.memory.gctransform import asmgcroot
+ from rpython.memory.gctransform import asmgcroot
old = rffi.cast(asmgcroot.ASM_FRAMEDATA_HEAD_PTR, css)
prev = old.prev
next = old.next
@@ -1786,7 +1786,7 @@
# from reading the half-word in the object header. Note that
# this half-word is at offset 0 on a little-endian machine;
# it would be at offset 2 or 4 on a big-endian machine.
- from rpython.rtyper.memory.gctypelayout import GCData
+ from rpython.memory.gctypelayout import GCData
sizeof_ti = rffi.sizeof(GCData.TYPE_INFO)
type_info_group = llop.gc_get_type_info_group(llmemory.Address)
type_info_group = rffi.cast(lltype.Signed, type_info_group)
@@ -2296,7 +2296,7 @@
# like %eax that would be destroyed by this call, *and* they are
# used by arglocs for the *next* call, then trouble; for now we
# will just push/pop them.
- from rpython.rtyper.memory.gctransform import asmgcroot
+ from rpython.memory.gctransform import asmgcroot
css = self._regalloc.close_stack_struct
if css == 0:
use_words = (2 + max(asmgcroot.INDEX_OF_EBP,
diff --git a/rpython/rtyper/memory/__init__.py b/rpython/memory/__init__.py
rename from rpython/rtyper/memory/__init__.py
rename to rpython/memory/__init__.py
diff --git a/rpython/rtyper/memory/gc/__init__.py b/rpython/memory/gc/__init__.py
rename from rpython/rtyper/memory/gc/__init__.py
rename to rpython/memory/gc/__init__.py
diff --git a/rpython/rtyper/memory/gc/base.py b/rpython/memory/gc/base.py
rename from rpython/rtyper/memory/gc/base.py
rename to rpython/memory/gc/base.py
--- a/rpython/rtyper/memory/gc/base.py
+++ b/rpython/memory/gc/base.py
@@ -1,10 +1,10 @@
from rpython.rtyper.lltypesystem import lltype, llmemory, llarena, rffi
from rpython.rtyper.lltypesystem.lloperation import llop
from rpython.rlib.debug import ll_assert
-from rpython.rtyper.memory.gcheader import GCHeaderBuilder
-from rpython.rtyper.memory.support import DEFAULT_CHUNK_SIZE
-from rpython.rtyper.memory.support import get_address_stack, get_address_deque
-from rpython.rtyper.memory.support import AddressDict, null_address_dict
+from rpython.memory.gcheader import GCHeaderBuilder
+from rpython.memory.support import DEFAULT_CHUNK_SIZE
+from rpython.memory.support import get_address_stack, get_address_deque
+from rpython.memory.support import AddressDict, null_address_dict
from rpython.rtyper.lltypesystem.llmemory import NULL, raw_malloc_usage
TYPEID_MAP = lltype.GcStruct('TYPEID_MAP', ('count', lltype.Signed),
@@ -41,7 +41,7 @@
def post_setup(self):
# More stuff that needs to be initialized when the GC is already
# fully working. (Only called by gctransform/framework for now.)
- from rpython.rtyper.memory.gc import env
+ from rpython.memory.gc import env
self.DEBUG = env.read_from_env('PYPY_GC_DEBUG')
def _teardown(self):
@@ -302,7 +302,7 @@
"""
if self.DEBUG:
from rpython.rlib.objectmodel import we_are_translated
- from rpython.rtyper.memory.support import AddressDict
+ from rpython.memory.support import AddressDict
self._debug_seen = AddressDict()
self._debug_pending = self.AddressStack()
if not we_are_translated():
@@ -434,7 +434,7 @@
except KeyError:
raise ValueError("unknown value for translation.gc: %r" % (
config.translation.gc,))
- module = __import__("rpython.rtyper.memory.gc." + modulename,
+ module = __import__("rpython.memory.gc." + modulename,
globals(), locals(), [classname])
GCClass = getattr(module, classname)
return GCClass, GCClass.TRANSLATION_PARAMS
diff --git a/rpython/rtyper/memory/gc/env.py b/rpython/memory/gc/env.py
rename from rpython/rtyper/memory/gc/env.py
rename to rpython/memory/gc/env.py
diff --git a/rpython/rtyper/memory/gc/generation.py b/rpython/memory/gc/generation.py
rename from rpython/rtyper/memory/gc/generation.py
rename to rpython/memory/gc/generation.py
--- a/rpython/rtyper/memory/gc/generation.py
+++ b/rpython/memory/gc/generation.py
@@ -1,8 +1,8 @@
import sys
-from rpython.rtyper.memory.gc.semispace import SemiSpaceGC
-from rpython.rtyper.memory.gc.semispace import GCFLAG_EXTERNAL, GCFLAG_FORWARDED
-from rpython.rtyper.memory.gc.semispace import GC_HASH_TAKEN_ADDR
-from rpython.rtyper.memory.gc import env
+from rpython.memory.gc.semispace import SemiSpaceGC
+from rpython.memory.gc.semispace import GCFLAG_EXTERNAL, GCFLAG_FORWARDED
+from rpython.memory.gc.semispace import GC_HASH_TAKEN_ADDR
+from rpython.memory.gc import env
from rpython.rtyper.lltypesystem.llmemory import NULL, raw_malloc_usage
from rpython.rtyper.lltypesystem import lltype, llmemory, llarena
from rpython.rlib.objectmodel import free_non_gc_object
diff --git a/rpython/rtyper/memory/gc/hybrid.py b/rpython/memory/gc/hybrid.py
rename from rpython/rtyper/memory/gc/hybrid.py
rename to rpython/memory/gc/hybrid.py
--- a/rpython/rtyper/memory/gc/hybrid.py
+++ b/rpython/memory/gc/hybrid.py
@@ -1,12 +1,12 @@
import sys
-from rpython.rtyper.memory.gc.semispace import SemiSpaceGC
-from rpython.rtyper.memory.gc.generation import GenerationGC, WORD
-from rpython.rtyper.memory.gc.semispace import GCFLAG_EXTERNAL, GCFLAG_FORWARDED
-from rpython.rtyper.memory.gc.semispace import GCFLAG_HASHMASK
-from rpython.rtyper.memory.gc.generation import GCFLAG_NO_YOUNG_PTRS
-from rpython.rtyper.memory.gc.generation import GCFLAG_NO_HEAP_PTRS
-from rpython.rtyper.memory.gc.semispace import GC_HASH_TAKEN_ADDR
-from rpython.rtyper.memory.gc.semispace import GC_HASH_HASFIELD
+from rpython.memory.gc.semispace import SemiSpaceGC
+from rpython.memory.gc.generation import GenerationGC, WORD
+from rpython.memory.gc.semispace import GCFLAG_EXTERNAL, GCFLAG_FORWARDED
+from rpython.memory.gc.semispace import GCFLAG_HASHMASK
+from rpython.memory.gc.generation import GCFLAG_NO_YOUNG_PTRS
+from rpython.memory.gc.generation import GCFLAG_NO_HEAP_PTRS
+from rpython.memory.gc.semispace import GC_HASH_TAKEN_ADDR
+from rpython.memory.gc.semispace import GC_HASH_HASFIELD
from rpython.rtyper.lltypesystem import lltype, llmemory, llarena
from rpython.rtyper.lltypesystem.llmemory import raw_malloc_usage
from rpython.rtyper.lltypesystem.lloperation import llop
diff --git a/rpython/rtyper/memory/gc/inspector.py b/rpython/memory/gc/inspector.py
rename from rpython/rtyper/memory/gc/inspector.py
rename to rpython/memory/gc/inspector.py
--- a/rpython/rtyper/memory/gc/inspector.py
+++ b/rpython/memory/gc/inspector.py
@@ -6,7 +6,7 @@
from rpython.rtyper.module.ll_os import underscore_on_windows
from rpython.rlib import rposix, rgc
-from rpython.rtyper.memory.support import AddressDict, get_address_stack
+from rpython.memory.support import AddressDict, get_address_stack
# ---------- implementation of rpython.rlib.rgc.get_rpy_roots() ----------
diff --git a/rpython/rtyper/memory/gc/minimark.py b/rpython/memory/gc/minimark.py
rename from rpython/rtyper/memory/gc/minimark.py
rename to rpython/memory/gc/minimark.py
--- a/rpython/rtyper/memory/gc/minimark.py
+++ b/rpython/memory/gc/minimark.py
@@ -46,9 +46,9 @@
from rpython.rtyper.lltypesystem import lltype, llmemory, llarena, llgroup
from rpython.rtyper.lltypesystem.lloperation import llop
from rpython.rtyper.lltypesystem.llmemory import raw_malloc_usage
-from rpython.rtyper.memory.gc.base import GCBase, MovingGCBase
-from rpython.rtyper.memory.gc import env
-from rpython.rtyper.memory.support import mangle_hash
+from rpython.memory.gc.base import GCBase, MovingGCBase
+from rpython.memory.gc import env
+from rpython.memory.support import mangle_hash
from rpython.rlib.rarithmetic import ovfcheck, LONG_BIT, intmask, r_uint
from rpython.rlib.rarithmetic import LONG_BIT_SHIFT
from rpython.rlib.debug import ll_assert, debug_print, debug_start, debug_stop
@@ -254,7 +254,7 @@
#
# The ArenaCollection() handles the nonmovable objects allocation.
if ArenaCollectionClass is None:
- from rpython.rtyper.memory.gc import minimarkpage
+ from rpython.memory.gc import minimarkpage
ArenaCollectionClass = minimarkpage.ArenaCollection
self.ac = ArenaCollectionClass(arena_size, page_size,
small_request_threshold)
diff --git a/rpython/rtyper/memory/gc/minimarkpage.py b/rpython/memory/gc/minimarkpage.py
rename from rpython/rtyper/memory/gc/minimarkpage.py
rename to rpython/memory/gc/minimarkpage.py
diff --git a/rpython/rtyper/memory/gc/minimarktest.py b/rpython/memory/gc/minimarktest.py
rename from rpython/rtyper/memory/gc/minimarktest.py
rename to rpython/memory/gc/minimarktest.py
diff --git a/rpython/rtyper/memory/gc/semispace.py b/rpython/memory/gc/semispace.py
rename from rpython/rtyper/memory/gc/semispace.py
rename to rpython/memory/gc/semispace.py
--- a/rpython/rtyper/memory/gc/semispace.py
+++ b/rpython/memory/gc/semispace.py
@@ -1,15 +1,15 @@
from rpython.rtyper.lltypesystem.llmemory import raw_malloc, raw_free
from rpython.rtyper.lltypesystem.llmemory import raw_memcopy, raw_memclear
from rpython.rtyper.lltypesystem.llmemory import NULL, raw_malloc_usage
-from rpython.rtyper.memory.support import get_address_stack, get_address_deque
-from rpython.rtyper.memory.support import AddressDict
+from rpython.memory.support import get_address_stack, get_address_deque
+from rpython.memory.support import AddressDict
from rpython.rtyper.lltypesystem import lltype, llmemory, llarena, rffi, llgroup
from rpython.rlib.objectmodel import free_non_gc_object
from rpython.rlib.debug import ll_assert, have_debug_prints
from rpython.rlib.debug import debug_print, debug_start, debug_stop
from rpython.rtyper.lltypesystem.lloperation import llop
from rpython.rlib.rarithmetic import ovfcheck, LONG_BIT
-from rpython.rtyper.memory.gc.base import MovingGCBase, ARRAY_TYPEID_MAP,\
+from rpython.memory.gc.base import MovingGCBase, ARRAY_TYPEID_MAP,\
TYPEID_MAP
import sys, os
diff --git a/rpython/rtyper/memory/gc/test/__init__.py b/rpython/memory/gc/test/__init__.py
rename from rpython/rtyper/memory/gc/test/__init__.py
rename to rpython/memory/gc/test/__init__.py
diff --git a/rpython/rtyper/memory/gc/test/test_direct.py b/rpython/memory/gc/test/test_direct.py
rename from rpython/rtyper/memory/gc/test/test_direct.py
rename to rpython/memory/gc/test/test_direct.py
--- a/rpython/rtyper/memory/gc/test/test_direct.py
+++ b/rpython/memory/gc/test/test_direct.py
@@ -8,7 +8,7 @@
import py
from rpython.rtyper.lltypesystem import lltype, llmemory
-from rpython.rtyper.memory.gctypelayout import TypeLayoutBuilder
+from rpython.memory.gctypelayout import TypeLayoutBuilder
from rpython.rlib.rarithmetic import LONG_BIT, is_valid_int
WORD = LONG_BIT // 8
@@ -365,7 +365,7 @@
assert p[i-1] == chr(i)
class TestSemiSpaceGC(DirectGCTest):
- from rpython.rtyper.memory.gc.semispace import SemiSpaceGC as GCClass
+ from rpython.memory.gc.semispace import SemiSpaceGC as GCClass
def test_shrink_array(self):
S1 = lltype.GcStruct('S1', ('h', lltype.Char),
@@ -384,7 +384,7 @@
class TestGenerationGC(TestSemiSpaceGC):
- from rpython.rtyper.memory.gc.generation import GenerationGC as GCClass
+ from rpython.memory.gc.generation import GenerationGC as GCClass
def test_collect_gen(self):
gc = self.gc
@@ -430,7 +430,7 @@
class TestHybridGC(TestGenerationGC):
- from rpython.rtyper.memory.gc.hybrid import HybridGC as GCClass
+ from rpython.memory.gc.hybrid import HybridGC as GCClass
GC_PARAMS = {'space_size': 48*WORD,
'min_nursery_size': 12*WORD,
@@ -480,8 +480,8 @@
class TestMiniMarkGCSimple(DirectGCTest):
- from rpython.rtyper.memory.gc.minimark import MiniMarkGC as GCClass
- from rpython.rtyper.memory.gc.minimarktest import SimpleArenaCollection
+ from rpython.memory.gc.minimark import MiniMarkGC as GCClass
+ from rpython.memory.gc.minimarktest import SimpleArenaCollection
# test the GC itself, providing a simple class for ArenaCollection
GC_PARAMS = {'ArenaCollectionClass': SimpleArenaCollection}
@@ -507,7 +507,7 @@
test_card_marker.GC_PARAMS = {"card_page_indices": 4}
def test_writebarrier_before_copy(self):
- from rpython.rtyper.memory.gc import minimark
+ from rpython.memory.gc import minimark
largeobj_size = self.gc.nonlarge_max + 1
self.gc.next_major_collection_threshold = 99999.0
p_src = self.malloc(VAR, largeobj_size)
@@ -546,7 +546,7 @@
def test_writebarrier_before_copy_preserving_cards(self):
from rpython.rtyper.lltypesystem import llarena
- from rpython.rtyper.memory.gc import minimark
+ from rpython.memory.gc import minimark
tid = self.get_type_id(VAR)
largeobj_size = self.gc.nonlarge_max + 1
self.gc.next_major_collection_threshold = 99999.0
@@ -582,4 +582,4 @@
class TestMiniMarkGCFull(DirectGCTest):
- from rpython.rtyper.memory.gc.minimark import MiniMarkGC as GCClass
+ from rpython.memory.gc.minimark import MiniMarkGC as GCClass
diff --git a/rpython/rtyper/memory/gc/test/test_env.py b/rpython/memory/gc/test/test_env.py
rename from rpython/rtyper/memory/gc/test/test_env.py
rename to rpython/memory/gc/test/test_env.py
--- a/rpython/rtyper/memory/gc/test/test_env.py
+++ b/rpython/memory/gc/test/test_env.py
@@ -1,5 +1,5 @@
import os, py
-from rpython.rtyper.memory.gc import env
+from rpython.memory.gc import env
from rpython.rlib.rarithmetic import r_uint
from rpython.tool.udir import udir
diff --git a/rpython/rtyper/memory/gc/test/test_inspector.py b/rpython/memory/gc/test/test_inspector.py
rename from rpython/rtyper/memory/gc/test/test_inspector.py
rename to rpython/memory/gc/test/test_inspector.py
--- a/rpython/rtyper/memory/gc/test/test_inspector.py
+++ b/rpython/memory/gc/test/test_inspector.py
@@ -1,7 +1,7 @@
import os
from rpython.tool.udir import udir
-from rpython.rtyper.memory.gc.test.test_direct import BaseDirectGCTest, S
-from rpython.rtyper.memory.gc import inspector
+from rpython.memory.gc.test.test_direct import BaseDirectGCTest, S
+from rpython.memory.gc import inspector
from rpython.rtyper.lltypesystem import llmemory
@@ -39,10 +39,10 @@
class TestHybridGC(InspectorTest):
- from rpython.rtyper.memory.gc.hybrid import HybridGC as GCClass
+ from rpython.memory.gc.hybrid import HybridGC as GCClass
class TestMiniMarkGCSimple(InspectorTest):
- from rpython.rtyper.memory.gc.minimark import MiniMarkGC as GCClass
- from rpython.rtyper.memory.gc.minimarktest import SimpleArenaCollection
+ from rpython.memory.gc.minimark import MiniMarkGC as GCClass
+ from rpython.memory.gc.minimarktest import SimpleArenaCollection
GC_PARAMS = {'ArenaCollectionClass': SimpleArenaCollection,
"card_page_indices": 4}
diff --git a/rpython/rtyper/memory/gc/test/test_minimark.py b/rpython/memory/gc/test/test_minimark.py
rename from rpython/rtyper/memory/gc/test/test_minimark.py
rename to rpython/memory/gc/test/test_minimark.py
--- a/rpython/rtyper/memory/gc/test/test_minimark.py
+++ b/rpython/memory/gc/test/test_minimark.py
@@ -1,5 +1,5 @@
from rpython.rtyper.lltypesystem import llmemory
-from rpython.rtyper.memory.gc.minimark import MiniMarkGC
+from rpython.memory.gc.minimark import MiniMarkGC
from rpython.rlib.rarithmetic import LONG_BIT
# Note that most tests are in test_direct.py.
diff --git a/rpython/rtyper/memory/gc/test/test_minimarkpage.py b/rpython/memory/gc/test/test_minimarkpage.py
rename from rpython/rtyper/memory/gc/test/test_minimarkpage.py
rename to rpython/memory/gc/test/test_minimarkpage.py
--- a/rpython/rtyper/memory/gc/test/test_minimarkpage.py
+++ b/rpython/memory/gc/test/test_minimarkpage.py
@@ -1,8 +1,8 @@
import py
-from rpython.rtyper.memory.gc.minimarkpage import ArenaCollection
-from rpython.rtyper.memory.gc.minimarkpage import PAGE_HEADER, PAGE_PTR
-from rpython.rtyper.memory.gc.minimarkpage import PAGE_NULL, WORD
-from rpython.rtyper.memory.gc.minimarkpage import _dummy_size
+from rpython.memory.gc.minimarkpage import ArenaCollection
+from rpython.memory.gc.minimarkpage import PAGE_HEADER, PAGE_PTR
+from rpython.memory.gc.minimarkpage import PAGE_NULL, WORD
+from rpython.memory.gc.minimarkpage import _dummy_size
from rpython.rtyper.lltypesystem import lltype, llmemory, llarena
from rpython.rtyper.lltypesystem.llmemory import cast_ptr_to_adr
diff --git a/rpython/rtyper/memory/gcheader.py b/rpython/memory/gcheader.py
rename from rpython/rtyper/memory/gcheader.py
rename to rpython/memory/gcheader.py
diff --git a/rpython/rtyper/memory/gctransform/__init__.py b/rpython/memory/gctransform/__init__.py
rename from rpython/rtyper/memory/gctransform/__init__.py
rename to rpython/memory/gctransform/__init__.py
diff --git a/rpython/rtyper/memory/gctransform/asmgcroot.py b/rpython/memory/gctransform/asmgcroot.py
rename from rpython/rtyper/memory/gctransform/asmgcroot.py
rename to rpython/memory/gctransform/asmgcroot.py
--- a/rpython/rtyper/memory/gctransform/asmgcroot.py
+++ b/rpython/memory/gctransform/asmgcroot.py
@@ -4,7 +4,7 @@
from rpython.rtyper.annlowlevel import llhelper
from rpython.rtyper.lltypesystem import lltype, llmemory, rffi
from rpython.rtyper.lltypesystem.lloperation import llop
-from rpython.rtyper.memory.gctransform.framework import (
+from rpython.memory.gctransform.framework import (
BaseFrameworkGCTransformer, BaseRootWalker)
from rpython.rtyper.rbuiltin import gen_cast
from rpython.translator.unsimplify import copyvar
@@ -160,8 +160,8 @@
# all ASM_FRAMEDATA structures that do no belong to the current
# thread after a fork().
from rpython.rlib import rthread
- from rpython.rtyper.memory.support import AddressDict
- from rpython.rtyper.memory.support import copy_without_null_values
+ from rpython.memory.support import AddressDict
+ from rpython.memory.support import copy_without_null_values
from rpython.annotator import model as annmodel
gcdata = self.gcdata
diff --git a/rpython/rtyper/memory/gctransform/boehm.py b/rpython/memory/gctransform/boehm.py
rename from rpython/rtyper/memory/gctransform/boehm.py
rename to rpython/memory/gctransform/boehm.py
--- a/rpython/rtyper/memory/gctransform/boehm.py
+++ b/rpython/memory/gctransform/boehm.py
@@ -1,5 +1,5 @@
-from rpython.rtyper.memory.gctransform.transform import GCTransformer, mallocHelpers
-from rpython.rtyper.memory.gctransform.support import (get_rtti,
+from rpython.memory.gctransform.transform import GCTransformer, mallocHelpers
+from rpython.memory.gctransform.support import (get_rtti,
_static_deallocator_body_for_type, LLTransformerOp, ll_call_destructor)
from rpython.rtyper.lltypesystem import lltype, llmemory
from rpython.flowspace.model import Constant
diff --git a/rpython/rtyper/memory/gctransform/framework.py b/rpython/memory/gctransform/framework.py
rename from rpython/rtyper/memory/gctransform/framework.py
rename to rpython/memory/gctransform/framework.py
--- a/rpython/rtyper/memory/gctransform/framework.py
+++ b/rpython/memory/gctransform/framework.py
@@ -3,11 +3,11 @@
from rpython.rtyper import rmodel, annlowlevel
from rpython.rtyper.lltypesystem import lltype, llmemory, rffi, llgroup
from rpython.rtyper.lltypesystem.lloperation import LL_OPERATIONS
-from rpython.rtyper.memory import gctypelayout
-from rpython.rtyper.memory.gctransform.log import log
-from rpython.rtyper.memory.gctransform.support import get_rtti, ll_call_destructor
-from rpython.rtyper.memory.gctransform.transform import GCTransformer
-from rpython.rtyper.memory.gctypelayout import ll_weakref_deref, WEAKREF, \
+from rpython.memory import gctypelayout
+from rpython.memory.gctransform.log import log
+from rpython.memory.gctransform.support import get_rtti, ll_call_destructor
+from rpython.memory.gctransform.transform import GCTransformer
+from rpython.memory.gctypelayout import ll_weakref_deref, WEAKREF, \
WEAKREFPTR
from rpython.tool.sourcetools import func_with_new_name
from rpython.translator.backendopt import graphanalyze
@@ -129,9 +129,9 @@
root_stack_depth = None # for tests to override
def __init__(self, translator):
- from rpython.rtyper.memory.gc.base import choose_gc_from_config
- from rpython.rtyper.memory.gc.base import ARRAY_TYPEID_MAP
- from rpython.rtyper.memory.gc import inspector
+ from rpython.memory.gc.base import choose_gc_from_config
+ from rpython.memory.gc.base import ARRAY_TYPEID_MAP
+ from rpython.memory.gc import inspector
super(BaseFrameworkGCTransformer, self).__init__(translator,
inline=True)
@@ -1209,7 +1209,7 @@
def __init__(self, translator, GCClass=None):
if GCClass is None:
- from rpython.rtyper.memory.gc.base import choose_gc_from_config
+ from rpython.memory.gc.base import choose_gc_from_config
GCClass, _ = choose_gc_from_config(translator.config)
if translator.config.translation.gcremovetypeptr:
lltype2vtable = translator.rtyper.lltype2vtable
diff --git a/rpython/rtyper/memory/gctransform/log.py b/rpython/memory/gctransform/log.py
rename from rpython/rtyper/memory/gctransform/log.py
rename to rpython/memory/gctransform/log.py
diff --git a/rpython/rtyper/memory/gctransform/refcounting.py b/rpython/memory/gctransform/refcounting.py
rename from rpython/rtyper/memory/gctransform/refcounting.py
rename to rpython/memory/gctransform/refcounting.py
--- a/rpython/rtyper/memory/gctransform/refcounting.py
+++ b/rpython/memory/gctransform/refcounting.py
@@ -1,11 +1,11 @@
-from rpython.rtyper.memory.gctransform.transform import GCTransformer, mallocHelpers
-from rpython.rtyper.memory.gctransform.support import find_gc_ptrs_in_type, \
+from rpython.memory.gctransform.transform import GCTransformer, mallocHelpers
+from rpython.memory.gctransform.support import find_gc_ptrs_in_type, \
get_rtti, _static_deallocator_body_for_type, LLTransformerOp, ll_call_destructor
from rpython.rtyper.lltypesystem import lltype, llmemory
from rpython.rtyper.lltypesystem.lloperation import llop
from rpython.translator.backendopt.support import var_needsgc
from rpython.rtyper import rmodel
-from rpython.rtyper.memory.gcheader import GCHeaderBuilder
+from rpython.memory.gcheader import GCHeaderBuilder
from rpython.rlib.rarithmetic import ovfcheck
from rpython.rtyper.rbuiltin import gen_cast
import sys
diff --git a/rpython/rtyper/memory/gctransform/shadowstack.py b/rpython/memory/gctransform/shadowstack.py
rename from rpython/rtyper/memory/gctransform/shadowstack.py
rename to rpython/memory/gctransform/shadowstack.py
--- a/rpython/rtyper/memory/gctransform/shadowstack.py
+++ b/rpython/memory/gctransform/shadowstack.py
@@ -4,7 +4,7 @@
from rpython.rtyper import rmodel
from rpython.rtyper.annlowlevel import llhelper
from rpython.rtyper.lltypesystem import lltype, llmemory
-from rpython.rtyper.memory.gctransform.framework import (
+from rpython.memory.gctransform.framework import (
BaseFrameworkGCTransformer, BaseRootWalker, sizeofaddr)
from rpython.rtyper.rbuiltin import gen_cast
diff --git a/rpython/rtyper/memory/gctransform/statistics.py b/rpython/memory/gctransform/statistics.py
rename from rpython/rtyper/memory/gctransform/statistics.py
rename to rpython/memory/gctransform/statistics.py
diff --git a/rpython/rtyper/memory/gctransform/support.py b/rpython/memory/gctransform/support.py
rename from rpython/rtyper/memory/gctransform/support.py
rename to rpython/memory/gctransform/support.py
diff --git a/rpython/rtyper/memory/gctransform/test/__init__.py b/rpython/memory/gctransform/test/__init__.py
rename from rpython/rtyper/memory/gctransform/test/__init__.py
rename to rpython/memory/gctransform/test/__init__.py
diff --git a/rpython/rtyper/memory/gctransform/test/test_boehm.py b/rpython/memory/gctransform/test/test_boehm.py
rename from rpython/rtyper/memory/gctransform/test/test_boehm.py
rename to rpython/memory/gctransform/test/test_boehm.py
--- a/rpython/rtyper/memory/gctransform/test/test_boehm.py
+++ b/rpython/memory/gctransform/test/test_boehm.py
@@ -1,10 +1,10 @@
-from rpython.rtyper.memory.gctransform.boehm import BoehmGCTransformer
-from rpython.rtyper.memory.gctransform.test.test_transform import rtype_and_transform, getops
-from rpython.rtyper.memory.gctransform.test.test_refcounting import make_deallocator
+from rpython.memory.gctransform.boehm import BoehmGCTransformer
+from rpython.memory.gctransform.test.test_transform import rtype_and_transform, getops
+from rpython.memory.gctransform.test.test_refcounting import make_deallocator
from rpython.rtyper.lltypesystem import lltype
from rpython.translator.translator import graphof
from rpython.translator.c.gc import BoehmGcPolicy
-from rpython.rtyper.memory.gctransform.test.test_transform import LLInterpedTranformerTests
+from rpython.memory.gctransform.test.test_transform import LLInterpedTranformerTests
class TestLLInterpedBoehm(LLInterpedTranformerTests):
diff --git a/rpython/rtyper/memory/gctransform/test/test_framework.py b/rpython/memory/gctransform/test/test_framework.py
rename from rpython/rtyper/memory/gctransform/test/test_framework.py
rename to rpython/memory/gctransform/test/test_framework.py
--- a/rpython/rtyper/memory/gctransform/test/test_framework.py
+++ b/rpython/memory/gctransform/test/test_framework.py
@@ -3,13 +3,13 @@
from rpython.flowspace.model import Constant, SpaceOperation
from rpython.rtyper.lltypesystem import lltype, rffi
from rpython.rtyper.lltypesystem.lloperation import llop
-from rpython.rtyper.memory.gc.semispace import SemiSpaceGC
-from rpython.rtyper.memory.gctransform.framework import (CollectAnalyzer,
+from rpython.memory.gc.semispace import SemiSpaceGC
+from rpython.memory.gctransform.framework import (CollectAnalyzer,
find_initializing_stores, find_clean_setarrayitems)
-from rpython.rtyper.memory.gctransform.shadowstack import (
+from rpython.memory.gctransform.shadowstack import (
ShadowStackFrameworkGCTransformer)
-from rpython.rtyper.memory.gctransform.test.test_transform import rtype
-from rpython.rtyper.memory.gctransform.transform import GcHighLevelOp
+from rpython.memory.gctransform.test.test_transform import rtype
+from rpython.memory.gctransform.transform import GcHighLevelOp
from rpython.rtyper.rtyper import LowLevelOpList
from rpython.translator.backendopt.all import backend_optimizations
from rpython.translator.c.gc import BasicFrameworkGcPolicy
diff --git a/rpython/rtyper/memory/gctransform/test/test_refcounting.py b/rpython/memory/gctransform/test/test_refcounting.py
rename from rpython/rtyper/memory/gctransform/test/test_refcounting.py
rename to rpython/memory/gctransform/test/test_refcounting.py
--- a/rpython/rtyper/memory/gctransform/test/test_refcounting.py
+++ b/rpython/memory/gctransform/test/test_refcounting.py
@@ -1,7 +1,7 @@
import py
-from rpython.rtyper.memory.gctransform.test.test_transform import rtype, rtype_and_transform, getops
-from rpython.rtyper.memory.gctransform.test.test_transform import LLInterpedTranformerTests
-from rpython.rtyper.memory.gctransform.refcounting import RefcountingGCTransformer
+from rpython.memory.gctransform.test.test_transform import rtype, rtype_and_transform, getops
+from rpython.memory.gctransform.test.test_transform import LLInterpedTranformerTests
+from rpython.memory.gctransform.refcounting import RefcountingGCTransformer
from rpython.rtyper.lltypesystem import lltype
from rpython.translator.translator import TranslationContext, graphof
from rpython.translator.c.gc import RefcountingGcPolicy
diff --git a/rpython/rtyper/memory/gctransform/test/test_statistics.py b/rpython/memory/gctransform/test/test_statistics.py
rename from rpython/rtyper/memory/gctransform/test/test_statistics.py
rename to rpython/memory/gctransform/test/test_statistics.py
--- a/rpython/rtyper/memory/gctransform/test/test_statistics.py
+++ b/rpython/memory/gctransform/test/test_statistics.py
@@ -1,7 +1,7 @@
from rpython.rtyper.lltypesystem import lltype
-from rpython.rtyper.memory.gctransform.test.test_transform import \
+from rpython.memory.gctransform.test.test_transform import \
rtype
-from rpython.rtyper.memory.gctransform.statistics import \
+from rpython.memory.gctransform.statistics import \
relevant_gcvars_graph, relevant_gcvars, filter_for_nongcptr
from rpython.translator.translator import graphof
diff --git a/rpython/rtyper/memory/gctransform/test/test_transform.py b/rpython/memory/gctransform/test/test_transform.py
rename from rpython/rtyper/memory/gctransform/test/test_transform.py
rename to rpython/memory/gctransform/test/test_transform.py
--- a/rpython/rtyper/memory/gctransform/test/test_transform.py
+++ b/rpython/memory/gctransform/test/test_transform.py
@@ -1,4 +1,4 @@
-from rpython.rtyper.memory.gctransform.transform import BaseGCTransformer
+from rpython.memory.gctransform.transform import BaseGCTransformer
from rpython.flowspace.model import c_last_exception, Variable
from rpython.translator.backendopt.support import var_needsgc
from rpython.translator.translator import TranslationContext, graphof
diff --git a/rpython/rtyper/memory/gctransform/transform.py b/rpython/memory/gctransform/transform.py
rename from rpython/rtyper/memory/gctransform/transform.py
rename to rpython/memory/gctransform/transform.py
--- a/rpython/rtyper/memory/gctransform/transform.py
+++ b/rpython/memory/gctransform/transform.py
@@ -355,7 +355,7 @@
hop.rename('cast_ptr_to_int')
def gct_gc_heap_stats(self, hop):
- from rpython.rtyper.memory.gc.base import ARRAY_TYPEID_MAP
+ from rpython.memory.gc.base import ARRAY_TYPEID_MAP
return hop.cast_result(rmodel.inputconst(lltype.Ptr(ARRAY_TYPEID_MAP),
lltype.nullptr(ARRAY_TYPEID_MAP)))
diff --git a/rpython/rtyper/memory/gctypelayout.py b/rpython/memory/gctypelayout.py
rename from rpython/rtyper/memory/gctypelayout.py
rename to rpython/memory/gctypelayout.py
diff --git a/rpython/rtyper/memory/gcwrapper.py b/rpython/memory/gcwrapper.py
rename from rpython/rtyper/memory/gcwrapper.py
rename to rpython/memory/gcwrapper.py
--- a/rpython/rtyper/memory/gcwrapper.py
+++ b/rpython/memory/gcwrapper.py
@@ -2,7 +2,7 @@
from rpython.rtyper.lltypesystem import lltype, llmemory, llheap
from rpython.rtyper import llinterp
from rpython.rtyper.annlowlevel import llhelper
-from rpython.rtyper.memory import gctypelayout
+from rpython.memory import gctypelayout
from rpython.flowspace.model import Constant
@@ -205,7 +205,7 @@
super(DirectRunLayoutBuilder, self).__init__(GCClass, lltype2vtable)
def make_finalizer_funcptr_for_type(self, TYPE):
- from rpython.rtyper.memory.gctransform.support import get_rtti
+ from rpython.memory.gctransform.support import get_rtti
rtti = get_rtti(TYPE)
if rtti is not None and hasattr(rtti._obj, 'destructor_funcptr'):
destrptr = rtti._obj.destructor_funcptr
@@ -228,7 +228,7 @@
return llhelper(gctypelayout.GCData.FINALIZER_OR_CT, ll_finalizer), light
def make_custom_trace_funcptr_for_type(self, TYPE):
- from rpython.rtyper.memory.gctransform.support import get_rtti
+ from rpython.memory.gctransform.support import get_rtti
rtti = get_rtti(TYPE)
if rtti is not None and hasattr(rtti._obj, 'custom_trace_funcptr'):
return rtti._obj.custom_trace_funcptr
diff --git a/rpython/rtyper/memory/lldict.py b/rpython/memory/lldict.py
rename from rpython/rtyper/memory/lldict.py
rename to rpython/memory/lldict.py
--- a/rpython/rtyper/memory/lldict.py
+++ b/rpython/memory/lldict.py
@@ -1,7 +1,7 @@
from rpython.rtyper.lltypesystem import lltype, llmemory
from rpython.rtyper.lltypesystem import rdict
from rpython.rlib.objectmodel import we_are_translated
-from rpython.rtyper.memory.support import mangle_hash
+from rpython.memory.support import mangle_hash
# This is a low-level AddressDict, reusing a lot of the logic from rdict.py.
# xxx this is very dependent on the details of rdict.py
diff --git a/rpython/rtyper/memory/lltypelayout.py b/rpython/memory/lltypelayout.py
rename from rpython/rtyper/memory/lltypelayout.py
rename to rpython/memory/lltypelayout.py
diff --git a/rpython/rtyper/memory/support.py b/rpython/memory/support.py
rename from rpython/rtyper/memory/support.py
rename to rpython/memory/support.py
--- a/rpython/rtyper/memory/support.py
+++ b/rpython/memory/support.py
@@ -268,13 +268,13 @@
def AddressDict(length_estimate=0):
if we_are_translated():
- from rpython.rtyper.memory import lldict
+ from rpython.memory import lldict
return lldict.newdict(length_estimate)
else:
return BasicAddressDict()
def null_address_dict():
- from rpython.rtyper.memory import lldict
+ from rpython.memory import lldict
return lltype.nullptr(lldict.DICT)
class BasicAddressDict(object):
@@ -333,7 +333,7 @@
if not we_are_translated():
# when not translated, return a dict of the same kind as 'dict'
if not isinstance(dict, BasicAddressDict):
- from rpython.rtyper.memory.lldict import newdict
+ from rpython.memory.lldict import newdict
result = newdict(dict.length())
dict.foreach(_get_updater(surviving, updated_address), result)
return result
@@ -354,7 +354,7 @@
if not we_are_translated():
# when not translated, return a dict of the same kind as 'dict'
if not isinstance(dict, BasicAddressDict):
- from rpython.rtyper.memory.lldict import newdict
+ from rpython.memory.lldict import newdict
result = newdict()
dict.foreach(_null_value_checker, result)
return result
diff --git a/rpython/rtyper/memory/test/__init__.py b/rpython/memory/test/__init__.py
rename from rpython/rtyper/memory/test/__init__.py
rename to rpython/memory/test/__init__.py
diff --git a/rpython/rtyper/memory/test/snippet.py b/rpython/memory/test/snippet.py
rename from rpython/rtyper/memory/test/snippet.py
rename to rpython/memory/test/snippet.py
diff --git a/rpython/rtyper/memory/test/test_gc.py b/rpython/memory/test/test_gc.py
rename from rpython/rtyper/memory/test/test_gc.py
rename to rpython/memory/test/test_gc.py
--- a/rpython/rtyper/memory/test/test_gc.py
+++ b/rpython/memory/test/test_gc.py
@@ -1,8 +1,8 @@
import py
import sys
-from rpython.rtyper.memory import gcwrapper
-from rpython.rtyper.memory.test import snippet
+from rpython.memory import gcwrapper
+from rpython.memory.test import snippet
from rpython.rtyper.test.test_llinterp import get_interpreter
from rpython.rtyper.lltypesystem import lltype
from rpython.rtyper.lltypesystem.lloperation import llop
@@ -804,7 +804,7 @@
class TestSemiSpaceGC(GCTest, snippet.SemiSpaceGCTests):
- from rpython.rtyper.memory.gc.semispace import SemiSpaceGC as GCClass
+ from rpython.memory.gc.semispace import SemiSpaceGC as GCClass
GC_CAN_MOVE = True
GC_CAN_MALLOC_NONMOVABLE = False
GC_CAN_SHRINK_ARRAY = True
@@ -814,10 +814,10 @@
GC_PARAMS = {'space_size': 16*WORD}
class TestGenerationalGC(TestSemiSpaceGC):
- from rpython.rtyper.memory.gc.generation import GenerationGC as GCClass
+ from rpython.memory.gc.generation import GenerationGC as GCClass
class TestHybridGC(TestGenerationalGC):
- from rpython.rtyper.memory.gc.hybrid import HybridGC as GCClass
+ from rpython.memory.gc.hybrid import HybridGC as GCClass
GC_CAN_MALLOC_NONMOVABLE = True
GC_CAN_SHRINK_BIG_ARRAY = False
@@ -886,7 +886,7 @@
py.test.skip("Not supported")
class TestHybridGCSmallHeap(GCTest):
- from rpython.rtyper.memory.gc.hybrid import HybridGC as GCClass
+ from rpython.memory.gc.hybrid import HybridGC as GCClass
GC_CAN_MOVE = False # with this size of heap, stuff gets allocated
# in 3rd gen.
GC_CAN_MALLOC_NONMOVABLE = True
@@ -936,7 +936,7 @@
class TestMiniMarkGC(TestSemiSpaceGC):
- from rpython.rtyper.memory.gc.minimark import MiniMarkGC as GCClass
+ from rpython.memory.gc.minimark import MiniMarkGC as GCClass
GC_CAN_SHRINK_BIG_ARRAY = False
GC_CAN_MALLOC_NONMOVABLE = True
BUT_HOW_BIG_IS_A_BIG_STRING = 11*WORD
diff --git a/rpython/rtyper/memory/test/test_gctypelayout.py b/rpython/memory/test/test_gctypelayout.py
rename from rpython/rtyper/memory/test/test_gctypelayout.py
rename to rpython/memory/test/test_gctypelayout.py
--- a/rpython/rtyper/memory/test/test_gctypelayout.py
+++ b/rpython/memory/test/test_gctypelayout.py
@@ -1,7 +1,7 @@
import py
-from rpython.rtyper.memory.gctypelayout import TypeLayoutBuilder, GCData
-from rpython.rtyper.memory.gctypelayout import offsets_to_gc_pointers
-from rpython.rtyper.memory.gctypelayout import gc_pointers_inside
+from rpython.memory.gctypelayout import TypeLayoutBuilder, GCData
+from rpython.memory.gctypelayout import offsets_to_gc_pointers
+from rpython.memory.gctypelayout import gc_pointers_inside
from rpython.rtyper.lltypesystem import lltype, llmemory, rclass
from rpython.rtyper.test.test_llinterp import get_interpreter
from rpython.rtyper.rclass import IR_IMMUTABLE, IR_QUASIIMMUTABLE
diff --git a/rpython/rtyper/memory/test/test_lldict.py b/rpython/memory/test/test_lldict.py
rename from rpython/rtyper/memory/test/test_lldict.py
rename to rpython/memory/test/test_lldict.py
--- a/rpython/rtyper/memory/test/test_lldict.py
+++ b/rpython/memory/test/test_lldict.py
@@ -1,6 +1,6 @@
import random, sys
from rpython.rtyper.lltypesystem import lltype, llmemory
-from rpython.rtyper.memory import support, lldict
+from rpython.memory import support, lldict
class TestLLAddressDict:
diff --git a/rpython/rtyper/memory/test/test_support.py b/rpython/memory/test/test_support.py
rename from rpython/rtyper/memory/test/test_support.py
rename to rpython/memory/test/test_support.py
--- a/rpython/rtyper/memory/test/test_support.py
+++ b/rpython/memory/test/test_support.py
@@ -1,6 +1,6 @@
from rpython.rlib.objectmodel import free_non_gc_object
-from rpython.rtyper.memory.support import get_address_stack
-from rpython.rtyper.memory.support import get_address_deque
+from rpython.memory.support import get_address_stack
+from rpython.memory.support import get_address_deque
from rpython.rtyper.test.test_llinterp import interpret
from rpython.rtyper.lltypesystem import lltype, llmemory
diff --git a/rpython/rtyper/memory/test/test_transformed_gc.py b/rpython/memory/test/test_transformed_gc.py
rename from rpython/rtyper/memory/test/test_transformed_gc.py
rename to rpython/memory/test/test_transformed_gc.py
--- a/rpython/rtyper/memory/test/test_transformed_gc.py
+++ b/rpython/memory/test/test_transformed_gc.py
@@ -4,7 +4,7 @@
from rpython.translator.c import gc
from rpython.annotator import model as annmodel
from rpython.rtyper.lltypesystem import lltype, llmemory, rffi, llgroup
-from rpython.rtyper.memory.gctransform import framework, shadowstack
+from rpython.memory.gctransform import framework, shadowstack
from rpython.rtyper.lltypesystem.lloperation import llop, void
from rpython.rlib.objectmodel import compute_unique_id, we_are_translated
from rpython.rlib.debug import ll_assert
@@ -912,7 +912,7 @@
class gcpolicy(gc.BasicFrameworkGcPolicy):
class transformerclass(shadowstack.ShadowStackFrameworkGCTransformer):
- from rpython.rtyper.memory.gc.semispace import SemiSpaceGC as GCClass
+ from rpython.memory.gc.semispace import SemiSpaceGC as GCClass
GC_PARAMS = {'space_size': 512*WORD,
'translated_to_c': False}
root_stack_depth = 200
@@ -923,7 +923,7 @@
class gcpolicy(gc.BasicFrameworkGcPolicy):
class transformerclass(shadowstack.ShadowStackFrameworkGCTransformer):
- from rpython.rtyper.memory.gc.generation import GenerationGC as \
+ from rpython.memory.gc.generation import GenerationGC as \
GCClass
GC_PARAMS = {'space_size': 512*WORD,
'nursery_size': 32*WORD,
@@ -1109,11 +1109,11 @@
class gcpolicy(gc.BasicFrameworkGcPolicy):
class transformerclass(shadowstack.ShadowStackFrameworkGCTransformer):
- from rpython.rtyper.memory.gc.generation import GenerationGC
+ from rpython.memory.gc.generation import GenerationGC
class GCClass(GenerationGC):
__ready = False
def setup(self):
- from rpython.rtyper.memory.gc.generation import GenerationGC
+ from rpython.memory.gc.generation import GenerationGC
GenerationGC.setup(self)
self.__ready = True
def semispace_collect(self, size_changing=False):
@@ -1154,7 +1154,7 @@
class gcpolicy(gc.BasicFrameworkGcPolicy):
class transformerclass(shadowstack.ShadowStackFrameworkGCTransformer):
- from rpython.rtyper.memory.gc.hybrid import HybridGC as GCClass
+ from rpython.memory.gc.hybrid import HybridGC as GCClass
GC_PARAMS = {'space_size': 512*WORD,
'nursery_size': 32*WORD,
'large_object': 8*WORD,
@@ -1223,7 +1223,7 @@
class gcpolicy(gc.BasicFrameworkGcPolicy):
class transformerclass(shadowstack.ShadowStackFrameworkGCTransformer):
- from rpython.rtyper.memory.gc.minimark import MiniMarkGC as GCClass
+ from rpython.memory.gc.minimark import MiniMarkGC as GCClass
GC_PARAMS = {'nursery_size': 32*WORD,
'page_size': 16*WORD,
'arena_size': 64*WORD,
@@ -1340,7 +1340,7 @@
class gcpolicy(gc.BasicFrameworkGcPolicy):
class transformerclass(shadowstack.ShadowStackFrameworkGCTransformer):
- from rpython.rtyper.memory.gc.generation import GenerationGC as \
+ from rpython.memory.gc.generation import GenerationGC as \
GCClass
GC_PARAMS = {'space_size': 512*WORD,
'nursery_size': 32*WORD,
diff --git a/rpython/rlib/_stacklet_asmgcc.py b/rpython/rlib/_stacklet_asmgcc.py
--- a/rpython/rlib/_stacklet_asmgcc.py
+++ b/rpython/rlib/_stacklet_asmgcc.py
@@ -14,7 +14,7 @@
if _stackletrootwalker is not None:
return _stackletrootwalker
- from rpython.rtyper.memory.gctransform.asmgcroot import (
+ from rpython.memory.gctransform.asmgcroot import (
WALKFRAME, CALLEE_SAVED_REGS, INDEX_OF_EBP, sizeofaddr)
assert _asmstackrootwalker is not None, "should have been monkey-patched"
diff --git a/rpython/rlib/rgc.py b/rpython/rlib/rgc.py
--- a/rpython/rlib/rgc.py
+++ b/rpython/rlib/rgc.py
@@ -96,11 +96,11 @@
def compute_result_annotation(self):
from rpython.annotator import model as annmodel
- from rpython.rtyper.memory.gc.base import ARRAY_TYPEID_MAP
+ from rpython.memory.gc.base import ARRAY_TYPEID_MAP
return annmodel.SomePtr(lltype.Ptr(ARRAY_TYPEID_MAP))
def specialize_call(self, hop):
- from rpython.rtyper.memory.gc.base import ARRAY_TYPEID_MAP
+ from rpython.memory.gc.base import ARRAY_TYPEID_MAP
hop.exception_is_here()
return hop.genop('gc_heap_stats', [], resulttype=hop.r_result)
diff --git a/rpython/rtyper/lltypesystem/llarena.py b/rpython/rtyper/lltypesystem/llarena.py
--- a/rpython/rtyper/lltypesystem/llarena.py
+++ b/rpython/rtyper/lltypesystem/llarena.py
@@ -355,7 +355,7 @@
For debugging this can check that reserved ranges of bytes don't
overlap. The size must be symbolic; in non-translated version
this is used to know what type of lltype object to allocate."""
- from rpython.rtyper.memory.lltypelayout import memory_alignment
+ from rpython.memory.lltypelayout import memory_alignment
addr = getfakearenaaddress(addr)
letter = 'x'
if llmemory.raw_malloc_usage(size) == 1:
diff --git a/rpython/rtyper/lltypesystem/llmemory.py b/rpython/rtyper/lltypesystem/llmemory.py
--- a/rpython/rtyper/lltypesystem/llmemory.py
+++ b/rpython/rtyper/lltypesystem/llmemory.py
@@ -798,7 +798,7 @@
def raw_free(adr):
# try to free the whole object if 'adr' is the address of the header
- from rpython.rtyper.memory.gcheader import GCHeaderBuilder
+ from rpython.memory.gcheader import GCHeaderBuilder
try:
objectptr = GCHeaderBuilder.object_from_header(adr.ptr)
except KeyError:
@@ -811,7 +811,7 @@
def raw_malloc_usage(size):
if isinstance(size, AddressOffset):
# ouah
- from rpython.rtyper.memory.lltypelayout import convert_offset_to_int
+ from rpython.memory.lltypelayout import convert_offset_to_int
size = convert_offset_to_int(size)
return size
diff --git a/rpython/rtyper/lltypesystem/rdict.py b/rpython/rtyper/lltypesystem/rdict.py
--- a/rpython/rtyper/lltypesystem/rdict.py
+++ b/rpython/rtyper/lltypesystem/rdict.py
@@ -665,7 +665,7 @@
d.resize_counter = n * 2
return d
-# rpython.rtyper.memory.lldict uses a dict based on Struct and Array
+# rpython.memory.lldict uses a dict based on Struct and Array
# instead of GcStruct and GcArray, which is done by using different
# 'allocate' and 'delete' adtmethod implementations than the ones below
def _ll_malloc_dict(DICT):
diff --git a/rpython/rtyper/lltypesystem/test/test_llarena.py b/rpython/rtyper/lltypesystem/test/test_llarena.py
--- a/rpython/rtyper/lltypesystem/test/test_llarena.py
+++ b/rpython/rtyper/lltypesystem/test/test_llarena.py
@@ -220,7 +220,7 @@
assert llmemory.cast_adr_to_int(a+1) == llmemory.cast_adr_to_int(a1) + 1
def test_replace_object_with_stub():
- from rpython.rtyper.memory.gcheader import GCHeaderBuilder
+ from rpython.memory.gcheader import GCHeaderBuilder
HDR = lltype.Struct('HDR', ('x', lltype.Signed))
S = lltype.GcStruct('S', ('y', lltype.Signed), ('z', lltype.Signed))
STUB = lltype.GcStruct('STUB', ('t', lltype.Char))
@@ -271,7 +271,7 @@
assert res == 42
def test_shrink_obj():
- from rpython.rtyper.memory.gcheader import GCHeaderBuilder
+ from rpython.memory.gcheader import GCHeaderBuilder
HDR = lltype.Struct('HDR', ('h', lltype.Signed))
gcheaderbuilder = GCHeaderBuilder(HDR)
size_gc_header = gcheaderbuilder.size_gc_header
diff --git a/rpython/rtyper/lltypesystem/test/test_llmemory.py b/rpython/rtyper/lltypesystem/test/test_llmemory.py
--- a/rpython/rtyper/lltypesystem/test/test_llmemory.py
+++ b/rpython/rtyper/lltypesystem/test/test_llmemory.py
@@ -362,7 +362,7 @@
py.test.raises(IndexError, "item_adr.signed[0]")
def test_raw_malloc_gcstruct():
- from rpython.rtyper.memory import gcheader
+ from rpython.memory import gcheader
HDR = lltype.Struct('header', ('a', lltype.Signed))
builder = gcheader.GCHeaderBuilder(HDR)
gchdr = builder.size_gc_header
@@ -445,7 +445,7 @@
str(p_u)
def test_raw_free_with_hdr():
- from rpython.rtyper.memory.gcheader import GCHeaderBuilder
+ from rpython.memory.gcheader import GCHeaderBuilder
HDR = lltype.Struct('h', ('t', lltype.Signed))
gh = GCHeaderBuilder(HDR).size_gc_header
diff --git a/rpython/rtyper/test/test_nongc.py b/rpython/rtyper/test/test_nongc.py
--- a/rpython/rtyper/test/test_nongc.py
+++ b/rpython/rtyper/test/test_nongc.py
@@ -230,6 +230,6 @@
assert isinstance(s, annmodel.SomeAddress)
rtyper = RPythonTyper(a)
rtyper.specialize()
-## from rpython.rtyper.memory.lladdress import _address
+## from rpython.memory.lladdress import _address
## res = interpret(malloc_and_free, [_address()])
## assert res == _address()
diff --git a/rpython/translator/backendopt/test/test_removenoops.py b/rpython/translator/backendopt/test/test_removenoops.py
--- a/rpython/translator/backendopt/test/test_removenoops.py
+++ b/rpython/translator/backendopt/test/test_removenoops.py
@@ -2,7 +2,7 @@
remove_unaryops, remove_duplicate_casts
from rpython.translator.backendopt.inline import simple_inline_function
from rpython.translator.translator import TranslationContext, graphof
-from rpython.rtyper.memory.gctransform.test.test_transform import getops
+from rpython.memory.gctransform.test.test_transform import getops
from rpython.translator.test.snippet import simple_method
from rpython.translator.backendopt.all import backend_optimizations
from rpython.translator.backendopt.all import INLINE_THRESHOLD_FOR_TEST
diff --git a/rpython/translator/c/gc.py b/rpython/translator/c/gc.py
--- a/rpython/translator/c/gc.py
+++ b/rpython/translator/c/gc.py
@@ -103,7 +103,7 @@
class RefcountingGcPolicy(BasicGcPolicy):
def gettransformer(self):
- from rpython.rtyper.memory.gctransform import refcounting
+ from rpython.memory.gctransform import refcounting
return refcounting.RefcountingGCTransformer(self.db.translator)
def common_gcheader_initdata(self, defnode):
@@ -191,7 +191,7 @@
class BoehmGcPolicy(BasicGcPolicy):
def gettransformer(self):
- from rpython.rtyper.memory.gctransform import boehm
+ from rpython.memory.gctransform import boehm
return boehm.BoehmGCTransformer(self.db.translator)
def common_gcheader_initdata(self, defnode):
@@ -244,11 +244,11 @@
yield 'boehm_gc_startup_code();'
def get_real_weakref_type(self):
- from rpython.rtyper.memory.gctransform import boehm
+ from rpython.memory.gctransform import boehm
return boehm.WEAKLINK
def convert_weakref_to(self, ptarget):
- from rpython.rtyper.memory.gctransform import boehm
+ from rpython.memory.gctransform import boehm
return boehm.convert_weakref_to(ptarget)
def OP_GC__COLLECT(self, funcgen, op):
@@ -341,11 +341,11 @@
yield '%s();' % (self.db.get(fnptr),)
def get_real_weakref_type(self):
- from rpython.rtyper.memory.gctypelayout import WEAKREF
+ from rpython.memory.gctypelayout import WEAKREF
return WEAKREF
def convert_weakref_to(self, ptarget):
- from rpython.rtyper.memory.gctypelayout import convert_weakref_to
+ from rpython.memory.gctypelayout import convert_weakref_to
return convert_weakref_to(ptarget)
def OP_GC_RELOAD_POSSIBLY_MOVED(self, funcgen, op):
@@ -434,13 +434,13 @@
class ShadowStackFrameworkGcPolicy(BasicFrameworkGcPolicy):
def gettransformer(self):
- from rpython.rtyper.memory.gctransform import shadowstack
+ from rpython.memory.gctransform import shadowstack
return shadowstack.ShadowStackFrameworkGCTransformer(self.db.translator)
class AsmGcRootFrameworkGcPolicy(BasicFrameworkGcPolicy):
def gettransformer(self):
- from rpython.rtyper.memory.gctransform import asmgcroot
+ from rpython.memory.gctransform import asmgcroot
return asmgcroot.AsmGcRootFrameworkGCTransformer(self.db.translator)
def GC_KEEPALIVE(self, funcgen, v):
diff --git a/rpython/translator/c/test/test_newgc.py b/rpython/translator/c/test/test_newgc.py
--- a/rpython/translator/c/test/test_newgc.py
+++ b/rpython/translator/c/test/test_newgc.py
@@ -11,7 +11,7 @@
from rpython.rlib.rstring import StringBuilder
from rpython.rtyper.lltypesystem import lltype, llmemory, rffi
from rpython.rtyper.lltypesystem.lloperation import llop
-from rpython.rtyper.memory.test import snippet
+from rpython.memory.test import snippet
from rpython.tool.udir import udir
from rpython.translator.interactive import Translation
diff --git a/rpython/translator/test/test_stackcheck.py b/rpython/translator/test/test_stackcheck.py
--- a/rpython/translator/test/test_stackcheck.py
+++ b/rpython/translator/test/test_stackcheck.py
@@ -2,7 +2,7 @@
from rpython.translator.translator import TranslationContext, graphof
from rpython.translator.backendopt.all import backend_optimizations
from rpython.translator.transform import insert_ll_stackcheck
-from rpython.rtyper.memory.gctransform import shadowstack
+from rpython.memory.gctransform import shadowstack
def _follow_path_naive(block, cur_path, accum):
cur_path = (cur_path, block)
@@ -95,7 +95,7 @@
check(f_graph, 'f')
class GCTransform(shadowstack.ShadowStackFrameworkGCTransformer):
- from rpython.rtyper.memory.gc.generation import GenerationGC as \
+ from rpython.memory.gc.generation import GenerationGC as \
GCClass
GC_PARAMS = {}
diff --git a/rpython/translator/tool/lltracker.py b/rpython/translator/tool/lltracker.py
--- a/rpython/translator/tool/lltracker.py
+++ b/rpython/translator/tool/lltracker.py
@@ -5,7 +5,7 @@
import sys, os
import gc
from rpython.rtyper.lltypesystem import lltype, llmemory
-from rpython.rtyper.memory.gcheader import header2obj
+from rpython.memory.gcheader import header2obj
from rpython.translator.tool.reftracker import BaseRefTrackerPage, MARKER
from rpython.tool.uid import uid
from rpython.tool.identity_dict import identity_dict
diff --git a/rpython/translator/tool/staticsizereport.py b/rpython/translator/tool/staticsizereport.py
--- a/rpython/translator/tool/staticsizereport.py
+++ b/rpython/translator/tool/staticsizereport.py
@@ -4,7 +4,7 @@
from rpython.tool.ansicolor import red, yellow, green
from rpython.rtyper.lltypesystem.lltype import typeOf, _ptr, Ptr, ContainerType
from rpython.rtyper.lltypesystem import llmemory
-from rpython.rtyper.memory.lltypelayout import convert_offset_to_int
+from rpython.memory.lltypelayout import convert_offset_to_int
class Info:
pass
More information about the pypy-commit
mailing list