| 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 2105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2116 | 2116 |
| 2117 class CompilerTask { | 2117 class CompilerTask { |
| 2118 final Compiler compiler; | 2118 final Compiler compiler; |
| 2119 final Stopwatch watch; | 2119 final Stopwatch watch; |
| 2120 UserTag profilerTag; | 2120 UserTag profilerTag; |
| 2121 | 2121 |
| 2122 CompilerTask(Compiler compiler) | 2122 CompilerTask(Compiler compiler) |
| 2123 : this.compiler = compiler, | 2123 : this.compiler = compiler, |
| 2124 watch = (compiler.verbose) ? new Stopwatch() : null; | 2124 watch = (compiler.verbose) ? new Stopwatch() : null; |
| 2125 | 2125 |
| 2126 String get name => 'Unknown task'; | 2126 String get name => "Unknown task '${this.runtimeType}'"; |
| 2127 int get timing => (watch != null) ? watch.elapsedMilliseconds : 0; | 2127 int get timing => (watch != null) ? watch.elapsedMilliseconds : 0; |
| 2128 | 2128 |
| 2129 int get timingMicroseconds => (watch != null) ? watch.elapsedMicroseconds : 0; | 2129 int get timingMicroseconds => (watch != null) ? watch.elapsedMicroseconds : 0; |
| 2130 | 2130 |
| 2131 UserTag getProfilerTag() { | 2131 UserTag getProfilerTag() { |
| 2132 if (profilerTag == null) profilerTag = new UserTag(name); | 2132 if (profilerTag == null) profilerTag = new UserTag(name); |
| 2133 return profilerTag; | 2133 return profilerTag; |
| 2134 } | 2134 } |
| 2135 | 2135 |
| 2136 measure(action()) { | 2136 measure(action()) { |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2396 InterfaceType get nullType => nullClass.computeType(compiler); | 2396 InterfaceType get nullType => nullClass.computeType(compiler); |
| 2397 | 2397 |
| 2398 @override | 2398 @override |
| 2399 InterfaceType get numType => numClass.computeType(compiler); | 2399 InterfaceType get numType => numClass.computeType(compiler); |
| 2400 | 2400 |
| 2401 @override | 2401 @override |
| 2402 InterfaceType get stringType => stringClass.computeType(compiler); | 2402 InterfaceType get stringType => stringClass.computeType(compiler); |
| 2403 } | 2403 } |
| 2404 | 2404 |
| 2405 typedef void InternalErrorFunction(Spannable location, String message); | 2405 typedef void InternalErrorFunction(Spannable location, String message); |
| OLD | NEW |