| 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:kernel/ast.dart' as ir; | 5 import 'package:kernel/ast.dart' as ir; |
| 6 | 6 |
| 7 import '../constants/expressions.dart'; | 7 import '../constants/expressions.dart'; |
| 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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 return _inferenceResults.typeOfSend(getNode(getter), elements); | 170 return _inferenceResults.typeOfSend(getNode(getter), elements); |
| 171 } | 171 } |
| 172 | 172 |
| 173 TypeMask typeOfSend(ir.Expression send) { | 173 TypeMask typeOfSend(ir.Expression send) { |
| 174 assert(send is ir.InvocationExpression || send is ir.PropertyGet); | 174 assert(send is ir.InvocationExpression || send is ir.PropertyGet); |
| 175 return _inferenceResults.typeOfSend(getNode(send), elements); | 175 return _inferenceResults.typeOfSend(getNode(send), elements); |
| 176 } | 176 } |
| 177 | 177 |
| 178 TypeMask typeOfNewList(Element owner, ir.ListLiteral listLiteral) { | 178 TypeMask typeOfNewList(Element owner, ir.ListLiteral listLiteral) { |
| 179 return _inferenceResults.typeOfNewList(owner, getNode(listLiteral)) ?? | 179 return _inferenceResults.typeOfNewList(owner, getNode(listLiteral)) ?? |
| 180 _compiler.commonMasks.dynamicType; | 180 _compiler.closedWorld.commonMasks.dynamicType; |
| 181 } | 181 } |
| 182 | 182 |
| 183 TypeMask typeOfIterator(ir.ForInStatement forInStatement) { | 183 TypeMask typeOfIterator(ir.ForInStatement forInStatement) { |
| 184 return _inferenceResults.typeOfIterator(getNode(forInStatement), elements); | 184 return _inferenceResults.typeOfIterator(getNode(forInStatement), elements); |
| 185 } | 185 } |
| 186 | 186 |
| 187 TypeMask typeOfIteratorCurrent(ir.ForInStatement forInStatement) { | 187 TypeMask typeOfIteratorCurrent(ir.ForInStatement forInStatement) { |
| 188 return _inferenceResults.typeOfIteratorCurrent( | 188 return _inferenceResults.typeOfIteratorCurrent( |
| 189 getNode(forInStatement), elements); | 189 getNode(forInStatement), elements); |
| 190 } | 190 } |
| (...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 666 astAdapter.reporter.internalError( | 666 astAdapter.reporter.internalError( |
| 667 CURRENT_ELEMENT_SPANNABLE, "Unexpected constant target: $element."); | 667 CURRENT_ELEMENT_SPANNABLE, "Unexpected constant target: $element."); |
| 668 return null; | 668 return null; |
| 669 } | 669 } |
| 670 | 670 |
| 671 @override | 671 @override |
| 672 ConstantExpression visitStringLiteral(ir.StringLiteral node) { | 672 ConstantExpression visitStringLiteral(ir.StringLiteral node) { |
| 673 return new StringConstantExpression(node.value); | 673 return new StringConstantExpression(node.value); |
| 674 } | 674 } |
| 675 } | 675 } |
| OLD | NEW |