| 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 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 446 static const int PHASE_SCANNING = 0; | 446 static const int PHASE_SCANNING = 0; |
| 447 static const int PHASE_RESOLVING = 1; | 447 static const int PHASE_RESOLVING = 1; |
| 448 static const int PHASE_DONE_RESOLVING = 2; | 448 static const int PHASE_DONE_RESOLVING = 2; |
| 449 static const int PHASE_COMPILING = 3; | 449 static const int PHASE_COMPILING = 3; |
| 450 int phase; | 450 int phase; |
| 451 | 451 |
| 452 bool compilationFailed = false; | 452 bool compilationFailed = false; |
| 453 | 453 |
| 454 bool hasCrashed = false; | 454 bool hasCrashed = false; |
| 455 | 455 |
| 456 /// Set by the backend if real reflection is detected in use of dart:mirrors. |
| 457 bool disableTypeInferenceForMirrors = false; |
| 458 |
| 456 Compiler({this.tracer: const Tracer(), | 459 Compiler({this.tracer: const Tracer(), |
| 457 this.enableTypeAssertions: false, | 460 this.enableTypeAssertions: false, |
| 458 this.enableUserAssertions: false, | 461 this.enableUserAssertions: false, |
| 459 this.trustTypeAnnotations: false, | 462 this.trustTypeAnnotations: false, |
| 460 this.enableConcreteTypeInference: false, | 463 this.enableConcreteTypeInference: false, |
| 461 this.disableTypeInferenceFlag: false, | 464 this.disableTypeInferenceFlag: false, |
| 462 this.maxConcreteTypeSize: 5, | 465 this.maxConcreteTypeSize: 5, |
| 463 this.enableMinification: false, | 466 this.enableMinification: false, |
| 464 this.enableNativeLiveTypeAnalysis: false, | 467 this.enableNativeLiveTypeAnalysis: false, |
| 465 bool emitJavaScript: true, | 468 bool emitJavaScript: true, |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 523 Universe get codegenWorld => enqueuer.codegen.universe; | 526 Universe get codegenWorld => enqueuer.codegen.universe; |
| 524 | 527 |
| 525 bool get hasBuildId => buildId != UNDETERMINED_BUILD_ID; | 528 bool get hasBuildId => buildId != UNDETERMINED_BUILD_ID; |
| 526 | 529 |
| 527 bool get mirrorsEnabled => mirrorSystemClass != null; | 530 bool get mirrorsEnabled => mirrorSystemClass != null; |
| 528 | 531 |
| 529 bool get analyzeAll => analyzeAllFlag || compileAll; | 532 bool get analyzeAll => analyzeAllFlag || compileAll; |
| 530 | 533 |
| 531 bool get compileAll => false; | 534 bool get compileAll => false; |
| 532 | 535 |
| 533 bool get disableTypeInference => disableTypeInferenceFlag || mirrorsEnabled; | 536 bool get disableTypeInference { |
| 537 return disableTypeInferenceFlag || disableTypeInferenceForMirrors; |
| 538 } |
| 534 | 539 |
| 535 int getNextFreeClassId() => nextFreeClassId++; | 540 int getNextFreeClassId() => nextFreeClassId++; |
| 536 | 541 |
| 537 void ensure(bool condition) { | 542 void ensure(bool condition) { |
| 538 if (!condition) cancel('failed assertion in leg'); | 543 if (!condition) cancel('failed assertion in leg'); |
| 539 } | 544 } |
| 540 | 545 |
| 541 void unimplemented(String methodName, | 546 void unimplemented(String methodName, |
| 542 {Node node, Token token, HInstruction instruction, | 547 {Node node, Token token, HInstruction instruction, |
| 543 Element element}) { | 548 Element element}) { |
| (...skipping 848 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1392 | 1397 |
| 1393 void close() {} | 1398 void close() {} |
| 1394 | 1399 |
| 1395 toString() => name; | 1400 toString() => name; |
| 1396 | 1401 |
| 1397 /// Convenience method for getting an [api.CompilerOutputProvider]. | 1402 /// Convenience method for getting an [api.CompilerOutputProvider]. |
| 1398 static NullSink outputProvider(String name, String extension) { | 1403 static NullSink outputProvider(String name, String extension) { |
| 1399 return new NullSink('$name.$extension'); | 1404 return new NullSink('$name.$extension'); |
| 1400 } | 1405 } |
| 1401 } | 1406 } |
| OLD | NEW |