Antonio Cuni  committed 263d335

don't rely on threshold but explicitly set _always_inline_

  • Participants
  • Parent commits 1b0cf91
  • Branches autoreds

Comments (0)

Files changed (2)

File pypy/jit/metainterp/test/

-    def test_inline_in_portal_exception(self):
+    def test_jitdriver_inline_exception(self):
         # this simulates what happens in a real case scenario: inside the next
         # we have a call which we cannot inline (e.g. in the case
         # of W_InterpIterable), but we need to put it in a try/except block.

File pypy/jit/metainterp/

             func = getattr(callee, 'func', None)
             _inline_jit_merge_point_ = getattr(func, '_inline_jit_merge_point_', None)
             if _inline_jit_merge_point_:
+                _inline_jit_merge_point_._always_inline_ = True
                 op_jmp_call, jmp_graph = get_jmp_call(callee, _inline_jit_merge_point_)
                 # now we move the op_jmp_call from callee to caller, just
         # inline them!
-        inline_threshold = self.translator.config.translation.backendopt.inline_threshold
+        inline_threshold = 0.1 # we rely on the _always_inline_ set above
         auto_inlining(self.translator, inline_threshold, new_callgraph)
         # make a fresh copy of the JitDriver in all newly created