Skip to content

feat(parser): set pure on typescript wrapped AST nodes#10520

Merged
graphite-app[bot] merged 1 commit intomainfrom
04-21-feat_parser_set_pure_on_typescript_wrapped_ast_nodes
Apr 21, 2025
Merged

feat(parser): set pure on typescript wrapped AST nodes#10520
graphite-app[bot] merged 1 commit intomainfrom
04-21-feat_parser_set_pure_on_typescript_wrapped_ast_nodes

Conversation

@Boshen
Copy link
Member

@Boshen Boshen commented Apr 21, 2025

Fixes rolldown/rolldown#4166

Previously these inner call expressions were not annotated with pure.

const Foo = /* @__PURE__ */ (((() => {})()))
const Foo = /* @__PURE__ */ (() => { })() as unknown as { new (): any };
const Foo = /* @__PURE__ */ (() => {})() satisfies X"
const Foo = /* @__PURE__ */ (() => {})()<X>"
const Foo = /* @__PURE__ */ <Foo>(() => {})()!
const Foo = /* @__PURE__ */ <Foo>(() => {})()! as X satisfies Y

@github-actions github-actions bot added A-parser Area - Parser A-codegen Area - Code Generation C-enhancement Category - New feature or request labels Apr 21, 2025
Copy link
Member Author

Boshen commented Apr 21, 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.

Fixes rolldown/rolldown#4166

Previously these inner call expressions were not annotated with `pure`.

```js
const Foo = /* @__PURE__ */ (((() => {})()))
const Foo = /* @__PURE__ */ (() => { })() as unknown as { new (): any };
const Foo = /* @__PURE__ */ (() => {})() satisfies X"
const Foo = /* @__PURE__ */ (() => {})()<X>"
const Foo = /* @__PURE__ */ <Foo>(() => {})()!
const Foo = /* @__PURE__ */ <Foo>(() => {})()! as X satisfies Y
```
@graphite-app graphite-app bot force-pushed the 04-21-feat_parser_set_pure_on_typescript_wrapped_ast_nodes branch from 7a54db5 to 5ba02b0 Compare April 21, 2025 08:09
@codspeed-hq
Copy link

codspeed-hq bot commented Apr 21, 2025

CodSpeed Instrumentation Performance Report

Merging #10520 will not alter performance

Comparing 04-21-feat_parser_set_pure_on_typescript_wrapped_ast_nodes (5ba02b0) with main (d5a1ffa)

Summary

✅ 36 untouched benchmarks

@graphite-app
Copy link
Contributor

graphite-app bot commented Apr 21, 2025

Merge activity

@graphite-app graphite-app bot merged commit 5ba02b0 into main Apr 21, 2025
29 checks passed
@graphite-app graphite-app bot deleted the 04-21-feat_parser_set_pure_on_typescript_wrapped_ast_nodes branch April 21, 2025 08:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-codegen Area - Code Generation A-parser Area - Parser C-enhancement Category - New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

/* #__PURE__ */ annotations are being removed since beta.4

2 participants