Author: Alexander Hesse <[email protected]>
Branch: split-rpython
Changeset: r59702:5e96a470b4e0
Date: 2013-01-02 16:24 +0100
http://bitbucket.org/pypy/pypy/changeset/5e96a470b4e0/
Log: Moved pypy.tool.algo to rpython
diff --git a/pypy/tool/importfun.py b/pypy/tool/importfun.py
--- a/pypy/tool/importfun.py
+++ b/pypy/tool/importfun.py
@@ -385,7 +385,7 @@
print ' ', k, v
def find_cycles(system):
- from pypy.tool.algo import graphlib
+ from rpython.tool.algo import graphlib
vertices = dict.fromkeys(system.modules)
edges = {}
for m in system.modules:
diff --git a/rpython/annotator/bookkeeper.py b/rpython/annotator/bookkeeper.py
--- a/rpython/annotator/bookkeeper.py
+++ b/rpython/annotator/bookkeeper.py
@@ -21,7 +21,7 @@
from rpython.annotator.signature import annotationoftype
from rpython.flowspace.argument import ArgumentsForTranslation
from rpython.rlib.objectmodel import r_dict, Symbolic
-from pypy.tool.algo.unionfind import UnionFind
+from rpython.tool.algo.unionfind import UnionFind
from rpython.rtyper.lltypesystem import lltype, llmemory
from rpython.rtyper.ootypesystem import ootype
from rpython.rtyper import extregistry
diff --git a/rpython/annotator/specialize.py b/rpython/annotator/specialize.py
--- a/rpython/annotator/specialize.py
+++ b/rpython/annotator/specialize.py
@@ -2,7 +2,7 @@
import py
from rpython.tool.uid import uid
from rpython.tool.sourcetools import func_with_new_name
-from pypy.tool.algo.unionfind import UnionFind
+from rpython.tool.algo.unionfind import UnionFind
from rpython.flowspace.model import Block, Link, Variable, SpaceOperation
from rpython.flowspace.model import Constant, checkgraph
from rpython.annotator import model as annmodel
diff --git a/rpython/jit/codewriter/regalloc.py
b/rpython/jit/codewriter/regalloc.py
--- a/rpython/jit/codewriter/regalloc.py
+++ b/rpython/jit/codewriter/regalloc.py
@@ -1,4 +1,4 @@
-from pypy.tool.algo import regalloc
+from rpython.tool.algo import regalloc
from rpython.jit.metainterp.history import getkind
from rpython.jit.codewriter.flatten import ListOfKind
diff --git a/rpython/rtyper/memory/test/snippet.py
b/rpython/rtyper/memory/test/snippet.py
--- a/rpython/rtyper/memory/test/snippet.py
+++ b/rpython/rtyper/memory/test/snippet.py
@@ -9,7 +9,7 @@
def definestr_finalizer_order(cls):
import random
- from pypy.tool.algo import graphlib
+ from rpython.tool.algo import graphlib
cls.finalizer_order_examples = examples = []
if cls.large_tests_ok:
diff --git a/pypy/tool/algo/BB.sml b/rpython/tool/algo/BB.sml
rename from pypy/tool/algo/BB.sml
rename to rpython/tool/algo/BB.sml
diff --git a/pypy/tool/algo/__init__.py b/rpython/tool/algo/__init__.py
rename from pypy/tool/algo/__init__.py
rename to rpython/tool/algo/__init__.py
diff --git a/pypy/tool/algo/color.py b/rpython/tool/algo/color.py
rename from pypy/tool/algo/color.py
rename to rpython/tool/algo/color.py
diff --git a/pypy/tool/algo/fset.py b/rpython/tool/algo/fset.py
rename from pypy/tool/algo/fset.py
rename to rpython/tool/algo/fset.py
diff --git a/pypy/tool/algo/graphlib.py b/rpython/tool/algo/graphlib.py
rename from pypy/tool/algo/graphlib.py
rename to rpython/tool/algo/graphlib.py
diff --git a/pypy/tool/algo/multiweakdict.py
b/rpython/tool/algo/multiweakdict.py
rename from pypy/tool/algo/multiweakdict.py
rename to rpython/tool/algo/multiweakdict.py
diff --git a/pypy/tool/algo/regalloc.py b/rpython/tool/algo/regalloc.py
rename from pypy/tool/algo/regalloc.py
rename to rpython/tool/algo/regalloc.py
--- a/pypy/tool/algo/regalloc.py
+++ b/rpython/tool/algo/regalloc.py
@@ -1,7 +1,7 @@
import sys
from rpython.flowspace.model import Variable
-from pypy.tool.algo.color import DependencyGraph
-from pypy.tool.algo.unionfind import UnionFind
+from rpython.tool.algo.color import DependencyGraph
+from rpython.tool.algo.unionfind import UnionFind
def perform_register_allocation(graph, consider_var, ListOfKind=()):
"""Perform register allocation for the Variables of the given 'kind'
diff --git a/pypy/tool/algo/sparsemat.py b/rpython/tool/algo/sparsemat.py
rename from pypy/tool/algo/sparsemat.py
rename to rpython/tool/algo/sparsemat.py
diff --git a/pypy/tool/algo/test/__init__.py
b/rpython/tool/algo/test/__init__.py
rename from pypy/tool/algo/test/__init__.py
rename to rpython/tool/algo/test/__init__.py
diff --git a/pypy/tool/algo/test/autopath.py
b/rpython/tool/algo/test/autopath.py
rename from pypy/tool/algo/test/autopath.py
rename to rpython/tool/algo/test/autopath.py
diff --git a/pypy/tool/algo/test/test_color.py
b/rpython/tool/algo/test/test_color.py
rename from pypy/tool/algo/test/test_color.py
rename to rpython/tool/algo/test/test_color.py
--- a/pypy/tool/algo/test/test_color.py
+++ b/rpython/tool/algo/test/test_color.py
@@ -1,4 +1,4 @@
-from pypy.tool.algo.color import DependencyGraph
+from rpython.tool.algo.color import DependencyGraph
def graph1():
diff --git a/pypy/tool/algo/test/test_fset.py
b/rpython/tool/algo/test/test_fset.py
rename from pypy/tool/algo/test/test_fset.py
rename to rpython/tool/algo/test/test_fset.py
--- a/pypy/tool/algo/test/test_fset.py
+++ b/rpython/tool/algo/test/test_fset.py
@@ -1,4 +1,4 @@
-from pypy.tool.algo.fset import FSet, checktree, emptyset
+from rpython.tool.algo.fset import FSet, checktree, emptyset
import random
diff --git a/pypy/tool/algo/test/test_graphlib.py
b/rpython/tool/algo/test/test_graphlib.py
rename from pypy/tool/algo/test/test_graphlib.py
rename to rpython/tool/algo/test/test_graphlib.py
--- a/pypy/tool/algo/test/test_graphlib.py
+++ b/rpython/tool/algo/test/test_graphlib.py
@@ -1,6 +1,6 @@
import autopath
import random
-from pypy.tool.algo.graphlib import *
+from rpython.tool.algo.graphlib import *
def copy_edges(edges):
result = {}
diff --git a/pypy/tool/algo/test/test_multiweakdict.py
b/rpython/tool/algo/test/test_multiweakdict.py
rename from pypy/tool/algo/test/test_multiweakdict.py
rename to rpython/tool/algo/test/test_multiweakdict.py
--- a/pypy/tool/algo/test/test_multiweakdict.py
+++ b/rpython/tool/algo/test/test_multiweakdict.py
@@ -1,5 +1,5 @@
import py, gc
-from pypy.tool.algo.multiweakdict import MultiWeakKeyDictionary
+from rpython.tool.algo.multiweakdict import MultiWeakKeyDictionary
class A(object):
diff --git a/pypy/tool/algo/test/test_sparsemat.py
b/rpython/tool/algo/test/test_sparsemat.py
rename from pypy/tool/algo/test/test_sparsemat.py
rename to rpython/tool/algo/test/test_sparsemat.py
--- a/pypy/tool/algo/test/test_sparsemat.py
+++ b/rpython/tool/algo/test/test_sparsemat.py
@@ -1,5 +1,5 @@
import autopath
-from pypy.tool.algo.sparsemat import *
+from rpython.tool.algo.sparsemat import *
def test_sparsemat1():
diff --git a/pypy/tool/algo/test/test_unionfind.py
b/rpython/tool/algo/test/test_unionfind.py
rename from pypy/tool/algo/test/test_unionfind.py
rename to rpython/tool/algo/test/test_unionfind.py
--- a/pypy/tool/algo/test/test_unionfind.py
+++ b/rpython/tool/algo/test/test_unionfind.py
@@ -1,4 +1,4 @@
-from pypy.tool.algo.unionfind import UnionFind
+from rpython.tool.algo.unionfind import UnionFind
def test_cleanup():
diff --git a/pypy/tool/algo/unionfind.py b/rpython/tool/algo/unionfind.py
rename from pypy/tool/algo/unionfind.py
rename to rpython/tool/algo/unionfind.py
diff --git a/rpython/translator/backendopt/graphanalyze.py
b/rpython/translator/backendopt/graphanalyze.py
--- a/rpython/translator/backendopt/graphanalyze.py
+++ b/rpython/translator/backendopt/graphanalyze.py
@@ -1,5 +1,5 @@
from rpython.translator.simplify import get_graph, get_funcobj
-from pypy.tool.algo.unionfind import UnionFind
+from rpython.tool.algo.unionfind import UnionFind
class GraphAnalyzer(object):
diff --git a/rpython/translator/backendopt/inline.py
b/rpython/translator/backendopt/inline.py
--- a/rpython/translator/backendopt/inline.py
+++ b/rpython/translator/backendopt/inline.py
@@ -4,7 +4,7 @@
SpaceOperation, c_last_exception, FunctionGraph, mkentrymap)
from rpython.rtyper.lltypesystem.lltype import Bool, Signed, typeOf, Void,
Ptr, normalizeptr
from rpython.rtyper.ootypesystem import ootype
-from pypy.tool.algo import sparsemat
+from rpython.tool.algo import sparsemat
from rpython.translator.backendopt import removenoops
from rpython.translator.backendopt.canraise import RaiseAnalyzer
from rpython.translator.backendopt.support import log, find_loop_blocks
diff --git a/rpython/translator/backendopt/innerloop.py
b/rpython/translator/backendopt/innerloop.py
--- a/rpython/translator/backendopt/innerloop.py
+++ b/rpython/translator/backendopt/innerloop.py
@@ -2,7 +2,7 @@
This is optional support code for backends: it finds which cycles
in a graph are likely to correspond to source-level 'inner loops'.
"""
-from pypy.tool.algo import graphlib
+from rpython.tool.algo import graphlib
from rpython.flowspace.model import Variable
from rpython.translator.backendopt.ssa import DataFlowFamilyBuilder
diff --git a/rpython/translator/backendopt/malloc.py
b/rpython/translator/backendopt/malloc.py
--- a/rpython/translator/backendopt/malloc.py
+++ b/rpython/translator/backendopt/malloc.py
@@ -1,5 +1,5 @@
from rpython.flowspace.model import Variable, Constant, SpaceOperation
-from pypy.tool.algo.unionfind import UnionFind
+from rpython.tool.algo.unionfind import UnionFind
from rpython.rtyper.lltypesystem import lltype
from rpython.rtyper.ootypesystem import ootype
from rpython.translator import simplify
diff --git a/rpython/translator/backendopt/ssa.py
b/rpython/translator/backendopt/ssa.py
--- a/rpython/translator/backendopt/ssa.py
+++ b/rpython/translator/backendopt/ssa.py
@@ -1,5 +1,5 @@
from rpython.flowspace.model import Variable, mkentrymap
-from pypy.tool.algo.unionfind import UnionFind
+from rpython.tool.algo.unionfind import UnionFind
class DataFlowFamilyBuilder:
"""Follow the flow of the data in the graph. Builds a UnionFind grouping
diff --git a/rpython/translator/transform.py b/rpython/translator/transform.py
--- a/rpython/translator/transform.py
+++ b/rpython/translator/transform.py
@@ -205,7 +205,7 @@
def insert_ll_stackcheck(translator):
from rpython.translator.backendopt.support import find_calls_from
from rpython.rlib.rstack import stack_check
- from pypy.tool.algo.graphlib import Edge, make_edge_dict, break_cycles_v
+ from rpython.tool.algo.graphlib import Edge, make_edge_dict, break_cycles_v
rtyper = translator.rtyper
graph = rtyper.annotate_helper(stack_check, [])
rtyper.specialize_more_blocks()
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit