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-102654: Insert #line directives in generated_cases.c.h#102669

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
gvanrossum merged 1 commit intopython:mainfromgvanrossum:line-dirs
Mar 15, 2023

Conversation

@gvanrossum
Copy link
Member

@gvanrossumgvanrossum commentedMar 13, 2023
edited
Loading

This behavior is optional, because in some extreme cases it may just make debugging harder. The tool defaults it to off, but it is on in Makefile.pre.in.

Also note that this makes diffs to generated_cases.c.h way noisier, since whenever you insert or delete a line in bytecodes.c, all subsequent #line directives will change.

Honestly I wonder if maybe we should keep it off and tell developers how to turn it on (maybe by environment variable) when they're developing instructions?

corona10 and tkoyama010 reacted with thumbs up emoji
This behavior is optional, because in some extreme cases itmay just make debugging harder. The tool defaults it to off,but it is on in Makefile.pre.in.Also note that this makes diffs to generated_cases.c.h noisier,since whenever you insert or delete a line in bytecodes.c,all subsequent #line directives will change.
@corona10
Copy link
Member

corona10 commentedMar 14, 2023
edited
Loading

I learn a new thing from this PR.
I was always curious about managing line numbers information for the auto-gen codes.

Looks good to me

Copy link
Member

@markshannonmarkshannon left a comment

Choose a reason for hiding this comment

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

Changes look fine, in the context of the current design.
Ideally the changes would have been restricted to the formatter, but the current design prevents that.

Notes for future PR:

Passing tokens instead of strings to the Formatter would mean that the rest of the code doesn't need to care about line numbers.
Using tokens mean that we can parseDEOPT_IF, etc. in a more robust way than using a regex.

@gvanrossumgvanrossum merged commit70185de intopython:mainMar 15, 2023
@gvanrossumgvanrossum deleted the line-dirs branchMarch 15, 2023 15:37
Fidget-Spinner pushed a commit to Fidget-Spinner/cpython that referenced this pull requestMar 27, 2023
…on#102669)This behavior is optional, because in some extreme cases itmay just make debugging harder. The tool defaults it to off,but it is on in Makefile.pre.in.Also note that this makes diffs to generated_cases.c.h noisier,since whenever you insert or delete a line in bytecodes.c,all subsequent #line directives will change.
warsaw pushed a commit to warsaw/cpython that referenced this pull requestApr 11, 2023
…on#102669)This behavior is optional, because in some extreme cases itmay just make debugging harder. The tool defaults it to off,but it is on in Makefile.pre.in.Also note that this makes diffs to generated_cases.c.h noisier,since whenever you insert or delete a line in bytecodes.c,all subsequent #line directives will change.
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@corona10corona10corona10 left review comments

@markshannonmarkshannonmarkshannon approved these changes

@iritkatrieliritkatrielAwaiting requested review from iritkatriel

@brandtbucherbrandtbucherAwaiting requested review from brandtbucher

Assignees

No one assigned

Labels

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@gvanrossum@corona10@markshannon@bedevere-bot

[8]ページ先頭

©2009-2025 Movatter.jp