6.0.0
I'm extremely stupid and didn't commit as I go. To anyone reading this I'm extremely sorry. A lot of these changes are very broad and I plan on releasing Babel 6.0.0 today live on stage at Ember Camp London so I'm afraid I couldn't wait. If you're ever in London I'll buy you a beer (or assorted beverage!) to make up for it, also I'll kiss your feet and give you a back massage, maybe.
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
/* @flow */
|
||||
|
||||
import type NodePath from "../path";
|
||||
|
||||
/**
|
||||
* This class is responsible for a binding inside of a scope.
|
||||
*
|
||||
@@ -11,21 +15,17 @@
|
||||
|
||||
export default class Binding {
|
||||
constructor({ existing, identifier, scope, path, kind }) {
|
||||
this.constantViolations = [];
|
||||
this.constant = true;
|
||||
|
||||
this.identifier = identifier;
|
||||
this.scope = scope;
|
||||
this.path = path;
|
||||
this.kind = kind;
|
||||
|
||||
this.constantViolations = [];
|
||||
this.constant = true;
|
||||
|
||||
this.referencePaths = [];
|
||||
this.references = 0;
|
||||
this.referenced = false;
|
||||
|
||||
this.scope = scope;
|
||||
this.path = path;
|
||||
this.kind = kind;
|
||||
|
||||
this.hasValue = false;
|
||||
this.hasDeoptedValue = false;
|
||||
this.value = null;
|
||||
this.references = 0;
|
||||
|
||||
this.clearValue();
|
||||
|
||||
@@ -38,6 +38,18 @@ export default class Binding {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
constantViolations: Array<NodePath>;
|
||||
constant: boolean;
|
||||
|
||||
referencePaths: Array<NodePath>;
|
||||
referenced: boolean;
|
||||
references: number;
|
||||
|
||||
hasDeoptedValue: boolean;
|
||||
hasValue: boolean;
|
||||
value: any;
|
||||
|
||||
deoptValue() {
|
||||
this.clearValue();
|
||||
this.hasDeoptedValue = true;
|
||||
@@ -68,7 +80,7 @@ export default class Binding {
|
||||
* Increment the amount of references to this binding.
|
||||
*/
|
||||
|
||||
reference(path) {
|
||||
reference(path: NodePath) {
|
||||
this.referenced = true;
|
||||
this.references++;
|
||||
this.referencePaths.push(path)
|
||||
|
||||
Reference in New Issue
Block a user