[pypy-commit] pypy jit-applevel-info: remove this approach will try something else
fijal
noreply at buildbot.pypy.org
Fri May 20 12:44:29 CEST 2011
Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: jit-applevel-info
Changeset: r44320:6749b4d7d3ed
Date: 2011-05-20 12:52 +0200
http://bitbucket.org/pypy/pypy/changeset/6749b4d7d3ed/
Log: remove this approach will try something else
diff --git a/pypy/module/pypyjit/__init__.py b/pypy/module/pypyjit/__init__.py
--- a/pypy/module/pypyjit/__init__.py
+++ b/pypy/module/pypyjit/__init__.py
@@ -7,7 +7,6 @@
interpleveldefs = {
'set_param': 'interp_jit.set_param',
'residual_call': 'interp_jit.residual_call',
- 'getjitinfo': 'interp_info.getjitinfo',
}
def setup_after_space_initialization(self):
diff --git a/pypy/module/pypyjit/interp_info.py b/pypy/module/pypyjit/interp_info.py
deleted file mode 100644
--- a/pypy/module/pypyjit/interp_info.py
+++ /dev/null
@@ -1,23 +0,0 @@
-
-from pypy.interpreter.baseobjspace import Wrappable, ObjSpace, W_Root
-from pypy.interpreter.typedef import TypeDef, interp_attrproperty
-from pypy.interpreter.gateway import unwrap_spec
-from pypy.interpreter.pycode import PyCode
-
-class MergePointInfo(Wrappable):
- def __init__(self, jitcell):
- self.counter = jitcell.counter
-
-MergePointInfo.typedef = TypeDef(
- 'MergePointInfo',
- counter = interp_attrproperty('counter', cls=MergePointInfo),
-)
-MergePointInfo.typedef.acceptable_as_base_class = False
-
- at unwrap_spec(ObjSpace, W_Root)
-def getjitinfo(space, w_obj):
- pycode = space.interp_w(PyCode, w_obj)
- w_dict = space.newdict()
- for k, v in pycode.jit_cells.items():
- space.setitem(w_dict, space.wrap(k), MergePointInfo(v))
- return w_dict
diff --git a/pypy/module/pypyjit/test/test_jit_info.py b/pypy/module/pypyjit/test/test_jit_info.py
deleted file mode 100644
--- a/pypy/module/pypyjit/test/test_jit_info.py
+++ /dev/null
@@ -1,24 +0,0 @@
-from pypy.conftest import gettestobjspace
-from pypy.jit.metainterp.warmstate import JitCell
-
-class AppTestJitInfo(object):
- def setup_class(cls):
- space = gettestobjspace(usemodules=('pypyjit',))
- cls.space = space
- cell = JitCell()
- cell.counter = 13
- w_code = space.appexec([], '''():
- def f():
- pass
- return f.func_code
- ''')
- w_code.jit_cells[13] = cell
- cls.w_code = w_code
-
- def test_getjitinfo(self):
- import pypyjit
-
- info = pypyjit.getjitinfo(self.code)
- assert info[13].counter == 13
-
-
More information about the pypy-commit
mailing list