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

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

Issue 1803303002: Move all flags to CompilerOptions (first step to stop passing the compiler to (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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) 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 '../compiler.dart' show 8 import '../compiler.dart' show
9 Compiler; 9 Compiler;
10 import '../dart_types.dart'; 10 import '../dart_types.dart';
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 LinkBuilder<Element> parametersBuilder = 335 LinkBuilder<Element> parametersBuilder =
336 visitor.analyzeNodes(formalParameters.nodes); 336 visitor.analyzeNodes(formalParameters.nodes);
337 requiredParameterCount = parametersBuilder.length; 337 requiredParameterCount = parametersBuilder.length;
338 parameters = parametersBuilder.toList(); 338 parameters = parametersBuilder.toList();
339 } 339 }
340 DartType returnType; 340 DartType returnType;
341 if (element.isFactoryConstructor) { 341 if (element.isFactoryConstructor) {
342 returnType = element.enclosingClass.thisType; 342 returnType = element.enclosingClass.thisType;
343 // Because there is no type annotation for the return type of 343 // Because there is no type annotation for the return type of
344 // this element, we explicitly add one. 344 // this element, we explicitly add one.
345 if (compiler.enableTypeAssertions) { 345 if (compiler.options.enableTypeAssertions) {
346 registry.registerTypeUse(new TypeUse.checkedModeCheck(returnType)); 346 registry.registerTypeUse(new TypeUse.checkedModeCheck(returnType));
347 } 347 }
348 } else { 348 } else {
349 AsyncMarker asyncMarker = AsyncMarker.SYNC; 349 AsyncMarker asyncMarker = AsyncMarker.SYNC;
350 if (isFunctionExpression) { 350 if (isFunctionExpression) {
351 // Use async marker to determine the return type of function 351 // Use async marker to determine the return type of function
352 // expressions. 352 // expressions.
353 FunctionElement function = element; 353 FunctionElement function = element;
354 asyncMarker = function.asyncMarker; 354 asyncMarker = function.asyncMarker;
355 } 355 }
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 439
440 DartType resolveReturnType(TypeAnnotation annotation) { 440 DartType resolveReturnType(TypeAnnotation annotation) {
441 if (annotation == null) return const DynamicType(); 441 if (annotation == null) return const DynamicType();
442 DartType result = resolver.resolveTypeAnnotation(annotation); 442 DartType result = resolver.resolveTypeAnnotation(annotation);
443 if (result == null) { 443 if (result == null) {
444 return const DynamicType(); 444 return const DynamicType();
445 } 445 }
446 return result; 446 return result;
447 } 447 }
448 } 448 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/resolution/resolution.dart ('k') | pkg/compiler/lib/src/scanner/scanner_task.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698