diff options
author | Michael W. Hudson <mwh@python.net> | 2002-08-30 13:09:51 (GMT) |
---|---|---|
committer | Michael W. Hudson <mwh@python.net> | 2002-08-30 13:09:51 (GMT) |
commit | 53d58bb369fbbc1ae93ca423f30b3beb2d83a9a1 (patch) | |
tree | d2cfada7ddfa673a343155bfbad7de1166ea3790 /Doc | |
parent | b05e056e9f17f68daf106e1b018d1bbab2943148 (diff) | |
download | cpython-53d58bb369fbbc1ae93ca423f30b3beb2d83a9a1.zip cpython-53d58bb369fbbc1ae93ca423f30b3beb2d83a9a1.tar.gz cpython-53d58bb369fbbc1ae93ca423f30b3beb2d83a9a1.tar.bz2 |
Further SET_LINENO reomval fixes. See comments in patch #587933.
Use a slightly different strategy to determine when not to call the line
trace function. This removes the need for the RETURN_NONE opcode, so
that's gone again. Update docs and comments to match.
Thanks to Neal and Armin!
Also add a test suite. This should have come with the original patch...
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/lib/libdis.tex | 11 | ||||
-rw-r--r-- | Doc/whatsnew/whatsnew23.tex | 5 |
2 files changed, 2 insertions, 14 deletions
diff --git a/Doc/lib/libdis.tex b/Doc/lib/libdis.tex index 567c0ee..7bdd239 100644 --- a/Doc/lib/libdis.tex +++ b/Doc/lib/libdis.tex @@ -27,7 +27,8 @@ the following command can be used to get the disassembly of 3 LOAD_FAST 0 (alist) 6 CALL_FUNCTION 1 9 RETURN_VALUE - 10 RETURN_NONE + 10 LOAD_CONST 0 (None) + 13 RETURN_VALUE \end{verbatim} (The ``2'' is a line number). @@ -401,14 +402,6 @@ is evaluated, the locals are passed to the class definition. Returns with TOS to the caller of the function. \end{opcodedesc} -\begin{opcodedesc}{RETURN_NONE}{} -Returns \constant{None} to the caller of the function. This opcode is -generated as the last opcode of every function and only then, for -reasons to do with tracing support. See the comments in the function -\cfunction{maybe_call_line_trace} in \file{Python/ceval.c} for the -gory details. \versionadded{2.3}. -\end{opcodedesc} - \begin{opcodedesc}{YIELD_VALUE}{} Pops \code{TOS} and yields it from a generator. \end{opcodedesc} diff --git a/Doc/whatsnew/whatsnew23.tex b/Doc/whatsnew/whatsnew23.tex index a971791..ff16de1 100644 --- a/Doc/whatsnew/whatsnew23.tex +++ b/Doc/whatsnew/whatsnew23.tex @@ -1225,11 +1225,6 @@ should instead call \code{PyCode_Addr2Line(f->f_code, f->f_lasti)}. This will have the added effect of making the code work as desired under ``python -O'' in earlier versions of Python. -To make tracing work as expected, it was found necessary to add a new -opcode, \cdata{RETURN_NONE}, to the VM. If you want to know why, read -the comments in the function \cfunction{maybe_call_line_trace} in -\file{Python/ceval.c}. - \end{itemize} |