summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2023-01-24 22:58:18 (GMT)
committerGitHub <noreply@github.com>2023-01-24 22:58:18 (GMT)
commit498598e8c2d64232d26c075de87c513415176bbf (patch)
tree2bf998a87ca8794afdd38254e9ed39e8b6e7c7bd /Python
parent1a9d8c750be83e6abb65769d312361fe9742de02 (diff)
downloadcpython-498598e8c2d64232d26c075de87c513415176bbf.zip
cpython-498598e8c2d64232d26c075de87c513415176bbf.tar.gz
cpython-498598e8c2d64232d26c075de87c513415176bbf.tar.bz2
Fix some comments in ceval.c and fix lltrace output (#101297)
The comment at the top was rather outdated. :-) Also added a note about the dangers of dump_stack().
Diffstat (limited to 'Python')
-rw-r--r--Python/ceval.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index 95eb99b..2e6fed5 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -1,10 +1,5 @@
/* Execute compiled code */
-/* XXX TO DO:
- XXX speed up searching for keywords by using a dictionary
- XXX document it!
- */
-
#define _PY_INTERPRETER
#include "Python.h"
@@ -133,6 +128,9 @@ lltrace_instruction(_PyInterpreterFrame *frame,
PyObject **stack_pointer,
_Py_CODEUNIT *next_instr)
{
+ /* This dump_stack() operation is risky, since the repr() of some
+ objects enters the interpreter recursively. It is also slow.
+ So you might want to comment it out. */
dump_stack(frame, stack_pointer);
int oparg = _Py_OPARG(*next_instr);
int opcode = _Py_OPCODE(*next_instr);
@@ -155,7 +153,7 @@ lltrace_resume_frame(_PyInterpreterFrame *frame)
fobj == NULL ||
!PyFunction_Check(fobj)
) {
- printf("\nResuming frame.");
+ printf("\nResuming frame.\n");
return;
}
PyFunctionObject *f = (PyFunctionObject *)fobj;