Antonio Cuni avatar Antonio Cuni committed 263d335

don't rely on threshold but explicitly set _always_inline_

Comments (0)

Files changed (2)


-    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.


             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
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.