-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
GH-118095: Add tier 2 support for YIELD_VALUE #118380
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -704,7 +704,7 @@ translate_bytecode_to_trace( | |
int nuops = expansion->nuops; | ||
RESERVE(nuops + 1); /* One extra for exit */ | ||
int16_t last_op = expansion->uops[nuops-1].uop; | ||
if (last_op == _POP_FRAME || last_op == _RETURN_GENERATOR) { | ||
if (last_op == _POP_FRAME || last_op == _RETURN_GENERATOR || last_op == _YIELD_VALUE) { | ||
// Check for trace stack underflow now: | ||
// We can't bail e.g. in the middle of | ||
// LOAD_CONST + _POP_FRAME. | ||
|
@@ -763,7 +763,7 @@ translate_bytecode_to_trace( | |
Py_FatalError("garbled expansion"); | ||
} | ||
|
||
if (uop == _POP_FRAME || uop == _RETURN_GENERATOR) { | ||
if (uop == _POP_FRAME || uop == _RETURN_GENERATOR || uop == _YIELD_VALUE) { | ||
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. @markshannon Shouldn't this same change be made to optimizer_analysis.c (in get_code())? |
||
TRACE_STACK_POP(); | ||
/* Set the operand to the function or code object returned to, | ||
* to assist optimization passes. (See _PUSH_FRAME below.) | ||
|
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.
Would be good if the DSL had a symbol for "this instruction's size".
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.
#118423