[pypy-svn] r43670 - in pypy/dist/pypy: jit/hintannotator lang/prolog/interpreter module/pypyjit
pedronis at codespeak.net
pedronis at codespeak.net
Sat May 26 14:01:37 CEST 2007
Author: pedronis
Date: Sat May 26 14:01:35 2007
New Revision: 43670
Modified:
pypy/dist/pypy/jit/hintannotator/policy.py
pypy/dist/pypy/lang/prolog/interpreter/portal.py
pypy/dist/pypy/module/pypyjit/portal.py
Log:
trying to fix translate.py --jit which should have been tested before merging :(
still broken but goes further than when I started
Modified: pypy/dist/pypy/jit/hintannotator/policy.py
==============================================================================
--- pypy/dist/pypy/jit/hintannotator/policy.py (original)
+++ pypy/dist/pypy/jit/hintannotator/policy.py Sat May 26 14:01:35 2007
@@ -51,7 +51,7 @@
self.timeshift_graphs = {}
portal = getattr(self.PORTAL, 'im_func', self.PORTAL)
portal_graph = graphof(t, portal)
- self.fill_timeshift_graphs(t, portal_graph)
+ self.fill_timeshift_graphs(portal_graph)
def look_inside_graph(self, graph):
if graph in self.timeshift_graphs:
@@ -75,7 +75,7 @@
def look_inside_graph_of_module(self, graph, func, mod):
return True
- def fill_timeshift_graphs(self, t, portal_graph):
+ def fill_timeshift_graphs(self, portal_graph):
# subclasses should have their own
pass
@@ -87,7 +87,7 @@
def seefunc(self, fromfunc, *tofuncs):
targetgraphs = {}
for tofunc in tofuncs:
- targetgraphs[_graph(tofunc)] = True
+ targetgraphs[self._graph(tofunc)] = True
graphs = graphs_on_the_path_to(self.translator, self._graph(fromfunc),
targetgraphs)
for graph in graphs:
Modified: pypy/dist/pypy/lang/prolog/interpreter/portal.py
==============================================================================
--- pypy/dist/pypy/lang/prolog/interpreter/portal.py (original)
+++ pypy/dist/pypy/lang/prolog/interpreter/portal.py Sat May 26 14:01:35 2007
@@ -25,7 +25,7 @@
return False
return True
- def fill_timeshift_graphs(self, t, portal_graph):
+ def fill_timeshift_graphs(self, portal_graph):
import pypy
for cls in [term.Var, term.Term, term.Number, term.Atom]:
self.seegraph(cls.copy)
Modified: pypy/dist/pypy/module/pypyjit/portal.py
==============================================================================
--- pypy/dist/pypy/module/pypyjit/portal.py (original)
+++ pypy/dist/pypy/module/pypyjit/portal.py Sat May 26 14:01:35 2007
@@ -1,3 +1,4 @@
+import pypy
from pypy.module.pypyjit.interp_jit import PORTAL
from pypy.module.pypyjit.newbool import NewBoolDesc
from pypy.translator.translator import graphof
@@ -5,6 +6,8 @@
from pypy.jit.hintannotator.policy import ManualGraphPolicy
class PyPyHintAnnotatorPolicy(ManualGraphPolicy):
+ PORTAL = PORTAL
+
def look_inside_graph_of_module(self, graph, func, module):
if mod.startswith('pypy.objspace'):
return False
@@ -125,6 +128,6 @@
portal = getattr(PORTAL, 'im_func', PORTAL)
portal_graph = graphof(t, portal)
- policy = PyPyHintAnnotatorPolicy(timeshift_graphs(t, portal_graph,
- drv.log))
+ policy = PyPyHintAnnotatorPolicy()
+ policy.seetranslator(t)
return portal, policy
More information about the Pypy-commit
mailing list