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

Skip to content

Proper string type for rolldown #427

@hyf0

Description

@hyf0

Rolldown used oxc Atom as the default string type.

After oxc-project/oxc#2295 and oxc-project/backlog#46, oxc Atom can't be used as a general purposed string type anymore. Not to mentioned that it lacks characteristics that bundler required.

To make updating oxc easier, we need to replace the current oxc Atom and use a new string type as the default. And to gain potential performance, the new string type should be

  • friendly in parallel
  • O(1) clone
  • fast comparing
  • fast hashing/pre-computed hash

Contexts:

  • Due to scope hoisting, rolldown needs to pull out values from the every oxc ast identifier and store them in a different places. Since oxc Atom is not a general purposed string type anymore, we need to converting the Atom to a new string type. This costs some tax just for converting.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions