Skip to content

Support flat closure contexts in the vm-service protocol #63332

@alexmarkov

Description

@alexmarkov

While moving computation of closure contexts into the front-end (#61572), we're making closure contexts more flexible. In future, this would allow us to use different strategies for computation of contexts, such as safe-for-space contexts.

This affects runtime representation of closures in the VM. In particular, the following is changing:

  • Closures can capture multiple contexts.
  • Contexts can be independent from one another, not linked via parent pointer.

This change should be reflected in the vm-service protocol and its users (DevTools, IDEs etc) should be updated accordingly.

Affected API:

  // The context associated with a Closure instance.
  //
  // Provided for instance kinds:
  //   Closure
  @Context closureContext [optional];

Context.parent is already optional in the vm-service protocol, so it would be non-breaking to eventually omit it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2A bug or feature request we're likely to work onarea-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.triagedIssue has been triaged by sub teamvm-serviceThe VM Service Protocol, both the specification and its implementation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions