cpython icon indicating copy to clipboard operation
cpython copied to clipboard

GH-98831: Implement basic cache effects

Open gvanrossum opened this issue 3 years ago • 1 comments

I apologize for the mess that generate_cases.py has become. I promise I will clean it up in the next PR.

This PR is a big step forwards though -- it supports cache effects and implements those for the BINARY_OP family (with one exception -- the "hemi-super-instruction" BINARY_OP_INPLACE_ADD_UNICODE). Check the generated code for the effects.

PS. Merge conflicts for Python/bytecodes.c are quite painful, it seems there are several cooks in this kitchen. :-)

  • Issue: gh-98831

gvanrossum avatar Nov 10 '22 06:11 gvanrossum

PS. I didn't implement a family that actually uses the cache (the 'counter' doesn't count, it's special since it is written, which our DSL doesn't support). But I figured I'd stop here -- keeping these PRs open for a long time is hard work due to merge conflicts.

gvanrossum avatar Nov 11 '22 03:11 gvanrossum

PS. I didn't implement a family that actually uses the cache (the 'counter' doesn't count, it's special since it is written to, which our DSL doesn't support). But I figured I'd stop here -- keeping these PRs open for a long time is hard work due to merge conflicts.

Working on the refactor I now know for sure there are some bugs in that part. (EDIT: Fixed in GH-99408 but not here.)

gvanrossum avatar Nov 13 '22 21:11 gvanrossum

When you're done making the requested changes, leave the comment: I have made the requested changes; please review again.

bedevere-bot avatar Nov 15 '22 10:11 bedevere-bot

I have made the requested changes; please review again

(Well, I've answered everything and would like to merge this as-is so Brandt can continue on GH-99399.)

gvanrossum avatar Nov 15 '22 15:11 gvanrossum

Thanks for making the requested changes!

@markshannon: please review the changes made to this pull request.

bedevere-bot avatar Nov 15 '22 15:11 bedevere-bot