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

Feature: Only prepare frame storage for backref/lastine when needed · Issue #9575 · jruby/jruby · GitHub

/ jruby Public

Feature: Only prepare frame storage for backref/lastine when needed #9575

Description

While reviewing read/write accesses for the "backref" and "lastline" special variables, I realized we can go further than current frame-eliminating optimizations.

For both variables, reads and writes are heavily weighted in one direction. Methods that read backref are rare, while methods that write it are common. The reverse is true for lastline: most methods write it but few read it.

We can narrow the scope of deoptimization when we can detect that one of these variables is only read or written within a given method; read-but-not-written will only ever see nil, and written-but-not-read never needs to actually write. In both cases, we could eliminate the frame if we can indicate to those methods that the read or write should be no-opped.

This should expand the number of cases where we can eliminate the frame, especially when there's only a single related read-or-write call and no direct access to the variable in question.

See other optimization ideas in #9169.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


    Back | FazBrowse Home | New Git URL