Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Remove irregular stack effects #105678

Copy link
Copy link
Closed
Closed
Copy link
@markshannon

Description

@markshannon
Issue body actions

As we move towards generating more components from the instruction definition file (bytecodes.c), it helps if the instructions have regular formats and stack effects.
Currently the stack effects can be simple, variable, conditional or complex.

  • Simple: Does not depend on the operand (oparg)
  • Variable: Either pops or pushes oparg * k items.
  • Conditional: Pushes a value conditional on oparg & 1
  • Complex: The stack effect depends on a set of flags embedded in oparg.

We can easily get rid of the complex case. There are only two cases, MAKE_FUNCTION and FORMAT_VALUE. Both can easily broken down into simple (and faster) parts.

We might want to get rid of condition stack effects, as it would simplify things, but performance may suffer as both LOAD_GLOBAL and LOAD_ATTR are conditional and they are performance critical.

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    performancePerformance or resource usagePerformance or resource usage

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.