Skip to content

Pushing temporary, non-object pointers to the stack between micro-ops is counter-productive #130296

@markshannon

Description

@markshannon

Currently, we allow micro-ops to push temporary non-object pointers to the stack to be consumed by the following micro-op.
This has a number of disadvantages. We originally allowed this for a number of reasons, most of which are not true any more.

The original advantages:

  • Allows more instructions to be handled in the JIT as micro-ops could only have one operand. Micro-ops can now have two operands, so this isn't true any more
  • Would allow simpler optimizations be removing guards and leaving actions. In fact, the pair of micro-ops that push then pop are often so tightly coupled that there are best optimized as a single unit.
  • It reduces code duplication, by allowing common patterns such as PUSH_FRAME to be re-used. This is still true, so we may still want to allow PUSH_FRAME. But since PUSH_FRAME needs special treatment anyway, there may be a better way to do this.

The disadvantages:

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

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

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions