| 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 class EnqueueTask extends CompilerTask { | 5 class EnqueueTask extends CompilerTask { |
| 6 final Enqueuer codegen; | 6 final Enqueuer codegen; |
| 7 final Enqueuer resolution; | 7 final Enqueuer resolution; |
| 8 | 8 |
| 9 String get name => 'Enqueue'; | 9 String get name => 'Enqueue'; |
| 10 | 10 |
| (...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 } | 257 } |
| 258 if (isResolutionQueue) { | 258 if (isResolutionQueue) { |
| 259 compiler.resolver.checkMembers(cls); | 259 compiler.resolver.checkMembers(cls); |
| 260 } | 260 } |
| 261 | 261 |
| 262 if (compiler.enableTypeAssertions) { | 262 if (compiler.enableTypeAssertions) { |
| 263 // We need to register is checks and helpers for checking | 263 // We need to register is checks and helpers for checking |
| 264 // assignments to fields. | 264 // assignments to fields. |
| 265 // TODO(ngeoffray): This should really move to the backend. | 265 // TODO(ngeoffray): This should really move to the backend. |
| 266 cls.localMembers.forEach((Element member) { | 266 cls.localMembers.forEach((Element member) { |
| 267 if (!member.isInstanceMember() && !member.isField()) return; | 267 if (!member.isInstanceMember() || !member.isField()) return; |
| 268 DartType type = member.computeType(compiler); | 268 DartType type = member.computeType(compiler); |
| 269 registerIsCheck(type); | 269 registerIsCheck(type); |
| 270 SourceString helper = compiler.backend.getCheckedModeHelper(type); | 270 SourceString helper = compiler.backend.getCheckedModeHelper(type); |
| 271 if (helper != null) { | 271 if (helper != null) { |
| 272 Element helperElement = compiler.findHelper(helper); | 272 Element helperElement = compiler.findHelper(helper); |
| 273 registerStaticUse(helperElement); | 273 registerStaticUse(helperElement); |
| 274 } | 274 } |
| 275 }); | 275 }); |
| 276 } | 276 } |
| 277 } | 277 } |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 393 } | 393 } |
| 394 | 394 |
| 395 void forEach(f(WorkItem work)) { | 395 void forEach(f(WorkItem work)) { |
| 396 while (!queue.isEmpty()) { | 396 while (!queue.isEmpty()) { |
| 397 f(queue.removeLast()); // TODO(kasperl): Why isn't this removeFirst? | 397 f(queue.removeLast()); // TODO(kasperl): Why isn't this removeFirst? |
| 398 } | 398 } |
| 399 } | 399 } |
| 400 | 400 |
| 401 String toString() => 'Enqueuer($name)'; | 401 String toString() => 'Enqueuer($name)'; |
| 402 } | 402 } |
| OLD | NEW |