Skip to content

Comments

refactor: store ScopeFlags instead of ScopeId when traverse ast#5330

Merged
IWANABETHATGUY merged 1 commit intomainfrom
07-18-refactor_store_scopeflags_when_traverse_ast
Jul 18, 2025
Merged

refactor: store ScopeFlags instead of ScopeId when traverse ast#5330
IWANABETHATGUY merged 1 commit intomainfrom
07-18-refactor_store_scopeflags_when_traverse_ast

Conversation

@IWANABETHATGUY
Copy link
Member

@IWANABETHATGUY IWANABETHATGUY commented Jul 17, 2025

This should also improve performance a little

Copy link
Member Author

IWANABETHATGUY commented Jul 17, 2025

@IWANABETHATGUY IWANABETHATGUY marked this pull request as ready for review July 17, 2025 18:06
@IWANABETHATGUY IWANABETHATGUY changed the title refactor: store ScopeFlags when traverse ast refactor: store ScopeFlags directly when traverse ast Jul 17, 2025
@IWANABETHATGUY IWANABETHATGUY force-pushed the 07-18-refactor_store_scopeflags_when_traverse_ast branch from 3f21a36 to e7bf181 Compare July 17, 2025 18:07
@IWANABETHATGUY IWANABETHATGUY marked this pull request as draft July 17, 2025 18:14
Base automatically changed from 07-17-refactor_keep_names_vardecl_rewrite to main July 17, 2025 18:17
@github-actions
Copy link
Contributor

github-actions bot commented Jul 17, 2025

Benchmarks Rust

  • target: main(14c709e)
  • pr: 07-18-refactor_store_scopeflags_when_traverse_ast(39c9313)
group                                                        pr                                     target
-----                                                        --                                     ------
bundle/bundle@multi-duplicated-top-level-symbol              1.00     84.8±2.49ms        ? ?/sec    1.01     85.4±2.83ms        ? ?/sec
bundle/bundle@multi-duplicated-top-level-symbol-sourcemap    1.01     97.4±3.45ms        ? ?/sec    1.00     96.5±3.01ms        ? ?/sec
bundle/bundle@rome_ts                                        1.02    122.1±3.99ms        ? ?/sec    1.00    120.3±2.48ms        ? ?/sec
bundle/bundle@rome_ts-sourcemap                              1.00    139.4±2.83ms        ? ?/sec    1.03    143.3±2.21ms        ? ?/sec
bundle/bundle@threejs                                        1.02     45.3±2.40ms        ? ?/sec    1.00     44.3±0.94ms        ? ?/sec
bundle/bundle@threejs-sourcemap                              1.00     54.0±1.44ms        ? ?/sec    1.01     54.4±0.83ms        ? ?/sec
bundle/bundle@threejs10x                                     1.00    459.3±6.21ms        ? ?/sec    1.00    460.2±8.08ms        ? ?/sec
bundle/bundle@threejs10x-sourcemap                           1.00    547.5±5.92ms        ? ?/sec    1.00    548.2±6.40ms        ? ?/sec
scan/scan@rome_ts                                            1.00     93.2±1.75ms        ? ?/sec    1.00     93.2±2.02ms        ? ?/sec
scan/scan@threejs                                            1.00     32.6±0.92ms        ? ?/sec    1.01     32.9±2.20ms        ? ?/sec
scan/scan@threejs10x                                         1.00    336.8±3.94ms        ? ?/sec    1.00    335.6±5.03ms        ? ?/sec

@IWANABETHATGUY IWANABETHATGUY marked this pull request as ready for review July 17, 2025 18:46
@IWANABETHATGUY IWANABETHATGUY force-pushed the 07-18-refactor_store_scopeflags_when_traverse_ast branch from e7bf181 to fc7ab13 Compare July 17, 2025 18:47
@netlify
Copy link

netlify bot commented Jul 17, 2025

Deploy Preview for rolldown-rs canceled.

Name Link
🔨 Latest commit 39c9313
🔍 Latest deploy log https://app.netlify.com/projects/rolldown-rs/deploys/6879d64ebaef130008211c46

@IWANABETHATGUY IWANABETHATGUY force-pushed the 07-18-refactor_store_scopeflags_when_traverse_ast branch from fc7ab13 to 31a4c2d Compare July 17, 2025 19:45
@IWANABETHATGUY IWANABETHATGUY force-pushed the 07-18-refactor_store_scopeflags_when_traverse_ast branch from 31a4c2d to 39c9313 Compare July 18, 2025 05:06
@IWANABETHATGUY IWANABETHATGUY changed the title refactor: store ScopeFlags directly when traverse ast refactor: store ScopeFlags instead of ScopeId when traverse ast Jul 18, 2025
@IWANABETHATGUY IWANABETHATGUY requested review from hyf0 and shulaoda July 18, 2025 05:20
@IWANABETHATGUY IWANABETHATGUY added this pull request to the merge queue Jul 18, 2025
Merged via the queue into main with commit 710f495 Jul 18, 2025
24 checks passed
@IWANABETHATGUY IWANABETHATGUY deleted the 07-18-refactor_store_scopeflags_when_traverse_ast branch July 18, 2025 05:34
This was referenced Jul 22, 2025
shulaoda added a commit that referenced this pull request Jul 22, 2025
## [1.0.0-beta.29] - 2025-07-22

### 🚀 Features

- rolldown_plugin_chunk_import_map: support custom file name (#5383) by
@shulaoda
- rolldown_plugin_chunk_import_map: emit standard import map (#5382) by
@shulaoda
- rolldown_plugin_chunk_import_map: support custom base url (#5381) by
@shulaoda
- support plugin context meta for native plugins (#5371) by @shulaoda
- rolldown: oxc v0.77.3 (#5367) by @Boshen
- rolldown_plugin_transform: align sourcemap enable logic (#5348) by
@shulaoda
- plugin_driver: use hook usage for `close_bundle` (#5361) by @shulaoda
- hmr: attach region comments for hmr patch (#5358) by @hyf0
- rolldown: add transformHiresSourcemap option (#5346) by @Brooooooklyn
- rolldown_plugin_web_worker_post: align `transform_ast` hook metadata
order to `post` (#5339) by @shulaoda

### 🐛 Bug Fixes

- when preserveEntrySignatures: false is set, output includes a circular
import (#5365) by @IWANABETHATGUY
- do not normalize iife global names (#5228) by @redstonekasi
- hmr: should not panic for editing modules that contain `import(..)`
(#5351) by @hyf0
- sync ast for newly added modules (#5354) by @IWANABETHATGUY
- used exports from dynamic imported module are removed incorrectly
(#5341) by @IWANABETHATGUY
- keep top level variables for non-esm format when minify is enabled
(#5332) by @sapphi-red
- rust: correctly return watch option (#5334) by @HigherOrderLogic

### 🚜 Refactor

- rolldown_plugin_chunk_import_map: clarify import map paths and output
filename (#5376) by @shulaoda
- rolldown: `collapse_sourcemaps` does not need to own a Vec (#5352) by
@Boshen
- rolldown_plugin_asset: improve readability for easier maintenance
(#5359) by @shulaoda
- ecmascript: remove unnecessary `allocator.alloc(program)` call (#5350)
by @Boshen
- store ast with same shape as module_table (#5345) by @IWANABETHATGUY
- simplify `is_dynamic_entry_alive` (#5342) by @IWANABETHATGUY
- rolldown_plugin_web_worker_post: tweak code organization (#5338) by
@shulaoda
- store `ScopeFlags` instead of `ScopeId` when traverse ast (#5330) by
@IWANABETHATGUY
- simplify `keep_names` VarDeclaration rewrite (#5325) by
@IWANABETHATGUY

### 📚 Documentation

- experimental: update the description of `chunkImportMap` (#5384) by
@shulaoda
- experiment: add usage documentation for `chunkImportMap` (#5379) by
@shulaoda

### ⚡ Performance

- plugin_driver: skip unused hooks early based on hook usage meta
(#5363) by @shulaoda
- rolldown: box `TransformOptions` (#5353) by @Boshen

### 🧪 Testing

- rust: hide runtime module output in snapshots to improve clarity
(#5366) by @hyf0
- node: put minify related tests in a single directory (#5333) by
@sapphi-red

### ⚙️ Miscellaneous Tasks

- examples: update `chunk-import-map` (#5385) by @shulaoda
- add `examples/chunk-import-map` (#5380) by @shulaoda
- deps: lock file maintenance (#5373) by @renovate[bot]
- deps: lock file maintenance rust crates (#5372) by @renovate[bot]
- deps: lock file maintenance npm packages (#5370) by @renovate[bot]
- deps: update dependency @napi-rs/wasm-runtime to v1 (#5369) by
@renovate[bot]
- deps: update taiki-e/install-action action to v2.56.19 (#5368) by
@renovate[bot]
- extract `HookOrderIndicates` logic (#5362) by @shulaoda
- rust: remove unnecessary `#[allow(unused)]` (#5360) by @shulaoda
- deps: update dependency rolldown-plugin-dts to v0.14.1 (#5357) by
@renovate[bot]
- use `debug=1` for profile.dev and profile.test (#5355) by
@IWANABETHATGUY
- deps: update dependency rolldown-plugin-dts to ^0.14.0 (#5349) by
@renovate[bot]
- remove packages/rolldown/npm/* from workspace config (#5347) by
@Brooooooklyn
- pnpm,justfile: enable pnpm `verifyDepsBeforeRun: install` (#5331) by
@Boshen
- update `build-js-glue` script (#5335) by @btea

### ◀️ Revert

- `test(rust): prevent meaningless snapshot change from bumping oxc
runtime versions #5312` (#5336) by @hyf0

### ❤️ New Contributors

* @redstonekasi made their first contribution in
[#5228](#5228)
* @HigherOrderLogic made their first contribution in
[#5334](#5334)

Co-authored-by: shulaoda <[email protected]>
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.

2 participants