Skip to content

Conversation

@Dunqing
Copy link
Member

@Dunqing Dunqing commented Mar 26, 2025

This PR aims to solve a problem where the flags of a symbol would merge its redeclaration symbol flags, which means we can't know what the flags of the first definition is.

This PR changes to when a symbol is redeclared, store the symbol itself as the first entry of symbol_redeclarations, from which we can know the flags of every definition.

@github-actions github-actions bot added A-linter Area - Linter A-semantic Area - Semantic A-transformer Area - Transformer / Transpiler C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior labels Mar 26, 2025
@Dunqing Dunqing changed the title refactor(semantic): store symbol information as the first entry in symbol_declarations when it is redeclared refactor(semantic)!: store symbol information as the first entry in symbol_declarations when it is redeclared Mar 26, 2025
Copy link
Member Author

Dunqing commented Mar 26, 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.

@codspeed-hq
Copy link

codspeed-hq bot commented Mar 26, 2025

CodSpeed Instrumentation Performance Report

Merging #10062 will create unknown performance changes

Comparing 03-26-refactor_semantic_store_symbol_information_as_the_first_entry_in_symbol_declarations_when_it_is_redeclared (cd1f035) with main (84e167e)

Summary

🆕 33 new benchmarks

Benchmarks breakdown

Benchmark BASE HEAD Change
🆕 codegen[checker.ts] N/A 22.6 ms N/A
🆕 codegen_sourcemap[checker.ts] N/A 65.6 ms N/A
🆕 isolated-declarations[vue-id.ts] N/A 58.3 ms N/A
🆕 lexer[RadixUIAdoptionSection.jsx] N/A 21.1 µs N/A
🆕 lexer[antd.js] N/A 24.8 ms N/A
🆕 lexer[cal.com.tsx] N/A 5.9 ms N/A
🆕 lexer[checker.ts] N/A 14.8 ms N/A
🆕 lexer[pdf.mjs] N/A 3.9 ms N/A
🆕 linter[RadixUIAdoptionSection.jsx] N/A 2.7 ms N/A
🆕 linter[cal.com.tsx] N/A 1.2 s N/A
🆕 linter[checker.ts] N/A 2.9 s N/A
🆕 mangler[antd.js] N/A 16 ms N/A
🆕 mangler[react.development.js] N/A 295.6 µs N/A
🆕 mangler[typescript.js] N/A 39.7 ms N/A
🆕 minifier[antd.js] N/A 165.6 ms N/A
🆕 minifier[react.development.js] N/A 1.8 ms N/A
🆕 minifier[typescript.js] N/A 291.6 ms N/A
🆕 estree[checker.ts] N/A 96.1 ms N/A
🆕 parser[RadixUIAdoptionSection.jsx] N/A 92.2 µs N/A
🆕 parser[antd.js] N/A 113.6 ms N/A
... ... ... ... ...

ℹ️ Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.

@graphite-app
Copy link
Contributor

graphite-app bot commented Mar 28, 2025

Merge activity

…symbol_declarations` when it is redeclared (#10062)

This PR aims to solve a problem where the flags of a symbol would merge its redeclaration symbol flags, which means we can't know what the flags of the first definition is.

This PR changes to when a symbol is redeclared, store the symbol itself as the first entry of `symbol_redeclarations`, from which we can know the `flags` of every definition.
@graphite-app graphite-app bot force-pushed the 03-26-feat_semantic_scoping_add_declaration_and_flags_fields_for_symbol_declarations branch from 18689d0 to 528469e Compare March 28, 2025 04:13
@graphite-app graphite-app bot force-pushed the 03-26-refactor_semantic_store_symbol_information_as_the_first_entry_in_symbol_declarations_when_it_is_redeclared branch from 9e5ecec to cd1f035 Compare March 28, 2025 04:14
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Mar 28, 2025
Base automatically changed from 03-26-feat_semantic_scoping_add_declaration_and_flags_fields_for_symbol_declarations to main March 28, 2025 04:25
@graphite-app graphite-app bot merged commit cd1f035 into main Mar 28, 2025
27 checks passed
@graphite-app graphite-app bot deleted the 03-26-refactor_semantic_store_symbol_information_as_the_first_entry_in_symbol_declarations_when_it_is_redeclared branch March 28, 2025 04:28
This was referenced Apr 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-linter Area - Linter A-semantic Area - Semantic A-transformer Area - Transformer / Transpiler C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants