[pypy-svn] r70822 - pypy/branch/direct-assembler-call/pypy/interpreter

fijal at codespeak.net fijal at codespeak.net
Mon Jan 25 12:50:51 CET 2010


Author: fijal
Date: Mon Jan 25 12:50:51 2010
New Revision: 70822

Modified:
   pypy/branch/direct-assembler-call/pypy/interpreter/pyopcode.py
Log:
Always inline handle_bytecode and dispatch_bytecode. There are two important
points here:
* If we're extremely unlucky, we might end up with call to handle_bytecode
  becoming a residual call if we abort tracing in an unfortunate moment.
  This causes starting to compile the same loop again, hence explosion
  with "entering the same frame via blackhole"
* We should always inline any function that has a single call point, this
  is what gcc does for example.


Modified: pypy/branch/direct-assembler-call/pypy/interpreter/pyopcode.py
==============================================================================
--- pypy/branch/direct-assembler-call/pypy/interpreter/pyopcode.py	(original)
+++ pypy/branch/direct-assembler-call/pypy/interpreter/pyopcode.py	Mon Jan 25 12:50:51 2010
@@ -119,6 +119,7 @@
                 self.space.w_RuntimeError,
                 self.space.wrap(msg))
         return next_instr
+    handle_bytecode._always_inline_ = True
         
     def handle_asynchronous_error(self, ec, w_type, w_value=None):
         # catch asynchronous exceptions and turn them
@@ -270,6 +271,7 @@
 
             if jit.we_are_jitted():
                 return next_instr
+    dispatch_bytecode._always_inline_ = True
 
     @jit.unroll_safe
     def unrollstack(self, unroller_kind):



More information about the Pypy-commit mailing list