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

Side by Side Diff: pkg/compiler/lib/src/serialization/system.dart

Issue 2603263002: Prefix resolution_types with Resolution. (Closed)
Patch Set: Rebased Created 3 years, 11 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
OLDNEW
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 library dart2js.serialization_system; 5 library dart2js.serialization_system;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import '../common.dart'; 9 import '../common.dart';
10 import '../common/resolution.dart'; 10 import '../common/resolution.dart';
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 ConstructorElement superclassConstructor = 162 ConstructorElement superclassConstructor =
163 superclass.lookupConstructor(constructor.name); 163 superclass.lookupConstructor(constructor.name);
164 assert(invariant(element, superclassConstructor != null, 164 assert(invariant(element, superclassConstructor != null,
165 message: "Superclass constructor '${constructor.name}' called from " 165 message: "Superclass constructor '${constructor.name}' called from "
166 "${element} not found in ${superclass}.")); 166 "${element} not found in ${superclass}."));
167 // TODO(johnniwinther): Compute callStructure. Currently not used. 167 // TODO(johnniwinther): Compute callStructure. Currently not used.
168 CallStructure callStructure; 168 CallStructure callStructure;
169 return _resolutionImpactDeserializer.registerResolutionImpact(constructor, 169 return _resolutionImpactDeserializer.registerResolutionImpact(constructor,
170 () { 170 () {
171 List<TypeUse> typeUses = <TypeUse>[]; 171 List<TypeUse> typeUses = <TypeUse>[];
172 void addCheckedModeCheck(DartType type) { 172 void addCheckedModeCheck(ResolutionDartType type) {
173 if (!type.isDynamic) { 173 if (!type.isDynamic) {
174 typeUses.add(new TypeUse.checkedModeCheck(type)); 174 typeUses.add(new TypeUse.checkedModeCheck(type));
175 } 175 }
176 } 176 }
177 177
178 FunctionType type = constructor.type; 178 ResolutionFunctionType type = constructor.type;
179 // TODO(johnniwinther): Remove this substitution when synthesized 179 // TODO(johnniwinther): Remove this substitution when synthesized
180 // constructors handle type variables correctly. 180 // constructors handle type variables correctly.
181 type = type.substByContext(constructor.enclosingClass 181 type = type.substByContext(constructor.enclosingClass
182 .asInstanceOf(constructor.enclosingClass)); 182 .asInstanceOf(constructor.enclosingClass));
183 type.parameterTypes.forEach(addCheckedModeCheck); 183 type.parameterTypes.forEach(addCheckedModeCheck);
184 type.optionalParameterTypes.forEach(addCheckedModeCheck); 184 type.optionalParameterTypes.forEach(addCheckedModeCheck);
185 type.namedParameterTypes.forEach(addCheckedModeCheck); 185 type.namedParameterTypes.forEach(addCheckedModeCheck);
186 return new DeserializedResolutionImpact(staticUses: <StaticUse>[ 186 return new DeserializedResolutionImpact(staticUses: <StaticUse>[
187 new StaticUse.superConstructorInvoke( 187 new StaticUse.superConstructorInvoke(
188 superclassConstructor, callStructure) 188 superclassConstructor, callStructure)
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 } 322 }
323 323
324 @override 324 @override
325 void onElement(Element element, ObjectDecoder getDecoder(String tag)) { 325 void onElement(Element element, ObjectDecoder getDecoder(String tag)) {
326 ObjectDecoder decoder = getDecoder(RESOLVED_AST_TAG); 326 ObjectDecoder decoder = getDecoder(RESOLVED_AST_TAG);
327 if (decoder != null) { 327 if (decoder != null) {
328 _decoderMap[element] = decoder; 328 _decoderMap[element] = decoder;
329 } 329 }
330 } 330 }
331 } 331 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/serialization/serialization_util.dart ('k') | pkg/compiler/lib/src/serialization/type_serialization.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698