Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

GH-100719: Remove redundantgi_code field from generator object.#100749

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
markshannon merged 10 commits intopython:mainfromfaster-cpython:trim-code-object-2
Feb 23, 2023

Conversation

markshannon
Copy link
Member

@markshannonmarkshannon commentedJan 4, 2023
edited by bedevere-bot
Loading

@@ -1962,44 +1962,6 @@ initialize_locals(PyThreadState *tstate, PyFunctionObject *func,
return -1;
}

/* Consumes references to func, locals and all the args */

Choose a reason for hiding this comment

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

Why was this moved downwards?

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

There was a small change, it now callsclear_thread_frame() rather than_PyEvalFrameClearAndPop(), so now needs to come afterclear_thread_frame

Fidget-Spinner reacted with thumbs up emoji
Copy link
Member

@ericsnowcurrentlyericsnowcurrently left a comment

Choose a reason for hiding this comment

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

mostly LGTM

There's one minor comment, but I'll leave the resolution up to you.

@markshannon
Copy link
MemberAuthor

I've converted this to a draft because I want to make the following changes first.

  • Change the_PyInterpreterFrame so that the code object is the first field.
  • Add back thegi_code field as a union overlapping the frame, ensuring that code accessinggi_code will still work, and allowing us to deprecate the field.

@markshannonmarkshannon marked this pull request as draftJanuary 6, 2023 11:08
@markshannonmarkshannon marked this pull request as ready for reviewFebruary 13, 2023 16:06
Copy link
Member

@ericsnowcurrentlyericsnowcurrently left a comment

Choose a reason for hiding this comment

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

LGTM

@markshannon
Copy link
MemberAuthor

I'm removing thegi_code attribute.
Any C code that accesses thegi_code attribute might clear it, resulting in a double free. It is safer to just remove it.

ericsnowcurrently reacted with thumbs up emoji

@markshannonmarkshannon merged commit22b8d77 intopython:mainFeb 23, 2023
scoder added a commit to cython/cython that referenced this pull requestMar 31, 2023
scoder added a commit to cython/cython that referenced this pull requestApr 2, 2023
@markshannonmarkshannon deleted the trim-code-object-2 branchSeptember 26, 2023 12:50
JelleZijlstra pushed a commit to JelleZijlstra/cpython that referenced this pull requestSep 10, 2024
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@Fidget-SpinnerFidget-SpinnerFidget-Spinner left review comments

@ericsnowcurrentlyericsnowcurrentlyericsnowcurrently approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

4 participants
@markshannon@ericsnowcurrently@Fidget-Spinner@bedevere-bot

[8]ページ先頭

©2009-2025 Movatter.jp