Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(358)

Side by Side Diff: pkg/compiler/lib/src/ssa/builder.dart

Issue 2829373002: dart2js: use ResolutionInterfaceType in SSA builders (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | pkg/compiler/lib/src/ssa/builder_kernel.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 = new List<DartType>.from(currentInlinedInstantiations); 1234 instantiatedTypes =
1235 new List<ResolutionInterfaceType>.from(currentInlinedInstantiations);
1235 } 1236 }
1236 1237
1237 HInstruction newObject; 1238 HInstruction newObject;
1238 if (!isNativeUpgradeFactory) { 1239 if (!isNativeUpgradeFactory) {
1239 // Create the runtime type information, if needed. 1240 // Create the runtime type information, if needed.
1240 bool hasRtiInput = false; 1241 bool hasRtiInput = false;
1241 if (rtiNeed.classNeedsRtiField(classElement)) { 1242 if (rtiNeed.classNeedsRtiField(classElement)) {
1242 // Read the values of the type arguments and create a 1243 // Read the values of the type arguments and create a
1243 // HTypeInfoExpression to set on the newly create object. 1244 // HTypeInfoExpression to set on the newly create object.
1244 hasRtiInput = true; 1245 hasRtiInput = true;
(...skipping 2858 matching lines...) Expand 10 before | Expand all | Expand 10 after
4103 var instruction; 4104 var instruction;
4104 if (nativeData.isJsInteropMember(element)) { 4105 if (nativeData.isJsInteropMember(element)) {
4105 instruction = 4106 instruction =
4106 invokeJsInteropFunction(element, arguments, sourceInformation); 4107 invokeJsInteropFunction(element, arguments, sourceInformation);
4107 } else { 4108 } else {
4108 // creating an [HInvokeStatic]. 4109 // creating an [HInvokeStatic].
4109 instruction = new HInvokeStatic(element, arguments, typeMask, 4110 instruction = new HInvokeStatic(element, arguments, typeMask,
4110 targetCanThrow: targetCanThrow) 4111 targetCanThrow: targetCanThrow)
4111 ..sourceInformation = sourceInformation; 4112 ..sourceInformation = sourceInformation;
4112 if (currentInlinedInstantiations.isNotEmpty) { 4113 if (currentInlinedInstantiations.isNotEmpty) {
4113 instruction.instantiatedTypes = 4114 instruction.instantiatedTypes = new List<ResolutionInterfaceType>.from(
4114 new List<ResolutionDartType>.from(currentInlinedInstantiations); 4115 currentInlinedInstantiations);
4115 } 4116 }
4116 instruction.sideEffects = closedWorld.getSideEffectsOfElement(element); 4117 instruction.sideEffects = closedWorld.getSideEffectsOfElement(element);
4117 } 4118 }
4118 if (location == null) { 4119 if (location == null) {
4119 push(instruction); 4120 push(instruction);
4120 } else { 4121 } else {
4121 pushWithPosition(instruction, location); 4122 pushWithPosition(instruction, location);
4122 } 4123 }
4123 } 4124 }
4124 4125
(...skipping 2613 matching lines...) Expand 10 before | Expand all | Expand 10 after
6738 this.oldReturnLocal, 6739 this.oldReturnLocal,
6739 this.oldReturnType, 6740 this.oldReturnType,
6740 this.oldResolvedAst, 6741 this.oldResolvedAst,
6741 this.oldStack, 6742 this.oldStack,
6742 this.oldLocalsHandler, 6743 this.oldLocalsHandler,
6743 this.inTryStatement, 6744 this.inTryStatement,
6744 this.allFunctionsCalledOnce, 6745 this.allFunctionsCalledOnce,
6745 this.oldElementInferenceResults) 6746 this.oldElementInferenceResults)
6746 : super(function); 6747 : super(function);
6747 } 6748 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/ssa/builder_kernel.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698