[pypy-commit] pypy default: Document issue (from pypy-dev)
arigo
pypy.commits at gmail.com
Wed Mar 16 04:44:34 EDT 2016
Author: Armin Rigo <arigo at 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
More information about the pypy-commit
mailing list