| 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 '../compiler.dart'; | 7 import '../compiler.dart'; |
| 8 import '../constants/values.dart'; | 8 import '../constants/values.dart'; |
| 9 import '../diagnostics/invariant.dart'; | 9 import '../diagnostics/invariant.dart'; |
| 10 import '../elements/elements.dart'; | 10 import '../elements/elements.dart'; |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 int argumentCount = invocation.arguments.positional.length + | 93 int argumentCount = invocation.arguments.positional.length + |
| 94 invocation.arguments.named.length; | 94 invocation.arguments.named.length; |
| 95 List<String> namedArguments = | 95 List<String> namedArguments = |
| 96 invocation.arguments.named.map((e) => e.name).toList(); | 96 invocation.arguments.named.map((e) => e.name).toList(); |
| 97 CallStructure callStructure = | 97 CallStructure callStructure = |
| 98 new CallStructure(argumentCount, namedArguments); | 98 new CallStructure(argumentCount, namedArguments); |
| 99 | 99 |
| 100 return new Selector(kind, name, callStructure); | 100 return new Selector(kind, name, callStructure); |
| 101 } | 101 } |
| 102 | 102 |
| 103 TypeMask getTypeMask(ir.MethodInvocation invocation) { | 103 TypeMask typeOfInvocation(ir.MethodInvocation invocation) { |
| 104 return _elements.getTypeMask(getNode(invocation)); | 104 return _compiler.globalInference.results |
| 105 .typeOfSend(getNode(invocation), _elements); |
| 105 } | 106 } |
| 106 | 107 |
| 107 TypeMask selectorTypeOf(ir.MethodInvocation invocation) { | 108 TypeMask selectorTypeOf(ir.MethodInvocation invocation) { |
| 108 return TypeMaskFactory.inferredTypeForSelector( | 109 return TypeMaskFactory.inferredTypeForSelector( |
| 109 getSelector(invocation), getTypeMask(invocation), _compiler); | 110 getSelector(invocation), typeOfInvocation(invocation), _compiler); |
| 110 } | 111 } |
| 111 | 112 |
| 112 bool isIntercepted(ir.MethodInvocation invocation) { | 113 bool isIntercepted(ir.MethodInvocation invocation) { |
| 113 return _backend.isInterceptedSelector(getSelector(invocation)); | 114 return _backend.isInterceptedSelector(getSelector(invocation)); |
| 114 } | 115 } |
| 115 } | 116 } |
| OLD | NEW |