Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@nicolo-ribaudo
Copy link
Member

@nicolo-ribaudo nicolo-ribaudo commented May 16, 2024

Q                       A
Fixed Issues? Fixes #1, Fixes #2
Patch: Bug Fix?
Major: Breaking Change?
Minor: New Feature?
Tests Added + Pass? Yes
Documentation PR Link
Any Dependency Changes?
License MIT

The goal of this PR is to:

  • move as much analysis of helpers as possible to build time rather than runtime
  • make helpers lighter, by working as much as possible with them as an AST rather than a NodePath at runtime
  • get rid of the File class that needs to be injected from @babel/core to @babel/helpers through .ensure(name, FileClass)

This PR reduces the time needed to process a single helper by half (allHelpersNames.map(name => this.addHelper(name)); takes 100ms rather than 190ms on my machine)

@babel-bot
Copy link
Collaborator

babel-bot commented May 16, 2024

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/57012

@nicolo-ribaudo nicolo-ribaudo force-pushed the static-helper-metata branch from 17a94db to 7883619 Compare May 17, 2024 11:06
Copy link
Member

@liuxingbaoyu liuxingbaoyu left a comment

Choose a reason for hiding this comment

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

Great! I like this!

@nicolo-ribaudo nicolo-ribaudo force-pushed the static-helper-metata branch from 0ca190e to 0c29d67 Compare May 17, 2024 11:36
@nicolo-ribaudo nicolo-ribaudo force-pushed the static-helper-metata branch 2 times, most recently from c95ee9a to fc45887 Compare May 18, 2024 12:38
@nicolo-ribaudo nicolo-ribaudo marked this pull request as ready for review May 19, 2024 12:17
@nicolo-ribaudo nicolo-ribaudo added the PR: Internal 🏠 A type of pull request used for our changelog categories label May 19, 2024
@nicolo-ribaudo nicolo-ribaudo force-pushed the static-helper-metata branch from 6f9b0fc to 168c0d2 Compare May 20, 2024 10:34
this.k = kind;
}

export { _OverloadYield as default };
Copy link
Member Author

Choose a reason for hiding this comment

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

Support for this is needed in #16510

@github-actions github-actions bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Aug 22, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

outdated A closed issue/PR that is archived due to age. Recommended to make a new issue PR: Internal 🏠 A type of pull request used for our changelog categories

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants