Skip to content

Refactor Scala IR to Java #14115

@Akirathan

Description

@Akirathan

This is an umbrella issue to track progress on refactoring Scala IR in runtime-parser to Java.

The initial PR that introduced the annotation processor is #11770

The initial issue is #11498

Motivation

  • Ultimate goal is to replace all Scala code in runtime-parser by Java
  • Remove boilerplate Scala code.
    • The old IR case classes had to manually implement, e.g., copy, duplicate and mapExpressions methods.
    • Tedious and error prone.
  • All the repetitive code of methods like copy, mapExpressions, children, etc. shall be generated by an annotation processor.
  • Will unblock further work on migration towards mini IR passes
    • To continue with mini IR passes, we observed that having withNewChildren (or setNewChildren) method would be very useful, so that mini IR passes can traverse every IR node.
    • Once code for IR nodes is generated, implementing new methods on every IR node will be straightforward.

Work that has already been done

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

📤 Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions