[pypy-svn] r52069 - pypy/branch/jit-refactoring/pypy/jit/timeshifter
arigo at codespeak.net
arigo at codespeak.net
Sun Mar 2 20:27:25 CET 2008
Author: arigo
Date: Sun Mar 2 20:27:25 2008
New Revision: 52069
Modified:
pypy/branch/jit-refactoring/pypy/jit/timeshifter/rtimeshift.py
Log:
Now that promote() is no longer specialized (which looks like a good
idea for a function this large anyway), we need an RPython fix.
Modified: pypy/branch/jit-refactoring/pypy/jit/timeshifter/rtimeshift.py
==============================================================================
--- pypy/branch/jit-refactoring/pypy/jit/timeshifter/rtimeshift.py (original)
+++ pypy/branch/jit-refactoring/pypy/jit/timeshifter/rtimeshift.py Sun Mar 2 20:27:25 2008
@@ -778,9 +778,17 @@
self.ll_continue_compilation = ll_continue_compilation
FUNCTYPE = lltype.FuncType([base_ptr_lltype(), ERASED], lltype.Void)
- self.FUNCPTRTYPE = lltype.Ptr(FUNCTYPE)
+ FUNCPTRTYPE = lltype.Ptr(FUNCTYPE)
+ self.FUNCPTRTYPE = FUNCPTRTYPE
self.sigtoken = interpreter.rgenop.sigToken(FUNCTYPE)
+ def get_gv_continue_compilation(builder):
+ fnptr = llhelper(FUNCPTRTYPE, ll_continue_compilation)
+ # ^^^ the llhelper cannot be attached on 'self' directly, because
+ # the translator needs to see its construction done by RPython code
+ return builder.rgenop.genconst(fnptr)
+ self.get_gv_continue_compilation = get_gv_continue_compilation
+
def _freeze_(self):
return True
@@ -813,11 +821,9 @@
exceptiondesc.gv_null_exc_type )
exceptiondesc.genop_set_exc_value(default_builder,
exceptiondesc.gv_null_exc_value)
- fnptr = llhelper(promotiondesc.FUNCPTRTYPE,
- promotiondesc.ll_continue_compilation)
- gv_continue_compilation = default_builder.rgenop.genconst(fnptr)
+ gv_cc = promotiondesc.get_gv_continue_compilation(default_builder)
default_builder.genop_call(promotiondesc.sigtoken,
- gv_continue_compilation,
+ gv_cc,
[gv_pm, gv_switchvar])
exceptiondesc.genop_set_exc_type (default_builder, gv_exc_type )
exceptiondesc.genop_set_exc_value(default_builder, gv_exc_value)
More information about the Pypy-commit
mailing list