Skip to content

Conversation

@Boshen
Copy link
Member

@Boshen Boshen commented Aug 10, 2025

No description provided.

Copilot AI review requested due to automatic review settings August 10, 2025 04:15
@Boshen Boshen added the 0-merge Merge with Graphite Merge Queue label Aug 10, 2025
@github-actions github-actions bot added A-minifier Area - Minifier C-enhancement Category - New feature or request labels Aug 10, 2025
Copy link
Member Author

Boshen commented Aug 10, 2025

Merge activity

Copy link
Member Author

Boshen commented Aug 10, 2025


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

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.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 NewExpression in the value type determination system
  • Implements specific handling for new Date() to return ValueType::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-hq
Copy link

codspeed-hq bot commented Aug 10, 2025

CodSpeed Instrumentation Performance Report

Merging #12951 will not alter performance

Comparing 08-10-feat_minifier_new_date_has_valuetype_object_ (53f7a9f) with main (96b4009)1

Summary

✅ 34 untouched benchmarks

Footnotes

  1. No successful run was found on main (53f7a9f) during the generation of this report, so 96b4009 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@graphite-app graphite-app bot force-pushed the 08-10-feat_minifier_new_date_has_valuetype_object_ branch from 1275418 to 53f7a9f Compare August 10, 2025 04:49
@graphite-app graphite-app bot merged commit 53f7a9f into main Aug 10, 2025
29 checks passed
@graphite-app graphite-app bot deleted the 08-10-feat_minifier_new_date_has_valuetype_object_ branch August 10, 2025 04:54
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Aug 10, 2025
taearls pushed a commit to taearls/oxc that referenced this pull request Aug 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-minifier Area - Minifier C-enhancement Category - New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants