OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 part of dart2js; | 5 part of dart2js; |
6 | 6 |
7 /** | 7 /** |
8 * If true, print a warning for each method that was resolved, but not | 8 * If true, print a warning for each method that was resolved, but not |
9 * compiled. | 9 * compiled. |
10 */ | 10 */ |
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 * correspond to a particular element. | 244 * correspond to a particular element. |
245 * | 245 * |
246 * We should get rid of this and ensure that all dependencies are | 246 * We should get rid of this and ensure that all dependencies are |
247 * associated with a particular element. | 247 * associated with a particular element. |
248 */ | 248 */ |
249 final TreeElements globalDependencies = new TreeElementMapping(null); | 249 final TreeElements globalDependencies = new TreeElementMapping(null); |
250 | 250 |
251 final bool enableMinification; | 251 final bool enableMinification; |
252 final bool enableTypeAssertions; | 252 final bool enableTypeAssertions; |
253 final bool enableUserAssertions; | 253 final bool enableUserAssertions; |
| 254 final bool trustTypeAnnotations; |
254 final bool enableConcreteTypeInference; | 255 final bool enableConcreteTypeInference; |
255 /** | 256 /** |
256 * The maximum size of a concrete type before it widens to dynamic during | 257 * The maximum size of a concrete type before it widens to dynamic during |
257 * concrete type inference. | 258 * concrete type inference. |
258 */ | 259 */ |
259 final int maxConcreteTypeSize; | 260 final int maxConcreteTypeSize; |
260 final bool analyzeAll; | 261 final bool analyzeAll; |
261 final bool analyzeOnly; | 262 final bool analyzeOnly; |
262 /** | 263 /** |
263 * If true, skip analysis of method bodies and field initializers. Implies | 264 * If true, skip analysis of method bodies and field initializers. Implies |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
433 static const int PHASE_COMPILING = 3; | 434 static const int PHASE_COMPILING = 3; |
434 int phase; | 435 int phase; |
435 | 436 |
436 bool compilationFailed = false; | 437 bool compilationFailed = false; |
437 | 438 |
438 bool hasCrashed = false; | 439 bool hasCrashed = false; |
439 | 440 |
440 Compiler({this.tracer: const Tracer(), | 441 Compiler({this.tracer: const Tracer(), |
441 this.enableTypeAssertions: false, | 442 this.enableTypeAssertions: false, |
442 this.enableUserAssertions: false, | 443 this.enableUserAssertions: false, |
| 444 this.trustTypeAnnotations: false, |
443 this.enableConcreteTypeInference: false, | 445 this.enableConcreteTypeInference: false, |
444 this.maxConcreteTypeSize: 5, | 446 this.maxConcreteTypeSize: 5, |
445 this.enableMinification: false, | 447 this.enableMinification: false, |
446 this.enableNativeLiveTypeAnalysis: false, | 448 this.enableNativeLiveTypeAnalysis: false, |
447 bool emitJavaScript: true, | 449 bool emitJavaScript: true, |
448 bool generateSourceMap: true, | 450 bool generateSourceMap: true, |
449 bool disallowUnsafeEval: false, | 451 bool disallowUnsafeEval: false, |
450 this.analyzeAll: false, | 452 this.analyzeAll: false, |
451 bool analyzeOnly: false, | 453 bool analyzeOnly: false, |
452 bool analyzeSignaturesOnly: false, | 454 bool analyzeSignaturesOnly: false, |
(...skipping 872 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1325 | 1327 |
1326 void close() {} | 1328 void close() {} |
1327 | 1329 |
1328 toString() => name; | 1330 toString() => name; |
1329 | 1331 |
1330 /// Convenience method for getting an [api.CompilerOutputProvider]. | 1332 /// Convenience method for getting an [api.CompilerOutputProvider]. |
1331 static NullSink outputProvider(String name, String extension) { | 1333 static NullSink outputProvider(String name, String extension) { |
1332 return new NullSink('$name.$extension'); | 1334 return new NullSink('$name.$extension'); |
1333 } | 1335 } |
1334 } | 1336 } |
OLD | NEW |