Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions 6 Include/internal/pycore_opcode_metadata.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion 3 Python/bytecodes.c
Original file line number Diff line number Diff line change
Expand Up @@ -2984,14 +2984,15 @@ dummy_func(

macro(LOAD_ATTR_CLASS) =
unused/1 +
_RECORD_TOS +
_CHECK_ATTR_CLASS +
unused/2 +
_LOAD_ATTR_CLASS +
_PUSH_NULL_CONDITIONAL;

macro(LOAD_ATTR_CLASS_WITH_METACLASS_CHECK) =
unused/1 +
_RECORD_TOS_TYPE +
_RECORD_TOS +
_GUARD_TYPE_VERSION +
_CHECK_ATTR_CLASS +
_LOAD_ATTR_CLASS +
Expand Down
6 changes: 3 additions & 3 deletions 6 Python/optimizer_bytecodes.c
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,8 @@ dummy_func(void) {
}

op(_CHECK_ATTR_CLASS, (type_version/2, owner -- owner)) {
PyObject *type = (PyObject *)_PyType_LookupByVersion(type_version);
if (type) {
PyObject *type = sym_get_probable_value(owner);
if (type != NULL && ((PyTypeObject *)type)->tp_version_tag == type_version) {
if (type == sym_get_const(ctx, owner)) {
ADD_OP(_NOP, 0, 0);

@Fidget-Spinner Fidget-Spinner Apr 11, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Btw, It think this is bugged on main, there needs to be a watcher installed on the type for this path similar to _GUARD_TYPE_VERSION. would you like to open a PR to fix it?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure! Which issue should I link to?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you. I think it's fine to open a new issue describing the bug.

}
Expand All @@ -246,7 +246,7 @@ dummy_func(void) {

op(_GUARD_TYPE_VERSION, (type_version/2, owner -- owner)) {
assert(type_version);
assert(this_instr[-1].opcode == _RECORD_TOS_TYPE);
assert(this_instr[-1].opcode == _RECORD_TOS_TYPE || this_instr[-1].opcode == _RECORD_TOS);
if (sym_matches_type_version(owner, type_version)) {
ADD_OP(_NOP, 0, 0);
}
Expand Down
6 changes: 3 additions & 3 deletions 6 Python/optimizer_cases.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

61 changes: 32 additions & 29 deletions 61 Python/record_functions.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.