Merge pull request #1752 from loganfsmyth/hidden-class-change

Initialize properties to avoid hidden class thrashing.
This commit is contained in:
Sebastian McKenzie 2015-06-15 10:45:30 +01:00
commit c0e5059634
3 changed files with 22 additions and 0 deletions

View File

@ -7,6 +7,7 @@ export default class TraversalContext {
this.scope = scope;
this.state = state;
this.opts = opts;
this.queue = null;
}
shouldVisit(node) {

View File

@ -10,6 +10,23 @@ export default class NodePath {
this.parent = parent;
this.data = {};
this.hub = hub;
this.shouldSkip = false;
this.shouldStop = false;
this.removed = false;
this.state = null;
this.opts = null;
this.skipKeys = null;
this.parentPath = null;
this.context = null;
this.container = null;
this.containerKey = null;
this.key = null;
this.node = null;
this.scope = null;
this.breakOnScopePaths = null;
this.type = null;
this.typeAnnotation = null;
}
/**

View File

@ -11,6 +11,10 @@ export default class Binding {
this.path = path;
this.kind = kind;
this.hasValue = false;
this.hasDeoptedValue = false;
this.value = null;
this.clearValue();
if (existing) {