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.
// 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

@brandtbucher brandtbucher Nov 4, 2022

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

@gvanrossum gvanrossum Nov 5, 2022

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

@brandtbucher brandtbucher Nov 4, 2022

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

@gvanrossum gvanrossum Nov 5, 2022

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

brandtbucher commented Nov 4, 2022

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

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

// 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

@gvanrossum gvanrossum Nov 5, 2022

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

@gvanrossum gvanrossum Nov 5, 2022

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

LGTM.

@gvanrossum gvanrossum merged commit d04899a into python:main Nov 5, 2022
13 checks passed
@gvanrossum gvanrossum deleted the tweak-headers branch Dec 21, 2022
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.

None yet

4 participants