[pypy-svn] r62499 - pypy/branch/pyjitpl5/pypy/module/pypyjit
fijal at codespeak.net
fijal at codespeak.net
Tue Mar 3 22:03:21 CET 2009
Author: fijal
Date: Tue Mar 3 22:03:19 2009
New Revision: 62499
Modified:
pypy/branch/pyjitpl5/pypy/module/pypyjit/interp_jit.py
Log:
Make PyFrame a virtualizable2. Also promote a position on valuestack
and make valuestack_w always virtual
Modified: pypy/branch/pyjitpl5/pypy/module/pypyjit/interp_jit.py
==============================================================================
--- pypy/branch/pyjitpl5/pypy/module/pypyjit/interp_jit.py (original)
+++ pypy/branch/pyjitpl5/pypy/module/pypyjit/interp_jit.py Tue Mar 3 22:03:19 2009
@@ -6,7 +6,7 @@
import sys
from pypy.tool.pairtype import extendabletype
from pypy.rlib.rarithmetic import r_uint, intmask
-from pypy.rlib.jit import JitDriver
+from pypy.rlib.jit import JitDriver, hint
import pypy.interpreter.pyopcode # for side-effects
from pypy.interpreter.error import OperationError
from pypy.interpreter.gateway import ObjSpace, Arguments
@@ -17,11 +17,13 @@
from pypy.interpreter.pyopcode import ExitFrame
-#Frame._virtualizable2_ = True
+PyFrame._virtualizable2_ = True
+PyFrame._always_virtual_ = ['valuestack_w']
class PyPyJitDriver(JitDriver):
reds = ['frame', 'ec']
greens = ['next_instr', 'pycode']
+ virtualizables = ['frame']
## def compute_invariants(self, reds, next_instr, pycode):
## # compute the information that really only depends on next_instr
@@ -42,6 +44,7 @@
pypyjitdriver.jit_merge_point(
frame=self, ec=ec, next_instr=next_instr, pycode=pycode)
co_code = pycode.co_code
+ self.valuestackdepth = hint(self.valuestackdepth, promote=True)
next_instr = self.handle_bytecode(co_code, next_instr, ec)
except ExitFrame:
return self.popvalue()
More information about the Pypy-commit
mailing list