summaryrefslogtreecommitdiffstats
path: root/Python/optimizer_analysis.c
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2024-06-17 13:40:11 (GMT)
committerGitHub <noreply@github.com>2024-06-17 13:40:11 (GMT)
commit274f844830898355f14d6edb6e71894a2f37e53c (patch)
tree0f6ef2d7e7fd30f42fe83bbc05859314ac1c230a /Python/optimizer_analysis.c
parent79e09e60d865b7b3fcde9ccee86a502da82bb2b3 (diff)
downloadcpython-274f844830898355f14d6edb6e71894a2f37e53c.zip
cpython-274f844830898355f14d6edb6e71894a2f37e53c.tar.gz
cpython-274f844830898355f14d6edb6e71894a2f37e53c.tar.bz2
GH-120619: Clean up `RETURN_VALUE` instruction (GH-120624)
* Rename _POP_FRAME to _RETURN_VALUE as it returns a value as well as popping a frame. * Remove remaining _POP_FRAMEs
Diffstat (limited to 'Python/optimizer_analysis.c')
-rw-r--r--Python/optimizer_analysis.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Python/optimizer_analysis.c b/Python/optimizer_analysis.c
index 75d1d9f..0e45bd8 100644
--- a/Python/optimizer_analysis.c
+++ b/Python/optimizer_analysis.c
@@ -265,7 +265,7 @@ remove_globals(_PyInterpreterFrame *frame, _PyUOpInstruction *buffer,
}
break;
}
- case _POP_FRAME:
+ case _RETURN_VALUE:
{
builtins_watched >>= 1;
globals_watched >>= 1;
@@ -365,13 +365,13 @@ eliminate_pop_guard(_PyUOpInstruction *this_instr, bool exit)
}
}
-/* _PUSH_FRAME/_POP_FRAME's operand can be 0, a PyFunctionObject *, or a
+/* _PUSH_FRAME/_RETURN_VALUE's operand can be 0, a PyFunctionObject *, or a
* PyCodeObject *. Retrieve the code object if possible.
*/
static PyCodeObject *
get_code(_PyUOpInstruction *op)
{
- assert(op->opcode == _PUSH_FRAME || op->opcode == _POP_FRAME || op->opcode == _RETURN_GENERATOR);
+ assert(op->opcode == _PUSH_FRAME || op->opcode == _RETURN_VALUE || op->opcode == _RETURN_GENERATOR);
PyCodeObject *co = NULL;
uint64_t operand = op->operand;
if (operand == 0) {