| 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 '../common.dart'; | 7 import '../common.dart'; |
| 8 import '../compiler.dart'; | 8 import '../compiler.dart'; |
| 9 import '../constants/expressions.dart'; | 9 import '../constants/expressions.dart'; |
| 10 import '../dart_types.dart'; | 10 import '../dart_types.dart'; |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 KernelAstAdapter astAdapter; | 46 KernelAstAdapter astAdapter; |
| 47 | 47 |
| 48 KernelImpactBuilder(this.function, this.functionElement, this.resolvedAst, | 48 KernelImpactBuilder(this.function, this.functionElement, this.resolvedAst, |
| 49 this.compiler, Kernel kernel) { | 49 this.compiler, Kernel kernel) { |
| 50 this.impactBuilder = new ResolutionWorldImpactBuilder('$functionElement'); | 50 this.impactBuilder = new ResolutionWorldImpactBuilder('$functionElement'); |
| 51 this.astAdapter = new KernelAstAdapter( | 51 this.astAdapter = new KernelAstAdapter( |
| 52 compiler.backend, | 52 compiler.backend, |
| 53 resolvedAst, | 53 resolvedAst, |
| 54 kernel.nodeToAst, | 54 kernel.nodeToAst, |
| 55 kernel.nodeToElement, | 55 kernel.nodeToElement, |
| 56 kernel.fields, |
| 56 kernel.functions, | 57 kernel.functions, |
| 57 kernel.classes, | 58 kernel.classes, |
| 58 kernel.libraries); | 59 kernel.libraries); |
| 59 } | 60 } |
| 60 | 61 |
| 61 ResolutionImpact build() { | 62 ResolutionImpact build() { |
| 62 if (function.kind == ir.ProcedureKind.Method || | 63 if (function.kind == ir.ProcedureKind.Method || |
| 63 function.kind == ir.ProcedureKind.Operator) { | 64 function.kind == ir.ProcedureKind.Operator) { |
| 64 buildMethod(function); | 65 buildMethod(function); |
| 65 } else { | 66 } else { |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 _visitArguments(invocation.arguments); | 193 _visitArguments(invocation.arguments); |
| 193 impactBuilder.registerDynamicUse( | 194 impactBuilder.registerDynamicUse( |
| 194 new DynamicUse(astAdapter.getSelector(invocation), null)); | 195 new DynamicUse(astAdapter.getSelector(invocation), null)); |
| 195 } | 196 } |
| 196 | 197 |
| 197 @override | 198 @override |
| 198 void visitNot(ir.Not not) { | 199 void visitNot(ir.Not not) { |
| 199 not.operand.accept(this); | 200 not.operand.accept(this); |
| 200 } | 201 } |
| 201 } | 202 } |
| OLD | NEW |