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 522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
533 if (analyzeAll) libraries.forEach((_, lib) => fullyEnqueueLibrary(lib)); | 533 if (analyzeAll) libraries.forEach((_, lib) => fullyEnqueueLibrary(lib)); |
534 backend.enqueueHelpers(enqueuer.resolution); | 534 backend.enqueueHelpers(enqueuer.resolution); |
535 processQueue(enqueuer.resolution, main); | 535 processQueue(enqueuer.resolution, main); |
536 enqueuer.resolution.logSummary(log); | 536 enqueuer.resolution.logSummary(log); |
537 | 537 |
538 if (compilationFailed) return; | 538 if (compilationFailed) return; |
539 | 539 |
540 log('Inferring types...'); | 540 log('Inferring types...'); |
541 typesTask.onResolutionComplete(main); | 541 typesTask.onResolutionComplete(main); |
542 | 542 |
543 // Initialize runtime type information support. | |
544 enqueuer.codegen.universe.rti = new RuntimeTypeInformation(this); | |
ngeoffray
2012/11/19 16:54:09
Setting this field here seems very arbitrary. The
karlklose
2012/11/20 14:04:38
Done, moved rti to the backend.
| |
545 | |
543 // TODO(ahe): Remove this line. Eventually, enqueuer.resolution | 546 // TODO(ahe): Remove this line. Eventually, enqueuer.resolution |
544 // should know this. | 547 // should know this. |
545 world.populate(); | 548 world.populate(); |
546 | 549 |
547 log('Compiling...'); | 550 log('Compiling...'); |
548 phase = PHASE_COMPILING; | 551 phase = PHASE_COMPILING; |
549 processQueue(enqueuer.codegen, main); | 552 processQueue(enqueuer.codegen, main); |
550 enqueuer.codegen.logSummary(log); | 553 enqueuer.codegen.logSummary(log); |
551 | 554 |
552 if (compilationFailed) return; | 555 if (compilationFailed) return; |
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
940 // TODO(johnniwinther): Use [spannable] and [message] to provide better | 943 // TODO(johnniwinther): Use [spannable] and [message] to provide better |
941 // information on assertion errors. | 944 // information on assertion errors. |
942 if (condition is Function){ | 945 if (condition is Function){ |
943 condition = condition(); | 946 condition = condition(); |
944 } | 947 } |
945 if (spannable == null || !condition) { | 948 if (spannable == null || !condition) { |
946 throw new SpannableAssertionFailure(spannable, message); | 949 throw new SpannableAssertionFailure(spannable, message); |
947 } | 950 } |
948 return true; | 951 return true; |
949 } | 952 } |
OLD | NEW |