| 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 '../common.dart'; | 8 import '../common.dart'; |
| 9 import '../common/names.dart'; | 9 import '../common/names.dart'; |
| 10 import '../compiler.dart'; | 10 import '../compiler.dart'; |
| (...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 return _resultOf(_target).typeOfSend(getNode(send)); | 261 return _resultOf(_target).typeOfSend(getNode(send)); |
| 262 } | 262 } |
| 263 | 263 |
| 264 TypeMask typeOfListLiteral( | 264 TypeMask typeOfListLiteral( |
| 265 Element owner, ir.ListLiteral listLiteral, ClosedWorld closedWorld) { | 265 Element owner, ir.ListLiteral listLiteral, ClosedWorld closedWorld) { |
| 266 ast.Node node = getNodeOrNull(listLiteral); | 266 ast.Node node = getNodeOrNull(listLiteral); |
| 267 if (node == null) { | 267 if (node == null) { |
| 268 assertNodeIsSynthetic(listLiteral); | 268 assertNodeIsSynthetic(listLiteral); |
| 269 return closedWorld.commonMasks.growableListType; | 269 return closedWorld.commonMasks.growableListType; |
| 270 } | 270 } |
| 271 return _resultOf(owner).typeOfNewList(getNode(listLiteral)) ?? | 271 return _resultOf(owner).typeOfListLiteral(getNode(listLiteral)) ?? |
| 272 closedWorld.commonMasks.dynamicType; | 272 closedWorld.commonMasks.dynamicType; |
| 273 } | 273 } |
| 274 | 274 |
| 275 TypeMask typeOfIterator(ir.ForInStatement forInStatement) { | 275 TypeMask typeOfIterator(ir.ForInStatement forInStatement) { |
| 276 return _resultOf(_target).typeOfIterator(getNode(forInStatement)); | 276 return _resultOf(_target).typeOfIterator(getNode(forInStatement)); |
| 277 } | 277 } |
| 278 | 278 |
| 279 TypeMask typeOfIteratorCurrent(ir.ForInStatement forInStatement) { | 279 TypeMask typeOfIteratorCurrent(ir.ForInStatement forInStatement) { |
| 280 return _resultOf(_target).typeOfIteratorCurrent(getNode(forInStatement)); | 280 return _resultOf(_target).typeOfIteratorCurrent(getNode(forInStatement)); |
| 281 } | 281 } |
| (...skipping 816 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1098 JumpTarget continueTarget = | 1098 JumpTarget continueTarget = |
| 1099 astAdapter.getJumpTarget(switchCase, isContinueTarget: true); | 1099 astAdapter.getJumpTarget(switchCase, isContinueTarget: true); |
| 1100 assert(continueTarget is KernelJumpTarget); | 1100 assert(continueTarget is KernelJumpTarget); |
| 1101 targetIndexMap[continueTarget] = switchIndex; | 1101 targetIndexMap[continueTarget] = switchIndex; |
| 1102 assert(builder.jumpTargets[continueTarget] == null); | 1102 assert(builder.jumpTargets[continueTarget] == null); |
| 1103 builder.jumpTargets[continueTarget] = this; | 1103 builder.jumpTargets[continueTarget] = this; |
| 1104 switchIndex++; | 1104 switchIndex++; |
| 1105 } | 1105 } |
| 1106 } | 1106 } |
| 1107 } | 1107 } |
| OLD | NEW |