FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Stack effect of jumping -- how to express in DSL · Issue #481 · faster-cpython/ideas · GitHub

Repository navigation

Stack effect of jumping -- how to express in DSL #481

Closed

Description

Our new DSL can express variadic stack effects using array[oparg] and even caters for conditions (foo if (C-expression)). But four opcodes (SEND, JUMP_IF_FALSE_OR_POP, JUMP_IF_TRUE_OR_POP, FOR_ITER) have different stack effects depending on whether they jump. How should we express that? New syntax or a magic constant in C-expression above?

@markshannon

Activity

  1. markshannon commented on Oct 17, 2022

    Member

    The short term answer is "don't worry about". It is simple enough to workaround in the tooling for now.

    In the longer term we'll need to add JUMP_AND_POP() macros (or something like that) to complement the JUMPBY() macros we currently have. Plus the tools will need to understand these macros.

  2. gvanrossum commented on Nov 8, 2022

    CollaboratorAuthor

    I suppose we could just special-case an output stack effect of the form res if (jump) or res if (!jump).

  3. iritkatriel commented on Mar 6, 2023

    Collaborator

    I think this is resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    epic-generatorDSL-based code generator for the interpreter(s)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL