Author: Armin Rigo <ar...@tunes.org> Branch: Changeset: r87061:a8a4ffe56b74 Date: 2016-09-13 09:37 +0100 http://bitbucket.org/pypy/pypy/changeset/a8a4ffe56b74/
Log: Warning diff --git a/rpython/jit/codewriter/call.py b/rpython/jit/codewriter/call.py --- a/rpython/jit/codewriter/call.py +++ b/rpython/jit/codewriter/call.py @@ -250,6 +250,8 @@ error = '@jit.loop_invariant' if hasattr(graph.func, '_call_aroundstate_target_'): error = '_call_aroundstate_target_' + if hasattr(graph.func, '_call_shortcut_'): + error = '@jit.call_shortcut' if not error: continue raise Exception( diff --git a/rpython/rlib/jit.py b/rpython/rlib/jit.py --- a/rpython/rlib/jit.py +++ b/rpython/rlib/jit.py @@ -259,6 +259,8 @@ def call_shortcut(func): """A decorator to ensure that a function has a fast-path. + DOES NOT RELIABLY WORK ON METHODS, USE ONLY ON FUNCTIONS! + Only useful on functions that the JIT doesn't normally look inside. It still replaces residual calls to that function with inline code that checks for a fast path, and only does the call if not. For _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit