Skip to content

Commit 3e99c9c

Browse files
authored
GH-111485: Make BEFORE_WITH a uop (GH-111812)
1 parent d4426e8 commit 3e99c9c

File tree

5 files changed

+56
-7
lines changed

5 files changed

+56
-7
lines changed

Include/internal/pycore_opcode_metadata.h

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Python/abstract_interp_cases.c.h

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Python/bytecodes.c

+2-3
Original file line numberDiff line numberDiff line change
@@ -2765,7 +2765,7 @@ dummy_func(
27652765
GOTO_ERROR(error);
27662766
}
27672767
DECREF_INPUTS();
2768-
res = _PyObject_CallNoArgs(enter);
2768+
res = _PyObject_CallNoArgsTstate(tstate, enter);
27692769
Py_DECREF(enter);
27702770
if (res == NULL) {
27712771
Py_DECREF(exit);
@@ -2774,7 +2774,6 @@ dummy_func(
27742774
}
27752775

27762776
inst(BEFORE_WITH, (mgr -- exit, res)) {
2777-
TIER_ONE_ONLY
27782777
/* pop the context manager, push its __exit__ and the
27792778
* value returned from calling its __enter__
27802779
*/
@@ -2801,7 +2800,7 @@ dummy_func(
28012800
GOTO_ERROR(error);
28022801
}
28032802
DECREF_INPUTS();
2804-
res = _PyObject_CallNoArgs(enter);
2803+
res = _PyObject_CallNoArgsTstate(tstate, enter);
28052804
Py_DECREF(enter);
28062805
if (res == NULL) {
28072806
Py_DECREF(exit);

Python/executor_cases.c.h

+44-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Python/generated_cases.c.h

+2-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)