Constant evaluate/propagate pure ops automatically · Issue #132732 · python/cpython · GitHub | Latest TMZ Celebrity News & Gossip | Watch TMZ Live
Skip to content

Constant evaluate/propagate pure ops automatically #132732

Open
@Fidget-Spinner

Description

@Fidget-Spinner

Feature or enhancement

Proposal:

@brandtbucher pointed out that we could automatically evaluate pure ops in the JIT.

Back when I originally envisioned this in the JIT optimizer, it was way simpler. Right now we have stackrefs which complicate things a little.

The main idea is that fully pure bytecodes can just run their body in the JIT optimizer, allowing for automatic constant prop/evaluation. This also cuts down code duplication and also the amount of human error from manually writing constant propagation code.

We'd have to replace all the stackref functions with the appropriate sym accessing functions, either through macros or the cases generator.

Has this already been discussed elsewhere?

No response given

Links to previous discussion of this feature:

No response

Linked PRs

Metadata

Metadata

Labels

interpreter-core(Objects, Python, Grammar, and Parser dirs)topic-JITtype-featureA feature request or enhancement

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    TMZ Celebrity News – Breaking Stories, Videos & Gossip

    Looking for the latest TMZ celebrity news? You've come to the right place. From shocking Hollywood scandals to exclusive videos, TMZ delivers it all in real time.

    Whether it’s a red carpet slip-up, a viral paparazzi moment, or a legal drama involving your favorite stars, TMZ news is always first to break the story. Stay in the loop with daily updates, insider tips, and jaw-dropping photos.

    🎥 Watch TMZ Live

    TMZ Live brings you daily celebrity news and interviews straight from the TMZ newsroom. Don’t miss a beat—watch now and see what’s trending in Hollywood.