OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 import 'package:js_runtime/shared/embedded_names.dart'; | 5 import 'package:js_runtime/shared/embedded_names.dart'; |
6 import 'package:kernel/ast.dart' as ir; | 6 import 'package:kernel/ast.dart' as ir; |
7 | 7 |
8 import '../closure.dart'; | 8 import '../closure.dart'; |
9 import '../common.dart'; | 9 import '../common.dart'; |
10 import '../compiler.dart'; | 10 import '../compiler.dart'; |
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
315 MemberEntity constructorBody = | 315 MemberEntity constructorBody = |
316 ConstructorBodyElementX.createFromResolvedAst(element.resolvedAst); | 316 ConstructorBodyElementX.createFromResolvedAst(element.resolvedAst); |
317 assert(constructorBody != null); | 317 assert(constructorBody != null); |
318 return constructorBody; | 318 return constructorBody; |
319 } | 319 } |
320 | 320 |
321 @override | 321 @override |
322 Spannable getSpannable(MemberEntity member, ir.Node node) { | 322 Spannable getSpannable(MemberEntity member, ir.Node node) { |
323 return getNode(node); | 323 return getNode(node); |
324 } | 324 } |
| 325 |
| 326 @override |
| 327 LoopClosureRepresentationInfo getClosureRepresentationInfoForLoop( |
| 328 ClosureClassMaps closureClassMaps, ir.TreeNode node) { |
| 329 return closureClassMaps.getClosureRepresentationInfoForLoop(getNode(node)); |
| 330 } |
325 } | 331 } |
326 | 332 |
327 /// Visitor that converts kernel dart types into [ResolutionDartType]. | 333 /// Visitor that converts kernel dart types into [ResolutionDartType]. |
328 class DartTypeConverter extends ir.DartTypeVisitor<ResolutionDartType> { | 334 class DartTypeConverter extends ir.DartTypeVisitor<ResolutionDartType> { |
329 final KernelAstAdapter astAdapter; | 335 final KernelAstAdapter astAdapter; |
330 bool topLevel = true; | 336 bool topLevel = true; |
331 | 337 |
332 DartTypeConverter(this.astAdapter); | 338 DartTypeConverter(this.astAdapter); |
333 | 339 |
334 ResolutionDartType convert(ir.DartType type) { | 340 ResolutionDartType convert(ir.DartType type) { |
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
635 TypeMask selectorTypeOf(Selector selector, TypeMask mask) { | 641 TypeMask selectorTypeOf(Selector selector, TypeMask mask) { |
636 return TypeMaskFactory.inferredTypeForSelector( | 642 return TypeMaskFactory.inferredTypeForSelector( |
637 selector, mask, _globalInferenceResults); | 643 selector, mask, _globalInferenceResults); |
638 } | 644 } |
639 | 645 |
640 TypeMask typeFromNativeBehavior( | 646 TypeMask typeFromNativeBehavior( |
641 native.NativeBehavior nativeBehavior, ClosedWorld closedWorld) { | 647 native.NativeBehavior nativeBehavior, ClosedWorld closedWorld) { |
642 return TypeMaskFactory.fromNativeBehavior(nativeBehavior, closedWorld); | 648 return TypeMaskFactory.fromNativeBehavior(nativeBehavior, closedWorld); |
643 } | 649 } |
644 } | 650 } |
OLD | NEW |