Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consolidate multiple implementations of JavaScript evaluation #6473

Closed
Boshen opened this issue Oct 12, 2024 · 3 comments · May be fixed by #6485
Closed

Consolidate multiple implementations of JavaScript evaluation #6473

Boshen opened this issue Oct 12, 2024 · 3 comments · May be fixed by #6485
Assignees
Labels
C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior

Comments

@Boshen
Copy link
Member

Boshen commented Oct 12, 2024

I believe we have multiple implements of javaScript evalutation in the codebase:

  1. constant folding in the minifier
  2. evaluation of enum values in the transformer
  3. a bit of evaluation in linter/tree_shaking
  4. crates/oxc_linter/src/rules/unicorn/no_useless_spread/const_eval.rs

There may be more in downstream tools.

@Boshen Boshen added the C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior label Oct 12, 2024
@Boshen Boshen self-assigned this Oct 12, 2024
@DonIsaac
Copy link
Collaborator

Should I re-open my const eval PR?

@Boshen
Copy link
Member Author

Boshen commented Oct 13, 2024

Should I re-open my const eval PR?

That's a whole runtime evaluation, but my goal is to detangle the constant evaluation mess 😢

@Boshen
Copy link
Member Author

Boshen commented Oct 14, 2024

Started moving constant evaluation code in #6549

Will continue the move.

@Boshen Boshen closed this as completed Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants