Commits

Maciej Fijalkowski committed b0e02ce

(fijal, hodgestar) unroll one iteration of generators

  • Participants
  • Parent commits ade9aa8
  • Branches inline-simple-generators

Comments (0)

Files changed (1)

pypy/module/pypyjit/interp_jit.py

             ec.w_tracefunc is None)
 
 def can_never_inline(next_instr, is_being_profiled, bytecode):
-    #return (bytecode.co_flags & CO_GENERATOR) != 0
     return False
 
+def should_unroll_one_iteration(next_instr, is_being_profiled, bytecode):
+    return (bytecode.co_flags & CO_GENERATOR) != 0
+
 def wrap_oplist(space, logops, operations):
     list_w = []
     for op in operations:
                               get_jitcell_at = get_jitcell_at,
                               set_jitcell_at = set_jitcell_at,
                               confirm_enter_jit = confirm_enter_jit,
-                              can_never_inline = can_never_inline)
+                              can_never_inline = can_never_inline,
+                              should_unroll_one_iteration =
+                              should_unroll_one_iteration)
 
 class __extend__(PyFrame):