Skip to content

[interp] Support methods that need more than 64k data items #59221

Open

Description

@lambdageek

See #59220. In that PR we addressed particular machine-generated methods that only had ldc, ldsfld and stsfld instructions. But in general if a method gets large enough and it may use more than 64k data items.

There are a number of approaches we could investigate - depending on the solution complexity and the impact on interpreter performance:

  • We could use 32-bit data item indices in general
  • We could add .w variants for every opcode.
  • We could use a variable-length encoding of the data item index (and get variable-length instructions in general).
  • We could add a new data.item.base instruction that let's us specify a 32-bit base data item address before any opcode that needs access to data items with index > 64k. (we will also need to validate that all the items an opcode needs are within 64k of the base).
  • We could reserve the top bit of a data item index to indicate some kind of indirection (maybe to a preceeding "nop.with.data" instruction that has the full 32-bit index).
  • Something else

Activity

  1. added this to the 7.0.0 milestone on Sep 16, 2021
  2. ghost added
    untriaged
    on Sep 16, 2021
  3. lambdageek commented on Sep 16, 2021

    @lambdageek
    MemberAuthor
  4. removed
    untriaged
    on Sep 16, 2021
  5. self-assigned this
    on Jun 20, 2022
  6. modified the milestones: 7.0.0, 8.0.0 on Jun 20, 2022
  7. modified the milestones: 8.0.0, Future on May 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions