Skip to content

Issue with reusing AST nodes #6375

Closed

Description

@hzoo

Just want to write this down since we're seeing the same kind of fix for issues and we should look into solving this generally.

Immutable asts would be a larger change, so maybe #5971 or infra in our unit tests to check uniqueness would help

#6046
#6054
#6374

Activity

  1. added
    PR: Internal 🏠
    on Oct 4, 2017
  2. xtuc commented on Oct 4, 2017

    @xtuc
    Member

    I can work on this tomorrow, I would like to have a quick prototype to measure the perf impact (if any).

  3. Andarist commented on Oct 4, 2017

    @Andarist
    Member

    closed by accident with a fat finger :<

  4. xtuc commented on Oct 5, 2017

    @xtuc
    Member

    It's more complicated than I thought, the traverse algorithm is not easy to understand.

    I wanted to use Immutable.js with a tree datastructure.

    I don't know what we would do with mutations like: path.node.id.name = "a";, it would have a big perf impact to allow that (since it would bypass the partial copy optimization). Only path.Insert*, path.remove or path.replace* would be possible.

    I've looked into OCaml and GHC, both compiler are self-hosted and uses an immutable tree. They are fast enough to not need to merge visitors and only use passPerPreset-like behavior.

  5. hzoo commented on Oct 5, 2017

    @hzoo
    MemberAuthor
  6. hzoo commented on Nov 1, 2017

    @hzoo
    MemberAuthor

    Happening more so we really need a fix

    #6517
    #6657

  7. nicolo-ribaudo commented on Nov 29, 2017

    @nicolo-ribaudo
    Member

    Related: #3428

  8. added
    outdated
    on May 2, 2018
  9. locked as resolved and limited conversation to collaborators on May 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    PR: Internal 🏠Priority: Highi: discussionoutdated

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions