◐ Shell
clean mode source ↗

gh-104584: Baby steps towards generating and executing traces by gvanrossum · Pull Request #105924 · python/cpython

added 17 commits

June 19, 2023 18:00
(Macros inherit flags from components, but shouldn't inherit IS_UOP.)
Now test_mmap on Windows passes,
and hopefully so does test_threading on UNIX.
Instead of `int oparg` we now have `uint64_t operand`.
In the Tier 2 interpreter, we add `int oparg` and set it
to a truncated version of `operand` so instructions can
reference it.
Apparently the fix using SET_LOCALS_FROM_FRAME() isn't enough
(it fixes some but not all failures). Possibly the problem is due
to having *two* BEFORE_WITH uops in one trace?

Unclear what's wrong with that opcode.
The uops optimizer is enabled in the main interpreter when either:
- -Xuops is passed; or
- PYTHONUOPS=1 is set.

The env var for uops debugging is now called PYTHONUOPSDEBUG.
It only has an effect when configured --with-pydebug *and* the uops
optimizer is enabled (see above).

Also fixed a compiler warning about %ld with an int64 arg.
Those tests now only fail when run with -Xuops.
We should probably fix the uop executor instead.
Also, test_embed now passes even with -Xuops.

This reverts commit 91dd86c.

kumaraditya303

@gvanrossum

@blurb-it

This was referenced

Jun 27, 2023