Skip to content

Conversation

@LPTK
Copy link
Contributor

@LPTK LPTK commented Dec 16, 2025

In #356, we changed the IR so that local symbols are explicitly allocated in Scoped blocks, instead of implicitly scoped. This makes the logic cleaner, resolves longstanding issues, and simplifies passes like deforestation (so they do not need to reimplement the logic to figure out what is bound where).

However, the JSBuilder still had hacks in place to generate bindings for symbols that are missing a Scoped defining them. This was needed because not all parts of the compiler have been fully adapted to Scoped yet. This PR disables the hacks and witnesses failures that seem mostly rerated to:

  • Code quasiquotes – @NeilKleistGao can you please address these? I think it just needs a few changes (using registerTempSymbol in a few places).
  • Tailrec optimizer – @ychenfo can you please address these in the way we discussed the other day?
  • Lifter – @CAG2Mark can you please address these? Now would also be the ideal time to make the refactoring you hinted at earlier, based on the more complete symbol representation we have now.
  • Handler lowering – but I think this should be solved by @AnsonYeung once Handler overhaul #360 is merged
  • It also looks like the @buffered annotation generates unscoped variables; Cc @AnsonYeung

@LPTK LPTK marked this pull request as draft December 16, 2025 06:26
@CAG2Mark
Copy link
Contributor

OK. This will probably take a while...

@NeilKleistGao
Copy link
Member

Shall we push to this branch directly, or create another PR to this branch?

@LPTK
Copy link
Contributor Author

LPTK commented Dec 16, 2025

@NeilKleistGao feel free to push directly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants