Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BUGFIX release] Simplify mixin application
Simplifies mixin application in a number of ways: - Ensures that we only access `meta` once for a given object when applying mixins - Ensures that we only `peekDescriptors` once for a given descriptor - Minimizes the number of if/else branches and defaulting in general - Breaks apart `defineProperty` so that we can do less work per definition when mixing in mixins, since we know more about what possible operations will occur. - Removes extra brand checks from `defineProperty` (Array.isArray) so we don't penalize every defineProperty for doing that. - Only revalidate observers once per mixin application. - Only brand check `didDefineProperty` once per mixin application. - Replace `for..in` loops with `Object.keys` since we only care about own properties. - Only loop once in `extractAccessors`. - Combine observer and listener meta into a single object so we only need to do one lookup. In most cases, this is undefined in modern applications, so no extra memory cost. - Simplify CP descriptor property lookups (remove duplicate functions).
- Loading branch information