Пример #1
0
 def on_trace_too_long(self, jitdriver, greenkey, greenkey_repr):
     space = self.space
     cache = space.fromcache(Cache)
     if cache.in_recursion:
         return
     if space.is_true(cache.w_trace_too_long_hook):
         cache.in_recursion = True
         try:
             try:
                 space.call_function(cache.w_trace_too_long_hook,
                     space.wrap(jitdriver.name),
                     wrap_greenkey(space, jitdriver, greenkey, greenkey_repr))
             except OperationError, e:
                 e.write_unraisable(space, "jit hook", cache.w_trace_too_long_hook)
         finally:
             cache.in_recursion = False
Пример #2
0
 def on_abort(self, reason, jitdriver, greenkey, greenkey_repr):
     space = self.space
     cache = space.fromcache(Cache)
     if cache.in_recursion:
         return
     if space.is_true(cache.w_abort_hook):
         cache.in_recursion = True
         try:
             try:
                 space.call_function(
                     cache.w_abort_hook, space.wrap(jitdriver.name),
                     wrap_greenkey(space, jitdriver, greenkey,
                                   greenkey_repr),
                     space.wrap(counter_names[reason]))
             except OperationError, e:
                 e.write_unraisable(space, "jit hook ", cache.w_abort_hook)
         finally:
             cache.in_recursion = False
Пример #3
0
 def on_abort(self, reason, jitdriver, greenkey, greenkey_repr):
     space = self.space
     cache = space.fromcache(Cache)
     if cache.in_recursion:
         return
     if space.is_true(cache.w_abort_hook):
         cache.in_recursion = True
         try:
             try:
                 space.call_function(cache.w_abort_hook,
                                     space.wrap(jitdriver.name),
                                     wrap_greenkey(space, jitdriver,
                                                   greenkey, greenkey_repr),
                                     space.wrap(counter_names[reason]))
             except OperationError, e:
                 e.write_unraisable(space, "jit hook ", cache.w_abort_hook)
         finally:
             cache.in_recursion = False
Пример #4
0
 def on_trace_too_long(self, jitdriver, greenkey, greenkey_repr):
     space = self.space
     cache = space.fromcache(Cache)
     if cache.in_recursion:
         return
     if space.is_true(cache.w_trace_too_long_hook):
         cache.in_recursion = True
         try:
             try:
                 space.call_function(
                     cache.w_trace_too_long_hook,
                     space.newtext(jitdriver.name),
                     wrap_greenkey(space, jitdriver, greenkey,
                                   greenkey_repr))
             except OperationError as e:
                 e.write_unraisable(space, "jit hook",
                                    cache.w_trace_too_long_hook)
         finally:
             cache.in_recursion = False
Пример #5
0
 def on_abort(self, reason, jitdriver, greenkey, greenkey_repr, logops,
              operations):
     space = self.space
     cache = space.fromcache(Cache)
     if cache.in_recursion:
         return
     if space.is_true(cache.w_abort_hook):
         cache.in_recursion = True
         oplist_w = wrap_oplist(space, logops, operations)
         try:
             try:
                 space.call_function(
                     cache.w_abort_hook, space.newtext(jitdriver.name),
                     wrap_greenkey(space, jitdriver, greenkey,
                                   greenkey_repr),
                     space.newtext(Counters.counter_names[reason]),
                     space.newlist(oplist_w))
             except OperationError as e:
                 e.write_unraisable(space, "jit hook ", cache.w_abort_hook)
         finally:
             cache.in_recursion = False
Пример #6
0
 def before_compile(self, debug_info):
     w_greenkey = wrap_greenkey(self.space, debug_info.get_jitdriver(),
                                debug_info.greenkey,
                                debug_info.get_greenkey_repr())
     self._optimize_hook(debug_info, w_greenkey)
Пример #7
0
 def after_compile(self, debug_info):
     w_greenkey = wrap_greenkey(self.space, debug_info.get_jitdriver(),
                                debug_info.greenkey,
                                debug_info.get_greenkey_repr())
     self._compile_hook(debug_info, w_greenkey)
Пример #8
0
 def before_compile(self, debug_info):
     w_greenkey = wrap_greenkey(self.space, debug_info.get_jitdriver(),
                                debug_info.greenkey,
                                debug_info.get_greenkey_repr())
     self._optimize_hook(debug_info, w_greenkey)
Пример #9
0
 def after_compile(self, debug_info):
     w_greenkey = wrap_greenkey(self.space, debug_info.get_jitdriver(),
                                debug_info.greenkey,
                                debug_info.get_greenkey_repr())
     self._compile_hook(debug_info, w_greenkey)