| 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 library dart2js.js.enqueue; | 5 library dart2js.js.enqueue; |
| 6 | 6 |
| 7 import 'dart:collection' show Queue; | 7 import 'dart:collection' show Queue; |
| 8 | 8 |
| 9 import '../common/codegen.dart' show CodegenWorkItem; | 9 import '../common/codegen.dart' show CodegenWorkItem; |
| 10 import '../common/tasks.dart' show CompilerTask; | 10 import '../common/tasks.dart' show CompilerTask; |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 } | 156 } |
| 157 | 157 |
| 158 void processStaticUse(StaticUse staticUse) { | 158 void processStaticUse(StaticUse staticUse) { |
| 159 _universe.registerStaticUse(staticUse, _applyMemberUse); | 159 _universe.registerStaticUse(staticUse, _applyMemberUse); |
| 160 switch (staticUse.kind) { | 160 switch (staticUse.kind) { |
| 161 case StaticUseKind.CONSTRUCTOR_INVOKE: | 161 case StaticUseKind.CONSTRUCTOR_INVOKE: |
| 162 case StaticUseKind.CONST_CONSTRUCTOR_INVOKE: | 162 case StaticUseKind.CONST_CONSTRUCTOR_INVOKE: |
| 163 case StaticUseKind.REDIRECTION: | 163 case StaticUseKind.REDIRECTION: |
| 164 processTypeUse(new TypeUse.instantiation(staticUse.type)); | 164 processTypeUse(new TypeUse.instantiation(staticUse.type)); |
| 165 break; | 165 break; |
| 166 case StaticUseKind.INLINING: |
| 167 // TODO(johnniwinther): Should this be tracked with _MemberUsage ? |
| 168 listener.registerUsedElement(staticUse.element); |
| 169 break; |
| 166 default: | 170 default: |
| 167 break; | 171 break; |
| 168 } | 172 } |
| 169 } | 173 } |
| 170 | 174 |
| 171 void processTypeUse(TypeUse typeUse) { | 175 void processTypeUse(TypeUse typeUse) { |
| 172 ResolutionDartType type = typeUse.type; | 176 ResolutionDartType type = typeUse.type; |
| 173 switch (typeUse.kind) { | 177 switch (typeUse.kind) { |
| 174 case TypeUseKind.INSTANTIATION: | 178 case TypeUseKind.INSTANTIATION: |
| 175 _registerInstantiatedType(type); | 179 _registerInstantiatedType(type); |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 267 // code for checked setters. | 271 // code for checked setters. |
| 268 if (element.isField && element.isInstanceMember) { | 272 if (element.isField && element.isInstanceMember) { |
| 269 if (!_options.enableTypeAssertions || | 273 if (!_options.enableTypeAssertions || |
| 270 element.enclosingElement.isClosure) { | 274 element.enclosingElement.isClosure) { |
| 271 return null; | 275 return null; |
| 272 } | 276 } |
| 273 } | 277 } |
| 274 return new CodegenWorkItem(_backend, element); | 278 return new CodegenWorkItem(_backend, element); |
| 275 } | 279 } |
| 276 } | 280 } |
| OLD | NEW |