Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Class method effects #4018

Merged
merged 56 commits into from May 23, 2021
Merged

Class method effects #4018

merged 56 commits into from May 23, 2021

Commits on Mar 26, 2021

  1. Move logic from ClassBody into ClassNode

    So that it sits in one place and is easier to extend.
    marijnh committed Mar 26, 2021
    Copy the full SHA
    7b8304e View commit details
    Browse the repository at this point in the history
  2. Track static class fields and improve handling of class getters/setters

    This aims to improve tree-shaking of code that uses static class
    properties (rollup#3989) and to improve detection of side effects through
    class getters/setters (rollup#4016).
    
    The first part works by keeping a map of positively known static
    properties (methods and simple getters) in
    `ClassNode.staticPropertyMap`, along with a flag
    (`ClassNode.deoptimizedStatic`) that indicates that something happened
    that removed our confidence that we know anything about the class
    object.
    
    Access and calls to these known static properties are handled by
    routing the calls to `getLiteralValueAtPath`,
    `getReturnExpressionWhenCalledAtPath`, and
    `hasEffectsWhenCalledAtPath` to the known values in the properties. In
    contrast to `ObjectExpression`, this class does not try to keep track
    of multiple expressions associated with a property, since that doesn't
    come up a lot on classes.
    
    The handling of side effect detection through getters and setters is
    done by, _if_ the entire class object (or its prototype in case of
    access to the prototype) hasn't been deoptimized, scanning through the
    directly defined getters and setters to see if one exists (calling
    through to superclasses as appropriate). I believe that this is solid
    because any code that would be able to change the set of getters and
    setters on a class would cause the entire object to be deoptimized.
    marijnh committed Mar 26, 2021
    Copy the full SHA
    d524abd View commit details
    Browse the repository at this point in the history

Commits on Mar 27, 2021

  1. Copy the full SHA
    185097d View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    0960a33 View commit details
    Browse the repository at this point in the history

Commits on Apr 2, 2021

  1. Copy the full SHA
    cea520d View commit details
    Browse the repository at this point in the history

Commits on Apr 14, 2021

  1. Copy the full SHA
    bcd7f5a View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    0e0fdaa View commit details
    Browse the repository at this point in the history

Commits on Apr 15, 2021

  1. Fix types

    lukastaegert committed Apr 15, 2021
    Copy the full SHA
    1251f5a View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    d8ec2ea View commit details
    Browse the repository at this point in the history

Commits on Apr 17, 2021

  1. Copy the full SHA
    056d9f0 View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    9507110 View commit details
    Browse the repository at this point in the history
  3. Copy the full SHA
    7f51eef View commit details
    Browse the repository at this point in the history

Commits on Apr 19, 2021

  1. Copy the full SHA
    10c4e40 View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    99a794d View commit details
    Browse the repository at this point in the history

Commits on Apr 20, 2021

  1. Copy the full SHA
    72dc62b View commit details
    Browse the repository at this point in the history
  2. Small simplification

    lukastaegert committed Apr 20, 2021
    Copy the full SHA
    ba6e043 View commit details
    Browse the repository at this point in the history

Commits on Apr 21, 2021

  1. Copy the full SHA
    f19fc61 View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    132fb94 View commit details
    Browse the repository at this point in the history
  3. Copy the full SHA
    f09cd5b View commit details
    Browse the repository at this point in the history
  4. Copy the full SHA
    10ee697 View commit details
    Browse the repository at this point in the history

Commits on Apr 22, 2021

  1. Copy the full SHA
    0350110 View commit details
    Browse the repository at this point in the history

Commits on Apr 23, 2021

  1. Improve coverage

    lukastaegert committed Apr 23, 2021
    Copy the full SHA
    d723df6 View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    a2f02c1 View commit details
    Browse the repository at this point in the history
  3. Copy the full SHA
    f89085c View commit details
    Browse the repository at this point in the history
  4. Improve coverage

    lukastaegert committed Apr 23, 2021
    Copy the full SHA
    6d70426 View commit details
    Browse the repository at this point in the history

Commits on Apr 24, 2021

  1. Copy the full SHA
    4eff4ed View commit details
    Browse the repository at this point in the history

Commits on Apr 25, 2021

  1. Copy the full SHA
    dd5f73b View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    333116a View commit details
    Browse the repository at this point in the history
  3. Copy the full SHA
    8f498f2 View commit details
    Browse the repository at this point in the history
  4. Copy the full SHA
    ef0929f View commit details
    Browse the repository at this point in the history

Commits on May 6, 2021

  1. Copy the full SHA
    0fcd42d View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    145d01f View commit details
    Browse the repository at this point in the history
  3. Copy the full SHA
    71a27ba View commit details
    Browse the repository at this point in the history

Commits on May 8, 2021

  1. Copy the full SHA
    616a6d3 View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    182a0ba View commit details
    Browse the repository at this point in the history
  3. Copy the full SHA
    e33e06e View commit details
    Browse the repository at this point in the history

Commits on May 9, 2021

  1. Copy the full SHA
    afad828 View commit details
    Browse the repository at this point in the history

Commits on May 10, 2021

  1. Copy the full SHA
    d290c6c View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    0609907 View commit details
    Browse the repository at this point in the history
  3. Copy the full SHA
    a70e660 View commit details
    Browse the repository at this point in the history
  4. Copy the full SHA
    ea5fe1d View commit details
    Browse the repository at this point in the history

Commits on May 12, 2021

  1. Copy the full SHA
    02c1127 View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    ab15b60 View commit details
    Browse the repository at this point in the history

Commits on May 14, 2021

  1. Track array elements

    lukastaegert committed May 14, 2021
    Copy the full SHA
    ece8f31 View commit details
    Browse the repository at this point in the history

Commits on May 15, 2021

  1. Copy the full SHA
    275946e View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    f4766a6 View commit details
    Browse the repository at this point in the history
  3. Copy the full SHA
    92b1e1d View commit details
    Browse the repository at this point in the history

Commits on May 16, 2021

  1. Copy the full SHA
    224a4e1 View commit details
    Browse the repository at this point in the history
  2. Improve coverage

    lukastaegert committed May 16, 2021
    Copy the full SHA
    87e8029 View commit details
    Browse the repository at this point in the history
  3. Improve coverage

    lukastaegert committed May 16, 2021
    Copy the full SHA
    d2b61c9 View commit details
    Browse the repository at this point in the history
  4. Copy the full SHA
    66a5cf9 View commit details
    Browse the repository at this point in the history

Commits on May 17, 2021

  1. Improve coverage

    lukastaegert committed May 17, 2021
    Copy the full SHA
    76b5cbe View commit details
    Browse the repository at this point in the history

Commits on May 18, 2021

  1. 2.49.0-0

    lukastaegert committed May 18, 2021
    Copy the full SHA
    b6bd8d4 View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    99964aa View commit details
    Browse the repository at this point in the history

Commits on May 20, 2021

  1. Copy the full SHA
    84b0d94 View commit details
    Browse the repository at this point in the history
  2. 2.49.0-1

    lukastaegert committed May 20, 2021
    Copy the full SHA
    7490a87 View commit details
    Browse the repository at this point in the history