| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 'dart:collection'; | 5 import 'dart:collection'; |
| 6 | 6 |
| 7 import 'package:js_runtime/shared/embedded_names.dart'; | 7 import 'package:js_runtime/shared/embedded_names.dart'; |
| 8 | 8 |
| 9 import '../closure.dart'; | 9 import '../closure.dart'; |
| 10 import '../common.dart'; | 10 import '../common.dart'; |
| (...skipping 1213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1224 .add(typeBuilder.potentiallyCheckOrTrustType(value, type)); | 1224 .add(typeBuilder.potentiallyCheckOrTrustType(value, type)); |
| 1225 } | 1225 } |
| 1226 }, includeSuperAndInjectedMembers: true); | 1226 }, includeSuperAndInjectedMembers: true); |
| 1227 | 1227 |
| 1228 ResolutionInterfaceType type = classElement.thisType; | 1228 ResolutionInterfaceType type = classElement.thisType; |
| 1229 TypeMask ssaType = | 1229 TypeMask ssaType = |
| 1230 new TypeMask.nonNullExact(classElement.declaration, closedWorld); | 1230 new TypeMask.nonNullExact(classElement.declaration, closedWorld); |
| 1231 List<DartType> instantiatedTypes; | 1231 List<DartType> instantiatedTypes; |
| 1232 addInlinedInstantiation(type); | 1232 addInlinedInstantiation(type); |
| 1233 if (!currentInlinedInstantiations.isEmpty) { | 1233 if (!currentInlinedInstantiations.isEmpty) { |
| 1234 instantiatedTypes = | 1234 instantiatedTypes = new List<DartType>.from(currentInlinedInstantiations); |
| 1235 new List<ResolutionInterfaceType>.from(currentInlinedInstantiations); | |
| 1236 } | 1235 } |
| 1237 | 1236 |
| 1238 HInstruction newObject; | 1237 HInstruction newObject; |
| 1239 if (!isNativeUpgradeFactory) { | 1238 if (!isNativeUpgradeFactory) { |
| 1240 // Create the runtime type information, if needed. | 1239 // Create the runtime type information, if needed. |
| 1241 bool hasRtiInput = false; | 1240 bool hasRtiInput = false; |
| 1242 if (rtiNeed.classNeedsRtiField(classElement)) { | 1241 if (rtiNeed.classNeedsRtiField(classElement)) { |
| 1243 // Read the values of the type arguments and create a | 1242 // Read the values of the type arguments and create a |
| 1244 // HTypeInfoExpression to set on the newly create object. | 1243 // HTypeInfoExpression to set on the newly create object. |
| 1245 hasRtiInput = true; | 1244 hasRtiInput = true; |
| (...skipping 2858 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4104 var instruction; | 4103 var instruction; |
| 4105 if (nativeData.isJsInteropMember(element)) { | 4104 if (nativeData.isJsInteropMember(element)) { |
| 4106 instruction = | 4105 instruction = |
| 4107 invokeJsInteropFunction(element, arguments, sourceInformation); | 4106 invokeJsInteropFunction(element, arguments, sourceInformation); |
| 4108 } else { | 4107 } else { |
| 4109 // creating an [HInvokeStatic]. | 4108 // creating an [HInvokeStatic]. |
| 4110 instruction = new HInvokeStatic(element, arguments, typeMask, | 4109 instruction = new HInvokeStatic(element, arguments, typeMask, |
| 4111 targetCanThrow: targetCanThrow) | 4110 targetCanThrow: targetCanThrow) |
| 4112 ..sourceInformation = sourceInformation; | 4111 ..sourceInformation = sourceInformation; |
| 4113 if (currentInlinedInstantiations.isNotEmpty) { | 4112 if (currentInlinedInstantiations.isNotEmpty) { |
| 4114 instruction.instantiatedTypes = new List<ResolutionInterfaceType>.from( | 4113 instruction.instantiatedTypes = |
| 4115 currentInlinedInstantiations); | 4114 new List<ResolutionDartType>.from(currentInlinedInstantiations); |
| 4116 } | 4115 } |
| 4117 instruction.sideEffects = closedWorld.getSideEffectsOfElement(element); | 4116 instruction.sideEffects = closedWorld.getSideEffectsOfElement(element); |
| 4118 } | 4117 } |
| 4119 if (location == null) { | 4118 if (location == null) { |
| 4120 push(instruction); | 4119 push(instruction); |
| 4121 } else { | 4120 } else { |
| 4122 pushWithPosition(instruction, location); | 4121 pushWithPosition(instruction, location); |
| 4123 } | 4122 } |
| 4124 } | 4123 } |
| 4125 | 4124 |
| (...skipping 2613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6739 this.oldReturnLocal, | 6738 this.oldReturnLocal, |
| 6740 this.oldReturnType, | 6739 this.oldReturnType, |
| 6741 this.oldResolvedAst, | 6740 this.oldResolvedAst, |
| 6742 this.oldStack, | 6741 this.oldStack, |
| 6743 this.oldLocalsHandler, | 6742 this.oldLocalsHandler, |
| 6744 this.inTryStatement, | 6743 this.inTryStatement, |
| 6745 this.allFunctionsCalledOnce, | 6744 this.allFunctionsCalledOnce, |
| 6746 this.oldElementInferenceResults) | 6745 this.oldElementInferenceResults) |
| 6747 : super(function); | 6746 : super(function); |
| 6748 } | 6747 } |
| OLD | NEW |