| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
@iritkatriel Do you have time to look at the reservation code? The rest is on auto-pilot (I'm going to add FOR_ITER_TUPLE to the same PR. |
Sorry, something went wrong.
| _Py_CODEUNIT *initial_instr = instr; | ||
| int trace_length = 0; | ||
| int max_length = buffer_size; | ||
| int reserved = 0; |
There was a problem hiding this comment.
The point of reserve is to make sure that you won't error out in the middle of an opcode's translation to uops?
Sorry, something went wrong.
There was a problem hiding this comment.
Correct. I'd rather reserve space ahead than having to bail out in the middle and undo some work already done (the undoing feels more brittle).
Sorry, something went wrong.
|
Assuming the tests pass this time I'll just merge. |
Sorry, something went wrong.
Also rename `_ITER_EXHAUSTED_XXX` to `_IS_ITER_EXHAUSTED_XXX` to make it clear this is a test.
The Tier 2 opcode _IS_ITER_EXHAUSTED_LIST (and _TUPLE) didn't set it->it_seq to NULL, causing a subtle bug that resulted in test_exhausted_iterator in list_tests.py to fail when running all tests with -Xuops. The bug was introduced in gh-106696. Added this as an explicit test. Also fixed the dependencies for ceval.o -- it depends on executor_cases.c.h.
| Back | FazBrowse Home | New Git URL |
Same recipe as FOR_ITER_RANGE. I refactored the Tier 2 transformation code to handle similar cases. I had to fix a bug in the space reservation code, and decided to add some macros and an extra guard rail for that.