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

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

Issue 2456643006: More functionality in kernel_impact. (Closed)
Patch Set: Fix errors. Created 4 years, 1 month 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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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.signatures; 5 library dart2js.resolution.signatures;
6 6
7 import '../common.dart'; 7 import '../common.dart';
8 import '../common/resolution.dart'; 8 import '../common/resolution.dart';
9 import '../dart_types.dart'; 9 import '../dart_types.dart';
10 import '../elements/elements.dart'; 10 import '../elements/elements.dart';
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 LinkBuilder<Element> parametersBuilder = 363 LinkBuilder<Element> parametersBuilder =
364 visitor.analyzeNodes(formalParameters.nodes); 364 visitor.analyzeNodes(formalParameters.nodes);
365 requiredParameterCount = parametersBuilder.length; 365 requiredParameterCount = parametersBuilder.length;
366 parameters = parametersBuilder.toList(); 366 parameters = parametersBuilder.toList();
367 } 367 }
368 DartType returnType; 368 DartType returnType;
369 if (element.isFactoryConstructor) { 369 if (element.isFactoryConstructor) {
370 returnType = element.enclosingClass.thisType; 370 returnType = element.enclosingClass.thisType;
371 // Because there is no type annotation for the return type of 371 // Because there is no type annotation for the return type of
372 // this element, we explicitly add one. 372 // this element, we explicitly add one.
373 registry.registerTypeUse(new TypeUse.checkedModeCheck(returnType)); 373 registry.registerCheckedModeCheck(returnType);
374 } else { 374 } else {
375 AsyncMarker asyncMarker = AsyncMarker.SYNC; 375 AsyncMarker asyncMarker = AsyncMarker.SYNC;
376 if (isFunctionExpression) { 376 if (isFunctionExpression) {
377 // Use async marker to determine the return type of function 377 // Use async marker to determine the return type of function
378 // expressions. 378 // expressions.
379 FunctionElement function = element; 379 FunctionElement function = element;
380 asyncMarker = function.asyncMarker; 380 asyncMarker = function.asyncMarker;
381 } 381 }
382 switch (asyncMarker) { 382 switch (asyncMarker) {
383 case AsyncMarker.SYNC: 383 case AsyncMarker.SYNC:
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
477 /// variables of the function signature itself when its signature is analyzed. 477 /// variables of the function signature itself when its signature is analyzed.
478 class FunctionSignatureBuildingScope extends TypeVariablesScope { 478 class FunctionSignatureBuildingScope extends TypeVariablesScope {
479 @override 479 @override
480 final List<DartType> typeVariables; 480 final List<DartType> typeVariables;
481 481
482 FunctionSignatureBuildingScope(Scope parent, this.typeVariables) 482 FunctionSignatureBuildingScope(Scope parent, this.typeVariables)
483 : super(parent); 483 : super(parent);
484 484
485 String toString() => 'FunctionSignatureBuildingScope($typeVariables)'; 485 String toString() => 'FunctionSignatureBuildingScope($typeVariables)';
486 } 486 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/resolution/resolution.dart ('k') | pkg/compiler/lib/src/serialization/system.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698