summaryrefslogtreecommitdiffstats
path: root/Python/ceval.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2022-10-11 23:45:53 (GMT)
committerGitHub <noreply@github.com>2022-10-11 23:45:53 (GMT)
commitf5d71073e61b69b3ab331736fd69dc6324405775 (patch)
tree055841e56a60562cfcbeb35c4fbf9e30e51dd55e /Python/ceval.c
parent5ecf961640192a2192383aa20e1e93dcdf23c9b6 (diff)
downloadcpython-f5d71073e61b69b3ab331736fd69dc6324405775.zip
cpython-f5d71073e61b69b3ab331736fd69dc6324405775.tar.gz
cpython-f5d71073e61b69b3ab331736fd69dc6324405775.tar.bz2
Fix some incorrect indentation around the main switch (#98177)
The `}` marked with `/* End instructions */` is the end of the switch. There is another pair of `{}` around the switch, which is vestigial from ancient times when it was `for (;;) { switch (opcode) { ... } }`. All `DISPATCH` macro calls should be inside that pair.
Diffstat (limited to 'Python/ceval.c')
-rw-r--r--Python/ceval.c41
1 files changed, 20 insertions, 21 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index ee1baba..a112f8b 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -1152,12 +1152,11 @@ handle_eval_breaker:
{
/* Start instructions */
-#if USE_COMPUTED_GOTOS
- {
-#else
+#if !USE_COMPUTED_GOTOS
dispatch_opcode:
- switch (opcode) {
+ switch (opcode)
#endif
+ {
/* BEWARE!
It is essential that any operation that fails must goto error
@@ -5102,23 +5101,23 @@ handle_eval_breaker:
/* Specialization misses */
miss:
- {
- STAT_INC(opcode, miss);
- opcode = _PyOpcode_Deopt[opcode];
- STAT_INC(opcode, miss);
- /* The counter is always the first cache entry: */
- _Py_CODEUNIT *counter = (_Py_CODEUNIT *)next_instr;
- *counter -= 1;
- if (*counter == 0) {
- int adaptive_opcode = _PyOpcode_Adaptive[opcode];
- assert(adaptive_opcode);
- _Py_SET_OPCODE(next_instr[-1], adaptive_opcode);
- STAT_INC(opcode, deopt);
- *counter = adaptive_counter_start();
- }
- next_instr--;
- DISPATCH_GOTO();
- }
+ {
+ STAT_INC(opcode, miss);
+ opcode = _PyOpcode_Deopt[opcode];
+ STAT_INC(opcode, miss);
+ /* The counter is always the first cache entry: */
+ _Py_CODEUNIT *counter = (_Py_CODEUNIT *)next_instr;
+ *counter -= 1;
+ if (*counter == 0) {
+ int adaptive_opcode = _PyOpcode_Adaptive[opcode];
+ assert(adaptive_opcode);
+ _Py_SET_OPCODE(next_instr[-1], adaptive_opcode);
+ STAT_INC(opcode, deopt);
+ *counter = adaptive_counter_start();
+ }
+ next_instr--;
+ DISPATCH_GOTO();
+ }
unbound_local_error:
{