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

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

Issue 821593004: Create erroneous element when resolution of initializer fails. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Tests passing locally. Created 5 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 | Annotate | Revision Log
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 part of dart2js; 5 part of dart2js;
6 6
7 typedef ItemCompilationContext ItemCompilationContextCreator(); 7 typedef ItemCompilationContext ItemCompilationContextCreator();
8 8
9 class EnqueueTask extends CompilerTask { 9 class EnqueueTask extends CompilerTask {
10 final ResolutionEnqueuer resolution; 10 final ResolutionEnqueuer resolution;
(...skipping 679 matching lines...) Expand 10 before | Expand all | Expand 10 after
690 * During resolution, we have to resort to matching elements against the 690 * During resolution, we have to resort to matching elements against the
691 * [MirrorsUsed] pattern, as we do not have a complete picture of the world, 691 * [MirrorsUsed] pattern, as we do not have a complete picture of the world,
692 * yet. 692 * yet.
693 */ 693 */
694 bool shouldIncludeElementDueToMirrors(Element element, 694 bool shouldIncludeElementDueToMirrors(Element element,
695 {bool includedEnclosing}) { 695 {bool includedEnclosing}) {
696 return includedEnclosing || compiler.backend.requiredByMirrorSystem(element) ; 696 return includedEnclosing || compiler.backend.requiredByMirrorSystem(element) ;
697 } 697 }
698 698
699 bool internalAddToWorkList(Element element) { 699 bool internalAddToWorkList(Element element) {
700 if (element.isErroneous) return false;
700 assert(invariant(element, element is AnalyzableElement, 701 assert(invariant(element, element is AnalyzableElement,
701 message: 'Element $element is not analyzable.')); 702 message: 'Element $element is not analyzable.'));
702 if (hasBeenResolved(element)) return false; 703 if (hasBeenResolved(element)) return false;
703 if (queueIsClosed) { 704 if (queueIsClosed) {
704 throw new SpannableAssertionFailure(element, 705 throw new SpannableAssertionFailure(element,
705 "Resolution work list is closed. Trying to add $element."); 706 "Resolution work list is closed. Trying to add $element.");
706 } 707 }
707 708
708 compiler.world.registerUsedElement(element); 709 compiler.world.registerUsedElement(element);
709 710
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
907 void processWorkItem(void f(WorkItem work), WorkItem work) { 908 void processWorkItem(void f(WorkItem work), WorkItem work) {
908 f(work); 909 f(work);
909 } 910 }
910 } 911 }
911 912
912 void removeFromSet(Map<String, Set<Element>> map, Element element) { 913 void removeFromSet(Map<String, Set<Element>> map, Element element) {
913 Set<Element> set = map[element.name]; 914 Set<Element> set = map[element.name];
914 if (set == null) return; 915 if (set == null) return;
915 set.remove(element); 916 set.remove(element);
916 } 917 }
OLDNEW
« no previous file with comments | « dart/pkg/compiler/lib/src/elements/modelx.dart ('k') | dart/pkg/compiler/lib/src/resolution/members.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698