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

Side by Side Diff: pkg/compiler/lib/src/resolution/constructors.dart

Issue 1405443004: Remove calls to registerDependency from within resolution. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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.resolution.constructors; 5 library dart2js.resolution.constructors;
6 6
7 import '../common.dart'; 7 import '../common.dart';
8 import '../compiler.dart' show 8 import '../compiler.dart' show
9 Compiler; 9 Compiler;
10 import '../constants/constructors.dart' show 10 import '../constants/constructors.dart' show
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 final String className = lookupTarget.name; 226 final String className = lookupTarget.name;
227 final bool isImplicitSuperCall = true; 227 final bool isImplicitSuperCall = true;
228 verifyThatConstructorMatchesCall(calledConstructor, 228 verifyThatConstructorMatchesCall(calledConstructor,
229 CallStructure.NO_ARGS, 229 CallStructure.NO_ARGS,
230 isImplicitSuperCall, 230 isImplicitSuperCall,
231 functionNode, 231 functionNode,
232 className, 232 className,
233 constructorSelector); 233 constructorSelector);
234 if (calledConstructor != null) { 234 if (calledConstructor != null) {
235 registry.registerImplicitSuperCall(calledConstructor); 235 registry.registerImplicitSuperCall(calledConstructor);
236 registry.registerStaticUse(calledConstructor);
237 } 236 }
238 237
239 if (isConst && isValidAsConstant) { 238 if (isConst && isValidAsConstant) {
240 return new ConstructedConstantExpression( 239 return new ConstructedConstantExpression(
241 targetType, 240 targetType,
242 calledConstructor, 241 calledConstructor,
243 CallStructure.NO_ARGS, 242 CallStructure.NO_ARGS,
244 const <ConstantExpression>[]); 243 const <ConstantExpression>[]);
245 } 244 }
246 } 245 }
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after
755 // constructors. 754 // constructors.
756 return null; 755 return null;
757 } 756 }
758 // TODO(johnniwinther): Use [Name] for lookup. 757 // TODO(johnniwinther): Use [Name] for lookup.
759 ConstructorElement constructor = cls.lookupConstructor(constructorName); 758 ConstructorElement constructor = cls.lookupConstructor(constructorName);
760 if (constructor != null) { 759 if (constructor != null) {
761 constructor = constructor.declaration; 760 constructor = constructor.declaration;
762 } 761 }
763 return constructor; 762 return constructor;
764 } 763 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_backend/backend.dart ('k') | pkg/compiler/lib/src/resolution/registry.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698