| 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:js_runtime/shared/embedded_names.dart'; | 5 import 'package:js_runtime/shared/embedded_names.dart'; |
| 6 import 'package:kernel/ast.dart' as ir; | 6 import 'package:kernel/ast.dart' as ir; |
| 7 | 7 |
| 8 import '../closure.dart'; | 8 import '../closure.dart'; |
| 9 import '../common.dart'; | 9 import '../common.dart'; |
| 10 import '../compiler.dart'; | 10 import '../compiler.dart'; |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 295 for (ir.VariableDeclaration variable in sortedNamedParameters) { | 295 for (ir.VariableDeclaration variable in sortedNamedParameters) { |
| 296 namedParameters.add(variable.name); | 296 namedParameters.add(variable.name); |
| 297 namedParameterTypes.add(getDartType(variable.type)); | 297 namedParameterTypes.add(getDartType(variable.type)); |
| 298 } | 298 } |
| 299 return new ResolutionFunctionType.synthesized(returnType, parameterTypes, | 299 return new ResolutionFunctionType.synthesized(returnType, parameterTypes, |
| 300 optionalParameterTypes, namedParameters, namedParameterTypes); | 300 optionalParameterTypes, namedParameters, namedParameterTypes); |
| 301 } | 301 } |
| 302 | 302 |
| 303 InterfaceType getInterfaceType(ir.InterfaceType type) => getDartType(type); | 303 InterfaceType getInterfaceType(ir.InterfaceType type) => getDartType(type); |
| 304 | 304 |
| 305 InterfaceType getThisType(ClassElement cls) => cls.thisType; |
| 306 |
| 305 InterfaceType createInterfaceType( | 307 InterfaceType createInterfaceType( |
| 306 ir.Class cls, List<ir.DartType> typeArguments) { | 308 ir.Class cls, List<ir.DartType> typeArguments) { |
| 307 return new ResolutionInterfaceType( | 309 return new ResolutionInterfaceType( |
| 308 getClass(cls), getDartTypes(typeArguments)); | 310 getClass(cls), getDartTypes(typeArguments)); |
| 309 } | 311 } |
| 310 | 312 |
| 311 MemberEntity getConstructorBodyEntity(ir.Constructor constructor) { | 313 MemberEntity getConstructorBodyEntity(ir.Constructor constructor) { |
| 312 AstElement element = getElement(constructor); | 314 AstElement element = getElement(constructor); |
| 313 MemberEntity constructorBody = | 315 MemberEntity constructorBody = |
| 314 ConstructorBodyElementX.createFromResolvedAst(element.resolvedAst); | 316 ConstructorBodyElementX.createFromResolvedAst(element.resolvedAst); |
| (...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 633 TypeMask selectorTypeOf(Selector selector, TypeMask mask) { | 635 TypeMask selectorTypeOf(Selector selector, TypeMask mask) { |
| 634 return TypeMaskFactory.inferredTypeForSelector( | 636 return TypeMaskFactory.inferredTypeForSelector( |
| 635 selector, mask, _globalInferenceResults); | 637 selector, mask, _globalInferenceResults); |
| 636 } | 638 } |
| 637 | 639 |
| 638 TypeMask typeFromNativeBehavior( | 640 TypeMask typeFromNativeBehavior( |
| 639 native.NativeBehavior nativeBehavior, ClosedWorld closedWorld) { | 641 native.NativeBehavior nativeBehavior, ClosedWorld closedWorld) { |
| 640 return TypeMaskFactory.fromNativeBehavior(nativeBehavior, closedWorld); | 642 return TypeMaskFactory.fromNativeBehavior(nativeBehavior, closedWorld); |
| 641 } | 643 } |
| 642 } | 644 } |
| OLD | NEW |