| 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 '../closure.dart'; | 7 import '../closure.dart'; |
| 8 import '../common.dart'; | 8 import '../common.dart'; |
| 9 import '../common/codegen.dart' show CodegenRegistry; | 9 import '../common/codegen.dart' show CodegenRegistry; |
| 10 import '../common/names.dart'; | 10 import '../common/names.dart'; |
| (...skipping 2983 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2994 void visitSuperMethodInvocation(ir.SuperMethodInvocation invocation) { | 2994 void visitSuperMethodInvocation(ir.SuperMethodInvocation invocation) { |
| 2995 List<HInstruction> arguments = _visitArgumentsForStaticTarget( | 2995 List<HInstruction> arguments = _visitArgumentsForStaticTarget( |
| 2996 invocation.interfaceTarget.function, invocation.arguments); | 2996 invocation.interfaceTarget.function, invocation.arguments); |
| 2997 _buildInvokeSuper(astAdapter.getSelector(invocation), | 2997 _buildInvokeSuper(astAdapter.getSelector(invocation), |
| 2998 _containingClass(invocation), invocation.interfaceTarget, arguments); | 2998 _containingClass(invocation), invocation.interfaceTarget, arguments); |
| 2999 } | 2999 } |
| 3000 | 3000 |
| 3001 @override | 3001 @override |
| 3002 void visitConstructorInvocation(ir.ConstructorInvocation invocation) { | 3002 void visitConstructorInvocation(ir.ConstructorInvocation invocation) { |
| 3003 ir.Constructor target = invocation.target; | 3003 ir.Constructor target = invocation.target; |
| 3004 if (invocation.isConst) { |
| 3005 ConstantValue constant = astAdapter.getConstantFor(invocation); |
| 3006 stack.add(graph.addConstant(constant, closedWorld)); |
| 3007 return; |
| 3008 } |
| 3009 |
| 3004 // TODO(sra): For JS-interop targets, process arguments differently. | 3010 // TODO(sra): For JS-interop targets, process arguments differently. |
| 3005 List<HInstruction> arguments = | 3011 List<HInstruction> arguments = |
| 3006 _visitArgumentsForStaticTarget(target.function, invocation.arguments); | 3012 _visitArgumentsForStaticTarget(target.function, invocation.arguments); |
| 3007 if (backend.rtiNeed | 3013 if (backend.rtiNeed |
| 3008 .classNeedsRti(astAdapter.getClass(target.enclosingClass))) { | 3014 .classNeedsRti(astAdapter.getClass(target.enclosingClass))) { |
| 3009 _addTypeArguments(arguments, invocation.arguments); | 3015 _addTypeArguments(arguments, invocation.arguments); |
| 3010 } | 3016 } |
| 3011 TypeMask typeMask = new TypeMask.nonNullExact( | 3017 TypeMask typeMask = new TypeMask.nonNullExact( |
| 3012 astAdapter.getClass(target.enclosingClass), closedWorld); | 3018 astAdapter.getClass(target.enclosingClass), closedWorld); |
| 3013 _pushStaticInvocation(target, arguments, typeMask); | 3019 _pushStaticInvocation(target, arguments, typeMask); |
| (...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3440 enterBlock.setBlockFlow( | 3446 enterBlock.setBlockFlow( |
| 3441 new HTryBlockInformation( | 3447 new HTryBlockInformation( |
| 3442 kernelBuilder.wrapStatementGraph(bodyGraph), | 3448 kernelBuilder.wrapStatementGraph(bodyGraph), |
| 3443 exception, | 3449 exception, |
| 3444 kernelBuilder.wrapStatementGraph(catchGraph), | 3450 kernelBuilder.wrapStatementGraph(catchGraph), |
| 3445 kernelBuilder.wrapStatementGraph(finallyGraph)), | 3451 kernelBuilder.wrapStatementGraph(finallyGraph)), |
| 3446 exitBlock); | 3452 exitBlock); |
| 3447 kernelBuilder.inTryStatement = previouslyInTryStatement; | 3453 kernelBuilder.inTryStatement = previouslyInTryStatement; |
| 3448 } | 3454 } |
| 3449 } | 3455 } |
| OLD | NEW |