Skip to content
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

GH-99104: Update headers for bytecodes.c and generate_cases.py #99112

Merged
merged 1 commit into from
Nov 5, 2022

Conversation

gvanrossum
Copy link
Member

@gvanrossum gvanrossum commented Nov 4, 2022

Also tweak the labels near the end of bytecodes.c.

This is also part of GH-98831.

Also tweak the labels near the end of bytecodes.c.
Comment on lines +4 to +6
// Note that there is some dummy C code at the top and bottom of the file
// to fool text editors like VS Code into believing this is valid C code.
// The actual instruction definitions start at // BEGIN BYTECODES //.
Copy link
Member

Choose a reason for hiding this comment

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

Nitpick: It's really the top and middle of this file. Might be worth mentioning the // Families go below this point // section, too.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'd like to leave finding that as an exercise for the reader, since that is work in progress. The generator currently doesn't actually see the families because it stops reading after // END BYTECODES // -- I was planning to fix that once families are actually used for anything.

resume_with_error:
start_frame:
unbound_local_error:
;
Copy link
Member

Choose a reason for hiding this comment

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

Is this semicolon really needed? My IDE (VS Code) doesn't complain...

Copy link
Member Author

Choose a reason for hiding this comment

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

It's an error to real C compilers, so better safe than sorry.

@brandtbucher
Copy link
Member

That's weird. Does the test runner really return 1 when the FAILURE then SUCCESS thing happens?

Copy link
Member Author

@gvanrossum gvanrossum left a comment

Choose a reason for hiding this comment

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

I have no idea about the test runner. I'll try just restarting it.

Comment on lines +4 to +6
// Note that there is some dummy C code at the top and bottom of the file
// to fool text editors like VS Code into believing this is valid C code.
// The actual instruction definitions start at // BEGIN BYTECODES //.
Copy link
Member Author

Choose a reason for hiding this comment

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

I'd like to leave finding that as an exercise for the reader, since that is work in progress. The generator currently doesn't actually see the families because it stops reading after // END BYTECODES // -- I was planning to fix that once families are actually used for anything.

resume_with_error:
start_frame:
unbound_local_error:
;
Copy link
Member Author

Choose a reason for hiding this comment

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

It's an error to real C compilers, so better safe than sorry.

Copy link
Member

@nascheme nascheme left a comment

Choose a reason for hiding this comment

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

LGTM.

@gvanrossum gvanrossum merged commit d04899a into python:main Nov 5, 2022
@gvanrossum gvanrossum deleted the tweak-headers branch December 21, 2022 22:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants