| OLD | NEW |
| 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, 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:kernel/ast.dart' as ir; | 5 import 'package:kernel/ast.dart' as ir; |
| 6 | 6 |
| 7 import '../common.dart'; | 7 import '../common.dart'; |
| 8 import '../common/names.dart'; | 8 import '../common/names.dart'; |
| 9 import '../constants/constructors.dart'; | 9 import '../constants/constructors.dart'; |
| 10 import '../constants/expressions.dart'; | 10 import '../constants/expressions.dart'; |
| (...skipping 980 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 991 /// Returns `true` if [mask] is inferred to have a JavaScript `length` | 991 /// Returns `true` if [mask] is inferred to have a JavaScript `length` |
| 992 /// property. | 992 /// property. |
| 993 bool isFixedLength(TypeMask mask, ClosedWorld closedWorld); | 993 bool isFixedLength(TypeMask mask, ClosedWorld closedWorld); |
| 994 | 994 |
| 995 /// Returns the inferred index type of [forInStatement]. | 995 /// Returns the inferred index type of [forInStatement]. |
| 996 TypeMask inferredIndexType(ir.ForInStatement forInStatement); | 996 TypeMask inferredIndexType(ir.ForInStatement forInStatement); |
| 997 | 997 |
| 998 /// Returns the inferred type of [member]. | 998 /// Returns the inferred type of [member]. |
| 999 TypeMask getInferredTypeOf(MemberEntity member); | 999 TypeMask getInferredTypeOf(MemberEntity member); |
| 1000 | 1000 |
| 1001 /// Returns the inferred type of the [parameter]. |
| 1002 TypeMask getInferredTypeOfParameter(Local parameter); |
| 1003 |
| 1001 /// Returns the inferred type of a dynamic [selector] access on a receiver of | 1004 /// Returns the inferred type of a dynamic [selector] access on a receiver of |
| 1002 /// type [mask]. | 1005 /// type [mask]. |
| 1003 TypeMask selectorTypeOf(Selector selector, TypeMask mask); | 1006 TypeMask selectorTypeOf(Selector selector, TypeMask mask); |
| 1004 | 1007 |
| 1005 /// Returns the returned type annotation in the [nativeBehavior]. | 1008 /// Returns the returned type annotation in the [nativeBehavior]. |
| 1006 TypeMask typeFromNativeBehavior( | 1009 TypeMask typeFromNativeBehavior( |
| 1007 native.NativeBehavior nativeBehavior, ClosedWorld closedWorld); | 1010 native.NativeBehavior nativeBehavior, ClosedWorld closedWorld); |
| 1008 } | 1011 } |
| 1009 | 1012 |
| 1010 /// Map from kernel IR nodes to local entities. | 1013 /// Map from kernel IR nodes to local entities. |
| 1011 abstract class KernelToLocalsMap { | 1014 abstract class KernelToLocalsMap { |
| 1012 /// The member currently being built. | 1015 /// The member currently being built. |
| 1013 MemberEntity get currentMember; | 1016 MemberEntity get currentMember; |
| 1014 | 1017 |
| 1015 // TODO(johnniwinther): Make these return the [KernelToLocalsMap] to use from | 1018 // TODO(johnniwinther): Make these return the [KernelToLocalsMap] to use from |
| 1016 // now on. | 1019 // now on. |
| 1017 /// Call to notify that [member] is currently being inlined. | 1020 /// Call to notify that [member] is currently being inlined. |
| 1018 void enterInlinedMember(MemberEntity member); | 1021 void enterInlinedMember(MemberEntity member); |
| 1019 | 1022 |
| 1020 /// Call to notify that [member] is no longer being inlined. | 1023 /// Call to notify that [member] is no longer being inlined. |
| 1021 void leaveInlinedMember(MemberEntity member); | 1024 void leaveInlinedMember(MemberEntity member); |
| 1022 | 1025 |
| 1023 /// Returns the [Local] for [node]. | 1026 /// Returns the [Local] for [node]. |
| 1024 Local getLocal(ir.VariableDeclaration node); | 1027 Local getLocal(ir.VariableDeclaration node); |
| 1025 | 1028 |
| 1026 /// Returns the [JumpTarget] for the branch in [node]. | 1029 /// Returns the [JumpTarget] for the branch in [node]. |
| 1027 // TODO(johnniwinther): Split this by kind of [node]? | 1030 // TODO(johnniwinther): Split this by kind of [node]? |
| 1028 JumpTarget getJumpTarget(ir.TreeNode node, {bool isContinueTarget: false}); | 1031 JumpTarget getJumpTarget(ir.TreeNode node, {bool isContinueTarget: false}); |
| 1029 } | 1032 } |
| OLD | NEW |