oxc-project / oxc-project/backlog

Keep symbols and scopes in sync across the whole compiler pipeline

Open
#85 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
No language data
Stars
7
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Rolldown currently runs semantic builder numerous times to keep symbols and scopes in sync:

https://github.com/rolldown/rolldown/blob/main/crates/rolldown/src/utils/pre_process_ecma_ast.rs

  1. transformer
  2. dead code elimination (may need one soon)
  3. rebuild symbols and scopes to keep everything in sync
  // We have to re-create the symbol table and scope tree after the transformation so far to make sure they are up-to-date.
  let (symbols, scopes) = ast.make_symbol_table_and_scope_tree();

And then eventually on the chunk level:

  1. minifier
  2. mangler

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with crates/rolldown/src/utils/pre_process_ecma_ast.rs and trace the transformer, dead code elimination, symbol/scope rebuild, minifier, and mangler stages described in the issue. Determine how the semantic builder is currently repeated across the pipeline. Done means the pipeline keeps symbols and scopes synchronized while reducing the repeated rebuild work.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.