Skip to content

Comments

Restore is_external_dynamic_import function with refactored logic#7897

Closed
Copilot wants to merge 2 commits into01-15-refactor_link_stage_inline_and_simplify_external_dynamic_import_checkfrom
copilot/sub-pr-7890
Closed

Restore is_external_dynamic_import function with refactored logic#7897
Copilot wants to merge 2 commits into01-15-refactor_link_stage_inline_and_simplify_external_dynamic_import_checkfrom
copilot/sub-pr-7890

Conversation

Copy link
Contributor

Copilot AI commented Jan 15, 2026

Addresses feedback on PR #7890 to keep the is_external_dynamic_import function while incorporating the new optimized logic.

Changes Made

  • Restored the is_external_dynamic_import helper function that was previously removed
  • Refactored the function signature to use the new optimized logic:
    • Removed the ModuleTable parameter (no longer needed)
    • Takes rec, rec_resolved_module, importer_is_user_defined_entry, and importer_idx as parameters
    • Uses importer.is_user_defined_entry directly instead of fetching from the module table
  • Updated the call site to use the refactored function instead of inlined logic
  • Added necessary imports (ModuleIdx and ResolvedImportRecord)

Benefits

  • Maintains better code organization with a clearly-named function
  • Improves readability by encapsulating the logic
  • Preserves the performance optimization from the original refactoring
  • No runtime overhead - Rust's optimizer will inline this automatically

Testing

  • ✅ Code compiles successfully with just build-rolldown
  • ✅ No clippy warnings introduced
  • ✅ Function semantics remain identical to the inlined version

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@hyf0
Copy link
Member

hyf0 commented Jan 15, 2026

@copilot rerun

Copy link
Contributor Author

Copilot AI commented Jan 15, 2026

@copilot rerun

Done! Restored the is_external_dynamic_import function with the new logic in commit b9ae2b5.

Copilot AI changed the title [WIP] WIP to address feedback on refactoring is_external_dynamic_import function Restore is_external_dynamic_import function with refactored logic Jan 15, 2026
@hyf0 hyf0 closed this Jan 15, 2026
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