Skip to content

Commit f39c6dc

Browse files
committed
fix(setup): use upstream traceur with explicit patches
Also correct the transpile to ES6 Also support generics correctly All patches are hooked in via `/tools/transpiler/index.js` google/traceur-compiler#1700 google/traceur-compiler#1699 google/traceur-compiler#1708 google/traceur-compiler#1625 google/traceur-compiler#1706
1 parent 63d8107 commit f39c6dc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+514
-124
lines changed

karma-js.conf.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ module.exports = function(config) {
1414
{pattern: 'tools/transpiler/spec/**', included: false},
1515

1616
'node_modules/traceur/bin/traceur-runtime.js',
17-
'traceur-runtime-patch.js',
1817
'node_modules/es6-module-loader/dist/es6-module-loader-sans-promises.src.js',
1918
// Including systemjs because it defines `__eval`, which produces correct stack traces.
2019
'node_modules/systemjs/dist/system.src.js',

modules/angular2/src/change_detection/abstract_change_detector.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ export class AbstractChangeDetector extends ChangeDetector {
88
mode:string;
99

1010
constructor() {
11+
super();
1112
this.children = [];
1213
this.mode = CHECK_ALWAYS;
1314
}

modules/angular2/src/change_detection/array_changes.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ export class ArrayChanges {
1919
_length:int;
2020
_linkedRecords:_DuplicateMap;
2121
_unlinkedRecords:_DuplicateMap;
22-
_previousItHead:CollectionChangeRecord<V>;
23-
_itHead:CollectionChangeRecord<V>;
24-
_itTail:CollectionChangeRecord<V>;
25-
_additionsHead:CollectionChangeRecord<V>;
26-
_additionsTail:CollectionChangeRecord<V>;
27-
_movesHead:CollectionChangeRecord<V>;
28-
_movesTail:CollectionChangeRecord<V> ;
29-
_removalsHead:CollectionChangeRecord<V>;
30-
_removalsTail:CollectionChangeRecord<V>;
22+
_previousItHead:CollectionChangeRecord;
23+
_itHead:CollectionChangeRecord;
24+
_itTail:CollectionChangeRecord;
25+
_additionsHead:CollectionChangeRecord;
26+
_additionsTail:CollectionChangeRecord;
27+
_movesHead:CollectionChangeRecord;
28+
_movesTail:CollectionChangeRecord;
29+
_removalsHead:CollectionChangeRecord;
30+
_removalsTail:CollectionChangeRecord;
3131

3232
constructor() {
3333
this._collection = null;

modules/angular2/src/change_detection/exceptions.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ export class ExpressionChangedAfterItHasBeenChecked extends Error {
44
message:string;
55

66
constructor(proto:ProtoRecord, change:any) {
7+
super();
78
this.message = `Expression '${proto.expressionAsString}' has changed after it was checked. ` +
89
`Previous value: '${change.previousValue}'. Current value: '${change.currentValue}'`;
910
}
@@ -19,6 +20,7 @@ export class ChangeDetectionError extends Error {
1920
location:string;
2021

2122
constructor(proto:ProtoRecord, originalException:any) {
23+
super();
2224
this.originalException = originalException;
2325
this.location = proto.expressionAsString;
2426
this.message = `${this.originalException} in [${this.location}]`;

modules/angular2/src/change_detection/parser/ast.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ export class EmptyExpr extends AST {
3636
export class Structural extends AST {
3737
value:AST;
3838
constructor(value:AST) {
39+
super();
3940
this.value = value;
4041
}
4142

@@ -64,6 +65,7 @@ export class ImplicitReceiver extends AST {
6465
export class Chain extends AST {
6566
expressions:List;
6667
constructor(expressions:List) {
68+
super();
6769
this.expressions = expressions;
6870
}
6971

@@ -86,6 +88,7 @@ export class Conditional extends AST {
8688
trueExp:AST;
8789
falseExp:AST;
8890
constructor(condition:AST, trueExp:AST, falseExp:AST){
91+
super();
8992
this.condition = condition;
9093
this.trueExp = trueExp;
9194
this.falseExp = falseExp;
@@ -110,6 +113,7 @@ export class AccessMember extends AST {
110113
getter:Function;
111114
setter:Function;
112115
constructor(receiver:AST, name:string, getter:Function, setter:Function) {
116+
super();
113117
this.receiver = receiver;
114118
this.name = name;
115119
this.getter = getter;
@@ -155,6 +159,7 @@ export class KeyedAccess extends AST {
155159
obj:AST;
156160
key:AST;
157161
constructor(obj:AST, key:AST) {
162+
super();
158163
this.obj = obj;
159164
this.key = key;
160165
}
@@ -187,6 +192,7 @@ export class Formatter extends AST {
187192
args:List<AST>;
188193
allArgs:List<AST>;
189194
constructor(exp:AST, name:string, args:List) {
195+
super();
190196
this.exp = exp;
191197
this.name = name;
192198
this.args = args;
@@ -201,6 +207,7 @@ export class Formatter extends AST {
201207
export class LiteralPrimitive extends AST {
202208
value;
203209
constructor(value) {
210+
super();
204211
this.value = value;
205212
}
206213

@@ -216,6 +223,7 @@ export class LiteralPrimitive extends AST {
216223
export class LiteralArray extends AST {
217224
expressions:List;
218225
constructor(expressions:List) {
226+
super();
219227
this.expressions = expressions;
220228
}
221229

@@ -232,6 +240,7 @@ export class LiteralMap extends AST {
232240
keys:List;
233241
values:List;
234242
constructor(keys:List, values:List) {
243+
super();
235244
this.keys = keys;
236245
this.values = values;
237246
}
@@ -253,6 +262,7 @@ export class Interpolation extends AST {
253262
strings:List;
254263
expressions:List;
255264
constructor(strings:List, expressions:List) {
265+
super();
256266
this.strings = strings;
257267
this.expressions = expressions;
258268
}
@@ -271,6 +281,7 @@ export class Binary extends AST {
271281
left:AST;
272282
right:AST;
273283
constructor(operation:string, left:AST, right:AST) {
284+
super();
274285
this.operation = operation;
275286
this.left = left;
276287
this.right = right;
@@ -310,6 +321,7 @@ export class Binary extends AST {
310321
export class PrefixNot extends AST {
311322
expression:AST;
312323
constructor(expression:AST) {
324+
super();
313325
this.expression = expression;
314326
}
315327

@@ -326,6 +338,7 @@ export class Assignment extends AST {
326338
target:AST;
327339
value:AST;
328340
constructor(target:AST, value:AST) {
341+
super();
329342
this.target = target;
330343
this.value = value;
331344
}
@@ -345,6 +358,7 @@ export class MethodCall extends AST {
345358
args:List;
346359
name:string;
347360
constructor(receiver:AST, name:string, fn:Function, args:List) {
361+
super();
348362
this.receiver = receiver;
349363
this.fn = fn;
350364
this.args = args;
@@ -375,6 +389,7 @@ export class FunctionCall extends AST {
375389
target:AST;
376390
args:List;
377391
constructor(target:AST, args:List) {
392+
super();
378393
this.target = target;
379394
this.args = args;
380395
}
@@ -397,6 +412,7 @@ export class ASTWithSource extends AST {
397412
source:string;
398413
location:string;
399414
constructor(ast:AST, source:string, location:string) {
415+
super();
400416
this.source = source;
401417
this.location = location;
402418
this.ast = ast;
@@ -429,6 +445,7 @@ export class TemplateBinding {
429445
name:string;
430446
expression:ASTWithSource;
431447
constructor(key:string, keyIsVar:boolean, name:string, expression:ASTWithSource) {
448+
super();
432449
this.key = key;
433450
this.keyIsVar = keyIsVar;
434451
// only either name or expression will be filled.

modules/angular2/src/change_detection/parser/lexer.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ const $NBSP = 160;
184184
export class ScannerError extends Error {
185185
message:string;
186186
constructor(message) {
187+
super();
187188
this.message = message;
188189
}
189190

modules/angular2/src/change_detection/proto_change_detector.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ export class DynamicProtoChangeDetector extends ProtoChangeDetector {
104104
_recordBuilder:ProtoRecordBuilder;
105105

106106
constructor() {
107+
super();
107108
this._records = null;
108109
this._recordBuilder = new ProtoRecordBuilder();
109110
}
@@ -131,6 +132,7 @@ export class JitProtoChangeDetector extends ProtoChangeDetector {
131132
_recordBuilder:ProtoRecordBuilder;
132133

133134
constructor() {
135+
super();
134136
this._factory = null;
135137
this._recordBuilder = new ProtoRecordBuilder();
136138
}

modules/angular2/src/core/annotations/events.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ export class EventEmitter extends DependencyAnnotation {
99
eventName: string;
1010
@CONST()
1111
constructor(eventName) {
12+
super();
1213
this.eventName = eventName;
1314
}
1415
}

modules/angular2/src/core/annotations/visibility.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {DependencyAnnotation} from 'angular2/di';
88
export class Parent extends DependencyAnnotation {
99
@CONST()
1010
constructor() {
11+
super();
1112
}
1213
}
1314

@@ -18,5 +19,6 @@ export class Parent extends DependencyAnnotation {
1819
export class Ancestor extends DependencyAnnotation {
1920
@CONST()
2021
constructor() {
22+
super();
2123
}
2224
}

modules/angular2/src/core/compiler/compiler.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import {DirectiveMetadata} from './directive_metadata';
1515
import {Component} from '../annotations/annotations';
1616
import {Content} from './shadow_dom_emulation/content_tag';
1717
import {ShadowDomStrategy} from './shadow_dom_strategy';
18+
import {CompileStep} from './pipeline/compile_step';
1819

1920
/**
2021
* Cache that stores the ProtoView of the template of a component.

0 commit comments

Comments
 (0)