Skip to content

Commit 4213d83

Browse files
committed
Remove all 'if (0)' and 'if (1)' conditional stack effects
1 parent a10f993 commit 4213d83

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

Python/bytecodes.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2077,7 +2077,7 @@ dummy_func(
20772077

20782078
macro(LOAD_SUPER_ATTR) = _SPECIALIZE_LOAD_SUPER_ATTR + _LOAD_SUPER_ATTR;
20792079

2080-
inst(LOAD_SUPER_ATTR_ATTR, (unused/1, global_super_st, class_st, self_st -- attr_st, unused if (0))) {
2080+
inst(LOAD_SUPER_ATTR_ATTR, (unused/1, global_super_st, class_st, self_st -- attr_st)) {
20812081
PyObject *global_super = PyStackRef_AsPyObjectBorrow(global_super_st);
20822082
PyObject *class = PyStackRef_AsPyObjectBorrow(class_st);
20832083
PyObject *self = PyStackRef_AsPyObjectBorrow(self_st);
@@ -2412,7 +2412,7 @@ dummy_func(
24122412
_SAVE_RETURN_OFFSET +
24132413
_PUSH_FRAME;
24142414

2415-
inst(LOAD_ATTR_GETATTRIBUTE_OVERRIDDEN, (unused/1, type_version/2, func_version/2, getattribute/4, owner -- unused, unused if (0))) {
2415+
inst(LOAD_ATTR_GETATTRIBUTE_OVERRIDDEN, (unused/1, type_version/2, func_version/2, getattribute/4, owner -- unused)) {
24162416
PyObject *owner_o = PyStackRef_AsPyObjectBorrow(owner);
24172417

24182418
assert((oparg & 1) == 0);
@@ -3348,7 +3348,7 @@ dummy_func(
33483348
DEOPT_IF(FT_ATOMIC_LOAD_UINT32_RELAXED(keys->dk_version) != keys_version);
33493349
}
33503350

3351-
split op(_LOAD_ATTR_METHOD_WITH_VALUES, (descr/4, owner -- attr, self if (1))) {
3351+
split op(_LOAD_ATTR_METHOD_WITH_VALUES, (descr/4, owner -- attr, self)) {
33523352
assert(oparg & 1);
33533353
/* Cached method object */
33543354
STAT_INC(LOAD_ATTR, hit);
@@ -3366,7 +3366,7 @@ dummy_func(
33663366
_GUARD_KEYS_VERSION +
33673367
_LOAD_ATTR_METHOD_WITH_VALUES;
33683368

3369-
op(_LOAD_ATTR_METHOD_NO_DICT, (descr/4, owner -- attr, self if (1))) {
3369+
op(_LOAD_ATTR_METHOD_NO_DICT, (descr/4, owner -- attr, self)) {
33703370
assert(oparg & 1);
33713371
assert(Py_TYPE(PyStackRef_AsPyObjectBorrow(owner))->tp_dictoffset == 0);
33723372
STAT_INC(LOAD_ATTR, hit);
@@ -3383,7 +3383,7 @@ dummy_func(
33833383
unused/2 +
33843384
_LOAD_ATTR_METHOD_NO_DICT;
33853385

3386-
op(_LOAD_ATTR_NONDESCRIPTOR_WITH_VALUES, (descr/4, owner -- attr, unused if (0))) {
3386+
op(_LOAD_ATTR_NONDESCRIPTOR_WITH_VALUES, (descr/4, owner -- attr)) {
33873387
assert((oparg & 1) == 0);
33883388
STAT_INC(LOAD_ATTR, hit);
33893389
assert(descr != NULL);
@@ -3398,7 +3398,7 @@ dummy_func(
33983398
_GUARD_KEYS_VERSION +
33993399
_LOAD_ATTR_NONDESCRIPTOR_WITH_VALUES;
34003400

3401-
op(_LOAD_ATTR_NONDESCRIPTOR_NO_DICT, (descr/4, owner -- attr, unused if (0))) {
3401+
op(_LOAD_ATTR_NONDESCRIPTOR_NO_DICT, (descr/4, owner -- attr)) {
34023402
assert((oparg & 1) == 0);
34033403
assert(Py_TYPE(PyStackRef_AsPyObjectBorrow(owner))->tp_dictoffset == 0);
34043404
STAT_INC(LOAD_ATTR, hit);
@@ -3420,7 +3420,7 @@ dummy_func(
34203420
DEOPT_IF(dict != NULL);
34213421
}
34223422

3423-
op(_LOAD_ATTR_METHOD_LAZY_DICT, (descr/4, owner -- attr, self if (1))) {
3423+
op(_LOAD_ATTR_METHOD_LAZY_DICT, (descr/4, owner -- attr, self)) {
34243424
assert(oparg & 1);
34253425
STAT_INC(LOAD_ATTR, hit);
34263426
assert(descr != NULL);

Python/executor_cases.c.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/generated_cases.c.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.

0 commit comments

Comments
 (0)