| 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, CodegenWorkItem; | 9 import '../common/codegen.dart' show CodegenRegistry, CodegenWorkItem; |
| 10 import '../common/names.dart'; | 10 import '../common/names.dart'; |
| (...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 void _addClassTypeVariablesIfNeeded(ir.Member constructor) { | 240 void _addClassTypeVariablesIfNeeded(ir.Member constructor) { |
| 241 var enclosing = constructor.enclosingClass; | 241 var enclosing = constructor.enclosingClass; |
| 242 if (backend.rtiNeed.classNeedsRti(astAdapter.getElement(enclosing))) { | 242 if (backend.rtiNeed.classNeedsRti(astAdapter.getElement(enclosing))) { |
| 243 enclosing.typeParameters.forEach((ir.TypeParameter typeParameter) { | 243 enclosing.typeParameters.forEach((ir.TypeParameter typeParameter) { |
| 244 var typeParamElement = astAdapter.getElement(typeParameter); | 244 var typeParamElement = astAdapter.getElement(typeParameter); |
| 245 HParameterValue param = | 245 HParameterValue param = |
| 246 addParameter(typeParamElement, commonMasks.nonNullType); | 246 addParameter(typeParamElement, commonMasks.nonNullType); |
| 247 // This is a little bit wacky (and n^2) until we make the localsHandler | 247 // This is a little bit wacky (and n^2) until we make the localsHandler |
| 248 // take Kernel DartTypes instead of just the AST DartTypes. | 248 // take Kernel DartTypes instead of just the AST DartTypes. |
| 249 var typeVariableType = astAdapter | 249 var typeVariableType = astAdapter |
| 250 .getElement(enclosing) | 250 .getClass(enclosing) |
| 251 .typeVariables | 251 .typeVariables |
| 252 .firstWhere( | 252 .firstWhere( |
| 253 (ResolutionTypeVariableType i) => i.name == typeParameter.name); | 253 (ResolutionTypeVariableType i) => i.name == typeParameter.name); |
| 254 localsHandler.directLocals[ | 254 localsHandler.directLocals[ |
| 255 localsHandler.getTypeVariableAsLocal(typeVariableType)] = param; | 255 localsHandler.getTypeVariableAsLocal(typeVariableType)] = param; |
| 256 }); | 256 }); |
| 257 } | 257 } |
| 258 } | 258 } |
| 259 | 259 |
| 260 /// Builds generative constructors. | 260 /// Builds generative constructors. |
| (...skipping 2992 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3253 enterBlock.setBlockFlow( | 3253 enterBlock.setBlockFlow( |
| 3254 new HTryBlockInformation( | 3254 new HTryBlockInformation( |
| 3255 kernelBuilder.wrapStatementGraph(bodyGraph), | 3255 kernelBuilder.wrapStatementGraph(bodyGraph), |
| 3256 exception, | 3256 exception, |
| 3257 kernelBuilder.wrapStatementGraph(catchGraph), | 3257 kernelBuilder.wrapStatementGraph(catchGraph), |
| 3258 kernelBuilder.wrapStatementGraph(finallyGraph)), | 3258 kernelBuilder.wrapStatementGraph(finallyGraph)), |
| 3259 exitBlock); | 3259 exitBlock); |
| 3260 kernelBuilder.inTryStatement = previouslyInTryStatement; | 3260 kernelBuilder.inTryStatement = previouslyInTryStatement; |
| 3261 } | 3261 } |
| 3262 } | 3262 } |
| OLD | NEW |