| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
TIER2_THRESHOLD was hardcoded using the JUMP_BACKWARD_INITIAL_VALUE, |
Sorry, something went wrong.
| if (PyModule_Add(module, "TIER2_THRESHOLD", | ||
| // + 1 more due to one loop spent on tracing. | ||
| PyLong_FromLong(JUMP_BACKWARD_INITIAL_VALUE + 2)) < 0) { | ||
| PyLong_FromLong(interp->opt_config.jump_backward_initial_value + 2)) < 0) { |
There was a problem hiding this comment.
You may use PyLong_FromUnsignedLong() since the member is unsigned (uint16_t). Suggestion to use shorter lines:
PyInterpreterState *interp = PyInterpreterState_Get();
// + 1 more due to one loop spent on tracing.
unsigned long threshold = interp->opt_config.jump_backward_initial_value + 2;
if (PyModule_Add(module, "TIER2_THRESHOLD",
PyLong_FromUnsignedLong(threshold)) < 0) {
return 1;
}
Sorry, something went wrong.
|
"aarch64-pc-windows-msvc/msvc (Debug)" failed with: Assertion failed: index < _Py_MAX_MANAGED_STATIC_BUILTIN_TYPES, file C:\a\cpython\cpython\Objects\typeobject.c, line 323 The recent change commit e6c3c04 added a new static type to static_types array. I suppose that #define _Py_MAX_MANAGED_STATIC_BUILTIN_TYPES 201 should be updated. |
Sorry, something went wrong.
Co-authored-by: Victor Stinner <vstinner@python.org>
There was a problem hiding this comment.
LGTM
Sorry, something went wrong.
| /* For now we hard-code this to a value for which we are confident | ||
| all the static builtin types will fit (for all builds). */ | ||
| #define _Py_MAX_MANAGED_STATIC_BUILTIN_TYPES 201 | ||
| #define _Py_MAX_MANAGED_STATIC_BUILTIN_TYPES 202 |
There was a problem hiding this comment.
Why was this changed?
Sorry, something went wrong.
There was a problem hiding this comment.
Because a new static type was added recently, and JIT tests crash or fail with an assertion error without this change: #145496 (comment)
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.