| 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 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 516 tasks.addAll(backend.tasks); | 516 tasks.addAll(backend.tasks); |
| 517 metadataHandler = new ConstantHandler( | 517 metadataHandler = new ConstantHandler( |
| 518 this, backend.constantSystem, isMetadata: true); | 518 this, backend.constantSystem, isMetadata: true); |
| 519 } | 519 } |
| 520 | 520 |
| 521 Universe get resolverWorld => enqueuer.resolution.universe; | 521 Universe get resolverWorld => enqueuer.resolution.universe; |
| 522 Universe get codegenWorld => enqueuer.codegen.universe; | 522 Universe get codegenWorld => enqueuer.codegen.universe; |
| 523 | 523 |
| 524 bool get hasBuildId => buildId != UNDETERMINED_BUILD_ID; | 524 bool get hasBuildId => buildId != UNDETERMINED_BUILD_ID; |
| 525 | 525 |
| 526 bool get mirrorsEnabled => mirrorSystemClass != null; |
| 527 |
| 526 int getNextFreeClassId() => nextFreeClassId++; | 528 int getNextFreeClassId() => nextFreeClassId++; |
| 527 | 529 |
| 528 void ensure(bool condition) { | 530 void ensure(bool condition) { |
| 529 if (!condition) cancel('failed assertion in leg'); | 531 if (!condition) cancel('failed assertion in leg'); |
| 530 } | 532 } |
| 531 | 533 |
| 532 void unimplemented(String methodName, | 534 void unimplemented(String methodName, |
| 533 {Node node, Token token, HInstruction instruction, | 535 {Node node, Token token, HInstruction instruction, |
| 534 Element element}) { | 536 Element element}) { |
| 535 internalError("$methodName not implemented", | 537 internalError("$methodName not implemented", |
| (...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 877 | 879 |
| 878 if (compilationFailed) return; | 880 if (compilationFailed) return; |
| 879 | 881 |
| 880 backend.assembleProgram(); | 882 backend.assembleProgram(); |
| 881 | 883 |
| 882 checkQueues(); | 884 checkQueues(); |
| 883 } | 885 } |
| 884 | 886 |
| 885 void resolveReflectiveDataIfNeeded() { | 887 void resolveReflectiveDataIfNeeded() { |
| 886 // Only need reflective data when dart:mirrors is loaded. | 888 // Only need reflective data when dart:mirrors is loaded. |
| 887 if (mirrorSystemClass == null) return; | 889 if (!mirrorsEnabled) return; |
| 888 | 890 |
| 889 for (LibraryElement library in libraries.values) { | 891 for (LibraryElement library in libraries.values) { |
| 890 for (Link link = library.metadata; !link.isEmpty; link = link.tail) { | 892 for (Link link = library.metadata; !link.isEmpty; link = link.tail) { |
| 891 link.head.ensureResolved(this); | 893 link.head.ensureResolved(this); |
| 892 } | 894 } |
| 893 } | 895 } |
| 894 } | 896 } |
| 895 | 897 |
| 896 void fullyEnqueueLibrary(LibraryElement library) { | 898 void fullyEnqueueLibrary(LibraryElement library) { |
| 897 library.implementation.forEachLocalMember(fullyEnqueueTopLevelElement); | 899 library.implementation.forEachLocalMember(fullyEnqueueTopLevelElement); |
| (...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1361 | 1363 |
| 1362 void close() {} | 1364 void close() {} |
| 1363 | 1365 |
| 1364 toString() => name; | 1366 toString() => name; |
| 1365 | 1367 |
| 1366 /// Convenience method for getting an [api.CompilerOutputProvider]. | 1368 /// Convenience method for getting an [api.CompilerOutputProvider]. |
| 1367 static NullSink outputProvider(String name, String extension) { | 1369 static NullSink outputProvider(String name, String extension) { |
| 1368 return new NullSink('$name.$extension'); | 1370 return new NullSink('$name.$extension'); |
| 1369 } | 1371 } |
| 1370 } | 1372 } |
| OLD | NEW |