Uh oh!
There was an error while loading. Please reload this page.
gh-98831: add variable stack effect support to cases generator - #101309
Conversation
iritkatriel
commented
Jan 25, 2023
We’ll want something more efficient than this. Maybe generate a function with a switch statement for each value? |
Uh oh!
There was an error while loading. Please reload this page.
gvanrossum
commented
Jan 25, 2023
Yes. Read this after writing my response. :-) |
gvanrossum
left a comment
There was a problem hiding this comment.
Very nice, just one request and one suggestion.
Uh oh!
There was an error while loading. Please reload this page.
| self.out.emit(f" case {instr.name}:") | ||
| self.out.emit(f" return {effect};") | ||
| self.out.emit(" default:") | ||
| self.out.emit(" Py_UNREACHABLE();") |
There was a problem hiding this comment.
If you make this return -1; then you can drop all the cases that return -1, making the function much shorter.
There was a problem hiding this comment.
There won't be any -1's when we finish. We could group all cases with the same value if we want.
Uh oh!
There was an error while loading. Please reload this page.