es6-block-scope.js
29.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
(function() {
var escope, expect, harmony;
expect = require('chai').expect;
harmony = require('../third_party/esprima');
escope = require('..');
describe('ES6 block scope', function() {
it('let is materialized in ES6 block scope#1', function() {
var ast, scope, scopeManager;
ast = harmony.parse("{\n let i = 20;\n i;\n}");
scopeManager = escope.analyze(ast, {
ecmaVersion: 6
});
expect(scopeManager.scopes).to.have.length(2);
scope = scopeManager.scopes[0];
expect(scope.type).to.be.equal('global');
expect(scope.variables).to.have.length(0);
scope = scopeManager.scopes[1];
expect(scope.type).to.be.equal('block');
expect(scope.variables).to.have.length(1);
expect(scope.variables[0].name).to.be.equal('i');
expect(scope.references).to.have.length(2);
expect(scope.references[0].identifier.name).to.be.equal('i');
return expect(scope.references[1].identifier.name).to.be.equal('i');
});
it('let is materialized in ES6 block scope#2', function() {
var ast, scope, scopeManager;
ast = harmony.parse("{\n let i = 20;\n var i = 20;\n i;\n}");
scopeManager = escope.analyze(ast, {
ecmaVersion: 6
});
expect(scopeManager.scopes).to.have.length(2);
scope = scopeManager.scopes[0];
expect(scope.type).to.be.equal('global');
expect(scope.variables).to.have.length(1);
expect(scope.variables[0].name).to.be.equal('i');
scope = scopeManager.scopes[1];
expect(scope.type).to.be.equal('block');
expect(scope.variables).to.have.length(1);
expect(scope.variables[0].name).to.be.equal('i');
expect(scope.references).to.have.length(3);
expect(scope.references[0].identifier.name).to.be.equal('i');
expect(scope.references[1].identifier.name).to.be.equal('i');
return expect(scope.references[2].identifier.name).to.be.equal('i');
});
it('function delaration is materialized in ES6 block scope', function() {
var ast, scope, scopeManager;
ast = harmony.parse("{\n function test() {\n }\n test();\n}");
scopeManager = escope.analyze(ast, {
ecmaVersion: 6
});
expect(scopeManager.scopes).to.have.length(3);
scope = scopeManager.scopes[0];
expect(scope.type).to.be.equal('global');
expect(scope.variables).to.have.length(0);
scope = scopeManager.scopes[1];
expect(scope.type).to.be.equal('block');
expect(scope.variables).to.have.length(1);
expect(scope.variables[0].name).to.be.equal('test');
expect(scope.references).to.have.length(1);
expect(scope.references[0].identifier.name).to.be.equal('test');
scope = scopeManager.scopes[2];
expect(scope.type).to.be.equal('function');
expect(scope.variables).to.have.length(1);
expect(scope.variables[0].name).to.be.equal('arguments');
return expect(scope.references).to.have.length(0);
});
it('let is not hoistable#1', function() {
var ast, globalScope, scope, scopeManager;
ast = harmony.parse("var i = 42; (1)\n{\n i; // (2) ReferenceError at runtime.\n let i = 20; // (2)\n i; // (2)\n}");
scopeManager = escope.analyze(ast, {
ecmaVersion: 6
});
expect(scopeManager.scopes).to.have.length(2);
globalScope = scopeManager.scopes[0];
expect(globalScope.type).to.be.equal('global');
expect(globalScope.variables).to.have.length(1);
expect(globalScope.variables[0].name).to.be.equal('i');
expect(globalScope.references).to.have.length(1);
scope = scopeManager.scopes[1];
expect(scope.type).to.be.equal('block');
expect(scope.variables).to.have.length(1);
expect(scope.variables[0].name).to.be.equal('i');
expect(scope.references).to.have.length(3);
expect(scope.references[0].resolved).to.be.equal(scope.variables[0]);
expect(scope.references[1].resolved).to.be.equal(scope.variables[0]);
return expect(scope.references[2].resolved).to.be.equal(scope.variables[0]);
});
return it('let is not hoistable#2', function() {
var ast, globalScope, scope, scopeManager, v1, v2, v3;
ast = harmony.parse("(function () {\n var i = 42; // (1)\n i; // (1)\n {\n i; // (3)\n {\n i; // (2)\n let i = 20; // (2)\n i; // (2)\n }\n let i = 30; // (3)\n i; // (3)\n }\n i; // (1)\n}());");
scopeManager = escope.analyze(ast, {
ecmaVersion: 6
});
expect(scopeManager.scopes).to.have.length(4);
globalScope = scopeManager.scopes[0];
expect(globalScope.type).to.be.equal('global');
expect(globalScope.variables).to.have.length(0);
expect(globalScope.references).to.have.length(0);
scope = scopeManager.scopes[1];
expect(scope.type).to.be.equal('function');
expect(scope.variables).to.have.length(2);
expect(scope.variables[0].name).to.be.equal('arguments');
expect(scope.variables[1].name).to.be.equal('i');
v1 = scope.variables[1];
expect(scope.references).to.have.length(3);
expect(scope.references[0].resolved).to.be.equal(v1);
expect(scope.references[1].resolved).to.be.equal(v1);
expect(scope.references[2].resolved).to.be.equal(v1);
scope = scopeManager.scopes[2];
expect(scope.type).to.be.equal('block');
expect(scope.variables).to.have.length(1);
expect(scope.variables[0].name).to.be.equal('i');
v3 = scope.variables[0];
expect(scope.references).to.have.length(3);
expect(scope.references[0].resolved).to.be.equal(v3);
expect(scope.references[1].resolved).to.be.equal(v3);
expect(scope.references[2].resolved).to.be.equal(v3);
scope = scopeManager.scopes[3];
expect(scope.type).to.be.equal('block');
expect(scope.variables).to.have.length(1);
expect(scope.variables[0].name).to.be.equal('i');
v2 = scope.variables[0];
expect(scope.references).to.have.length(3);
expect(scope.references[0].resolved).to.be.equal(v2);
expect(scope.references[1].resolved).to.be.equal(v2);
return expect(scope.references[2].resolved).to.be.equal(v2);
});
});
}).call(this);
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImVzNi1ibG9jay1zY29wZS5jb2ZmZWUiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBdUJBO0FBQUEsTUFBQSx1QkFBQTs7QUFBQSxFQUFBLE1BQUEsR0FBUyxPQUFBLENBQVMsTUFBVCxDQUFlLENBQUMsTUFBekIsQ0FBQTs7QUFBQSxFQUNBLE9BQUEsR0FBVSxPQUFBLENBQVMsd0JBQVQsQ0FEVixDQUFBOztBQUFBLEVBRUEsTUFBQSxHQUFTLE9BQUEsQ0FBUyxJQUFULENB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V4cGVjdChzY29wZS52YXJpYWJsZXMpLnRvLmhhdmUubGVuZ3RoIDFcbiAgICAgICAgZXhwZWN0KHNjb3BlLnZhcmlhYmxlc1swXS5uYW1lKS50by5iZS5lcXVhbCAnaSdcbiAgICAgICAgZXhwZWN0KHNjb3BlLnJlZmVyZW5jZXMpLnRvLmhhdmUubGVuZ3RoIDNcbiAgICAgICAgZXhwZWN0KHNjb3BlLnJlZmVyZW5jZXNbMF0ucmVzb2x2ZWQpLnRvLmJlLmVxdWFsIHNjb3BlLnZhcmlhYmxlc1swXVxuICAgICAgICBleHBlY3Qoc2NvcGUucmVmZXJlbmNlc1sxXS5yZXNvbHZlZCkudG8uYmUuZXF1YWwgc2NvcGUudmFyaWFibGVzWzBdXG4gICAgICAgIGV4cGVjdChzY29wZS5yZWZlcmVuY2VzWzJdLnJlc29sdmVkKS50by5iZS5lcXVhbCBzY29wZS52YXJpYWJsZXNbMF1cblxuICAgIGl0ICdsZXQgaXMgbm90IGhvaXN0YWJsZSMyJywgLT5cbiAgICAgICAgYXN0ID0gaGFybW9ueS5wYXJzZSBcIlwiXCJcbiAgICAgICAgKGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHZhciBpID0gNDI7IC8vICgxKVxuICAgICAgICAgICAgaTsgIC8vICgxKVxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIGk7ICAvLyAoMylcbiAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgIGk7ICAvLyAoMilcbiAgICAgICAgICAgICAgICAgICAgbGV0IGkgPSAyMDsgIC8vICgyKVxuICAgICAgICAgICAgICAgICAgICBpOyAgLy8gKDIpXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGxldCBpID0gMzA7ICAvLyAoMylcbiAgICAgICAgICAgICAgICBpOyAgLy8gKDMpXG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpOyAgLy8gKDEpXG4gICAgICAgIH0oKSk7XG4gICAgICAgIFwiXCJcI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