Skip to content

Commit 1b3b922

Browse files
address Mark's review
1 parent 9b7b864 commit 1b3b922

File tree

6 files changed

+69
-72
lines changed

6 files changed

+69
-72
lines changed

Include/internal/pycore_opcode_metadata.h

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Include/internal/pycore_uop_metadata.h

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Python/bytecodes.c

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -689,10 +689,12 @@ dummy_func(
689689
((PyFloatObject *)left_o)->ob_fval *
690690
((PyFloatObject *)right_o)->ob_fval;
691691
res = PyStackRef_FromPyObjectSteal(PyFloat_FromDouble(dres));
692+
if (PyStackRef_IsNull(res)) {
693+
ERROR_NO_POP();
694+
}
692695
l = left;
693696
r = right;
694697
INPUTS_DEAD();
695-
ERROR_IF(PyStackRef_IsNull(res));
696698
}
697699

698700
pure op(_BINARY_OP_ADD_FLOAT, (left, right -- res, l, r)) {
@@ -706,10 +708,12 @@ dummy_func(
706708
((PyFloatObject *)left_o)->ob_fval +
707709
((PyFloatObject *)right_o)->ob_fval;
708710
res = PyStackRef_FromPyObjectSteal(PyFloat_FromDouble(dres));
711+
if (PyStackRef_IsNull(res)) {
712+
ERROR_NO_POP();
713+
}
709714
l = left;
710715
r = right;
711716
INPUTS_DEAD();
712-
ERROR_IF(PyStackRef_IsNull(res));
713717
}
714718

715719
pure op(_BINARY_OP_SUBTRACT_FLOAT, (left, right -- res, l, r)) {
@@ -723,10 +727,12 @@ dummy_func(
723727
((PyFloatObject *)left_o)->ob_fval -
724728
((PyFloatObject *)right_o)->ob_fval;
725729
res = PyStackRef_FromPyObjectSteal(PyFloat_FromDouble(dres));
730+
if (PyStackRef_IsNull(res)) {
731+
ERROR_NO_POP();
732+
}
726733
l = left;
727734
r = right;
728735
INPUTS_DEAD();
729-
ERROR_IF(PyStackRef_IsNull(res));
730736
}
731737

732738
macro(BINARY_OP_MULTIPLY_FLOAT) =

Python/executor_cases.c.h

Lines changed: 36 additions & 45 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Python/generated_cases.c.h

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Python/optimizer_cases.c.h

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)