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

feat(eval): add oxc_eval crate #6485

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

DonIsaac
Copy link
Collaborator

@DonIsaac DonIsaac commented Oct 12, 2024

Closes #6473

What This PR Does

Adds oxc_eval, a new crate for evaluating parsed JS code. It contains the following:

  1. Data types implementing various parts of the ECMAScript spec
  2. Evaluation runtime semantics for most AST nodes.

Goals

  1. consolidate constant eval semantics used throughout oxc crates (e.g. const folding in the minifier, const eval in oxc_isolated_declarations, etc)
  2. Provide spec-compliant implementations of data types (e.g. CompletionRecord, Number, etc) to consuming applications
  3. Support future tree-shaking endeavours

Scope

The following are not in scope:

  1. A full JavaScript interpreter (e.g. a full implementation of the ECMAScript spec)
  2. Non-trivial runtime semantics (e.g. full EnvironmentRecord and import/export semantics)
  3. Garbage collection
  4. Any form of bytecode or bytecode interpreter

Copy link

graphite-app bot commented Oct 12, 2024

Your org has enabled the Graphite merge queue for merging into main

Add the label “0-merge” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix.

You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link.

Copy link
Collaborator Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @DonIsaac and the rest of your teammates on Graphite Graphite

Copy link

codspeed-hq bot commented Oct 12, 2024

CodSpeed Performance Report

Merging #6485 will not alter performance

Comparing don/10-12-feat_eval_add_oxc_eval_crate (12f6e9a) with main (66dccc0)

Summary

✅ 29 untouched benchmarks

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.

Consolidate multiple implementations of JavaScript evaluation
1 participant