feat(minifier): new Date() has ValueType::Object#12951
feat(minifier): new Date() has ValueType::Object#12951graphite-app[bot] merged 1 commit intomainfrom
new Date() has ValueType::Object#12951Conversation
Merge activity
|
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
There was a problem hiding this comment.
Pull Request Overview
This PR implements value type determination for new Date() expressions in the JavaScript minifier, specifically recognizing that new Date() creates an object. The change enables better constant folding optimizations for Date constructor expressions.
- Adds support for
NewExpressionin the value type determination system - Implements specific handling for
new Date()to returnValueType::Object - Updates test expectations to reflect the improved minification of Date-related expressions
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| crates/oxc_ecmascript/src/constant_evaluation/value_type.rs | Adds NewExpression support and Date constructor detection for value type determination |
| crates/oxc_minifier/src/peephole/fold_constants.rs | Updates test cases to expect optimized output for new Date() expressions |
CodSpeed Instrumentation Performance ReportMerging #12951 will not alter performanceComparing Summary
Footnotes |
1275418 to
53f7a9f
Compare

No description provided.