Author: Armin Rigo <ar...@tunes.org> Branch: Changeset: r83078:eda9fd6a0601 Date: 2016-03-16 09:43 +0100 http://bitbucket.org/pypy/pypy/changeset/eda9fd6a0601/
Log: Document issue (from pypy-dev) diff --git a/rpython/rlib/jit.py b/rpython/rlib/jit.py --- a/rpython/rlib/jit.py +++ b/rpython/rlib/jit.py @@ -1059,6 +1059,14 @@ of JIT running like JIT loops compiled, aborts etc. An instance of this class will be available as policy.jithookiface. """ + # WARNING: You should make a single prebuilt instance of a subclass + # of this class. You can, before translation, initialize some + # attributes on this instance, and then read or change these + # attributes inside the methods of the subclass. But this prebuilt + # instance *must not* be seen during the normal annotation/rtyping + # of the program! A line like ``pypy_hooks.foo = ...`` must not + # appear inside your interpreter's RPython code. + def on_abort(self, reason, jitdriver, greenkey, greenkey_repr, logops, operations): """ A hook called each time a loop is aborted with jitdriver and greenkey where it started, reason is a string why it got aborted _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit