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

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

Issue 1971193002: Patches to support Dart VM patch files in dart2js. (Closed) Base URL: sso://user/ahe/dart-sdk@master
Patch Set: Created 4 years, 6 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) 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 library dart2js.resolution; 5 library dart2js.resolution;
6 6
7 import 'dart:collection' show Queue; 7 import 'dart:collection' show Queue;
8 8
9 import '../common.dart'; 9 import '../common.dart';
10 import '../common/names.dart' show Identifiers; 10 import '../common/names.dart' show Identifiers;
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 } 216 }
217 if (element.isConstructor) { 217 if (element.isConstructor) {
218 if (tree.returnType != null) { 218 if (tree.returnType != null) {
219 reporter.reportErrorMessage( 219 reporter.reportErrorMessage(
220 tree, MessageKind.CONSTRUCTOR_WITH_RETURN_TYPE); 220 tree, MessageKind.CONSTRUCTOR_WITH_RETURN_TYPE);
221 } 221 }
222 if (tree.hasBody && element.isConst) { 222 if (tree.hasBody && element.isConst) {
223 if (element.isGenerativeConstructor) { 223 if (element.isGenerativeConstructor) {
224 reporter.reportErrorMessage( 224 reporter.reportErrorMessage(
225 tree, MessageKind.CONST_CONSTRUCTOR_WITH_BODY); 225 tree, MessageKind.CONST_CONSTRUCTOR_WITH_BODY);
226 } else if (!tree.isRedirectingFactory) { 226 } else if (!tree.isRedirectingFactory && !element.isPatch) {
227 reporter.reportErrorMessage(tree, MessageKind.CONST_FACTORY); 227 reporter.reportErrorMessage(tree, MessageKind.CONST_FACTORY);
228 } 228 }
229 } 229 }
230 } 230 }
231 231
232 ResolverVisitor visitor = visitorFor(element); 232 ResolverVisitor visitor = visitorFor(element);
233 ResolutionRegistry registry = visitor.registry; 233 ResolutionRegistry registry = visitor.registry;
234 registry.defineFunction(tree, element); 234 registry.defineFunction(tree, element);
235 visitor.setupFunction(tree, element); 235 visitor.setupFunction(tree, element);
236 processAsyncMarker(compiler, element, registry); 236 processAsyncMarker(compiler, element, registry);
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 if (seen.contains(nextTarget)) { 446 if (seen.contains(nextTarget)) {
447 reporter.reportErrorMessage( 447 reporter.reportErrorMessage(
448 node, MessageKind.CYCLIC_REDIRECTING_FACTORY); 448 node, MessageKind.CYCLIC_REDIRECTING_FACTORY);
449 targetType = target.enclosingClass.thisType; 449 targetType = target.enclosingClass.thisType;
450 isMalformed = true; 450 isMalformed = true;
451 break; 451 break;
452 } 452 }
453 seen.add(target); 453 seen.add(target);
454 target = nextTarget; 454 target = nextTarget;
455 } 455 }
456 if (!target.isMalformed && !target.hasFunctionSignature) {
457 target.computeType(resolution);
458 }
456 459
457 if (target.isGenerativeConstructor && target.enclosingClass.isAbstract) { 460 if (target.isGenerativeConstructor && target.enclosingClass.isAbstract) {
458 isMalformed = true; 461 isMalformed = true;
459 } 462 }
460 if (target.isMalformed) { 463 if (target.isMalformed) {
461 isMalformed = true; 464 isMalformed = true;
462 } 465 }
463 466
464 if (targetType == null) { 467 if (targetType == null) {
465 assert(!target.isRedirectingFactory); 468 assert(!target.isRedirectingFactory);
(...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after
1095 TreeElements get treeElements { 1098 TreeElements get treeElements {
1096 assert(invariant(this, _treeElements != null, 1099 assert(invariant(this, _treeElements != null,
1097 message: "TreeElements have not been computed for $this.")); 1100 message: "TreeElements have not been computed for $this."));
1098 return _treeElements; 1101 return _treeElements;
1099 } 1102 }
1100 1103
1101 void reuseElement() { 1104 void reuseElement() {
1102 _treeElements = null; 1105 _treeElements = null;
1103 } 1106 }
1104 } 1107 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/resolution/members.dart ('k') | pkg/compiler/lib/src/resolution/send_resolver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698