-
-
Notifications
You must be signed in to change notification settings - Fork 31.7k
GH-99104: Update headers for bytecodes.c and generate_cases.py #99112
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,11 @@ | ||
// This file contains instruction definitions. | ||
// It is read by Tools/cases_generator/generate_cases.py | ||
// to generate Python/generated_cases.c.h. | ||
// 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 //. | ||
// See Tools/cases_generator/README.md for more information. | ||
|
||
#include "Python.h" | ||
#include "pycore_abstract.h" // _PyIndex_Check() | ||
#include "pycore_call.h" // _PyObject_FastCallDictTstate() | ||
|
@@ -3976,13 +3984,14 @@ dummy_func( | |
// END BYTECODES // | ||
|
||
} | ||
error:; | ||
exception_unwind:; | ||
handle_eval_breaker:; | ||
resume_frame:; | ||
resume_with_error:; | ||
start_frame:; | ||
unbound_local_error:; | ||
error: | ||
exception_unwind: | ||
handle_eval_breaker: | ||
resume_frame: | ||
resume_with_error: | ||
start_frame: | ||
unbound_local_error: | ||
; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this semicolon really needed? My IDE (VS Code) doesn't complain... There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
||
} | ||
|
||
// Families go below this point // | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
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.There was a problem hiding this comment.
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.