-
-
Notifications
You must be signed in to change notification settings - Fork 34.5k
GH-118095: Use broader specializations in tier 1, for better tier 2 support of calls. #118322
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
Changes from 1 commit
0b157ab
2262f98
4af43c2
b7795e3
e5c7dce
61abb3b
b49bc86
f42519d
3294632
1a2dcfe
62ff43c
71c6d41
0b40773
02cdf2f
1831eb3
7819b1c
857d152
839d16e
1d5c0a7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -107,7 +107,7 @@ static void | |
| dump_stack(_PyInterpreterFrame *frame, PyObject **stack_pointer) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are the changes in this function intentional, or left over from debugging?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Left over from debugging, I needed them as It might be worth making this change, but that's for another PR. |
||
| { | ||
| PyObject **stack_base = _PyFrame_Stackbase(frame); | ||
| // PyObject *exc = PyErr_GetRaisedException(); | ||
| PyObject *exc = PyErr_GetRaisedException(); | ||
| printf(" stack=["); | ||
| for (PyObject **ptr = stack_base; ptr < stack_pointer; ptr++) { | ||
| if (ptr != stack_base) { | ||
|
|
@@ -117,12 +117,24 @@ dump_stack(_PyInterpreterFrame *frame, PyObject **stack_pointer) | |
| printf("<nil>"); | ||
| continue; | ||
| } | ||
| if ( | ||
| *ptr == Py_None | ||
| || PyBool_Check(*ptr) | ||
| || PyLong_CheckExact(*ptr) | ||
| || PyFloat_CheckExact(*ptr) | ||
| || PyUnicode_CheckExact(*ptr) | ||
| ) { | ||
| if (PyObject_Print(*ptr, stdout, 0) == 0) { | ||
| continue; | ||
| } | ||
| PyErr_Clear(); | ||
| } | ||
| // Don't call __repr__(), it might recurse into the interpreter. | ||
| printf("<%s at %p>", Py_TYPE(*ptr)->tp_name, (void *)(*ptr)); | ||
| } | ||
| printf("]\n"); | ||
| // fflush(stdout); | ||
| // PyErr_SetRaisedException(exc); | ||
| fflush(stdout); | ||
| PyErr_SetRaisedException(exc); | ||
| } | ||
|
|
||
| static void | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe these are better as exits so we can handle more cases? If we trace through this, it'd be a shame if we couldn't then stitch a function or method into the call site if its polymorphic.