8000 GH-98831: Remove all remaining DISPATCH() calls from bytecodes.c by gvanrossum · Pull Request #99271 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

GH-98831: Remove all remaining DISPATCH() calls from bytecodes.c #99271

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Nov 10, 2022
Prev Previous commit
Next Next commit
Whitespace/braces from Brandt's review
Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
  • Loading branch information
gvanrossum and brandtbucher authored Nov 10, 2022
commit 67200bffbf0b983b78f59657f3db05284dbcb4d3
19 changes: 11 additions & 8 deletions Python/bytecodes.c
Original file line number Diff line number Diff line change
Expand Up @@ -930,10 +930,10 @@ dummy_func(
PUSH(value);
}
else {
PyObject *exc_type = Py_NewRef(Py_TYPE(exc_value));
PyObject *exc_traceback = PyException_GetTraceback(exc_value);
_PyErr_Restore(tstate, exc_type, Py_NewRef(exc_value), exc_traceback);
goto exception_unwind;
PyObject *exc_type = Py_NewRef(Py_TYPE(exc_value));
PyObject *exc_traceback = PyException_GetTraceback(exc_value);
_PyErr_Restore(tstate, exc_type, Py_NewRef(exc_value), exc_traceback);
goto exception_unwind;
}
}

Expand Down Expand Up @@ -2429,10 +2429,12 @@ dummy_func(
STACK_SHRINK(1);
Py_DECREF(cond);
}
else if (err == 0)
else if (err == 0) {
JUMPBY(oparg);
else
}
else {
goto error;
}
}
}

Expand All @@ -2456,8 +2458,9 @@ dummy_func(
STACK_SHRINK(1);
Py_DECREF(cond);
}
else
else {
goto error;
}
}
}

Expand Down Expand Up @@ -2639,7 +2642,7 @@ dummy_func(
STACK_SHRINK(1);
Py_DECREF(it);
JUMPBY(INLINE_CACHE_ENTRIES_FOR_ITER + oparg + 1);
end_for_iter_list:
end_for_iter_list:
}

// stack effect: ( -- __0)
Expand Down
0