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

Glimmer optimizations #11338

Merged
merged 4 commits into from
Jun 4, 2015
Merged

Glimmer optimizations #11338

merged 4 commits into from
Jun 4, 2015

Commits on Jun 4, 2015

  1. Change assign to not use a for-in loop

    Apparently, v8’s JIT engineers require that we, as JavaScript developers
    perform this very simple transformation, since they do not seem capable
    of performing it themselves.
    tomdale committed Jun 4, 2015
    Configuration menu
    Copy the full SHA
    53b9f19 View commit details
    Browse the repository at this point in the history
  2. Fix bug where parent/ownerView was incorrect

    Previously, `parentView` and `ownerView` were set based on `scope`,
    which is the “owner tree”. However, it should be based on the
    component tree instead.
    
    This commit properly wires up `parentView` and `ownerView`, while
    maintaining the correct semantics for the `{{view.foo}}` keyword in
    both legacy views and components.
    tomdale committed Jun 4, 2015
    Configuration menu
    Copy the full SHA
    25507d3 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b902083 View commit details
    Browse the repository at this point in the history
  4. Make the env more generally consistent (JIT)

    Previously, the `env` was a bag of properties, and got frequently
    extended or modified (in largely predictable ways).
    
    The consequence is that even though the environment is conceptually a
    single concept, it got treated internally as a megamorphic shapeless
    entity. For what it’s worth, this JIT confusion was somewhat mirrored
    by a confusion when reading the code: it was never precisely clear what
    the `env` would look like from the perspective of a human reader.
    
    This commit changes the environment to be a single class. There are only
    two kinds of child environments (a change in the `view` and a change to
    `outletState`), and there are now methods on `env` to make that simple
    and predictable.
    
    The consequence is that all methods that take an `env` now go down a
    fast path when accessing it, and human readers of the code can feel
    confident about what the environment looks like.
    tomdale committed Jun 4, 2015
    Configuration menu
    Copy the full SHA
    d1d993d View commit details
    Browse the repository at this point in the history