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

Side by Side Diff: dart/lib/compiler/implementation/elements/elements.dart

Issue 10389143: Add locations to diagnostics. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Remove all references to unreachable() Created 8 years, 7 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 #library('elements'); 5 #library('elements');
6 6
7 #import('../tree/tree.dart'); 7 #import('../tree/tree.dart');
8 #import('../scanner/scannerlib.dart'); 8 #import('../scanner/scannerlib.dart');
9 #import('../leg.dart'); // TODO(karlklose): we only need type. 9 #import('../leg.dart'); // TODO(karlklose): we only need type.
10 #import('../util/util.dart'); 10 #import('../util/util.dart');
(...skipping 628 matching lines...) Expand 10 before | Expand all | Expand 10 after
639 : this.constructor = constructor, 639 : this.constructor = constructor,
640 super(constructor.name, 640 super(constructor.name,
641 ElementKind.GENERATIVE_CONSTRUCTOR_BODY, 641 ElementKind.GENERATIVE_CONSTRUCTOR_BODY,
642 null, 642 null,
643 constructor.enclosingElement) { 643 constructor.enclosingElement) {
644 functionSignature = constructor.functionSignature; 644 functionSignature = constructor.functionSignature;
645 } 645 }
646 646
647 bool isInstanceMember() => true; 647 bool isInstanceMember() => true;
648 648
649 FunctionType computeType(Compiler compiler) { unreachable(); } 649 FunctionType computeType(Compiler compiler) {
650 compiler.reportFatalError('Internal error: $this.computeType', this);
651 }
650 652
651 Node parseNode(DiagnosticListener listener) { 653 Node parseNode(DiagnosticListener listener) {
652 if (cachedNode !== null) return cachedNode; 654 if (cachedNode !== null) return cachedNode;
653 cachedNode = constructor.parseNode(listener); 655 cachedNode = constructor.parseNode(listener);
654 assert(cachedNode !== null); 656 assert(cachedNode !== null);
655 return cachedNode; 657 return cachedNode;
656 } 658 }
657 659
658 Token position() => constructor.position(); 660 Token position() => constructor.position();
659 } 661 }
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
1044 final Node node; 1046 final Node node;
1045 Type bound; 1047 Type bound;
1046 Type type; 1048 Type type;
1047 TypeVariableElement(name, Element enclosing, this.node, this.type, 1049 TypeVariableElement(name, Element enclosing, this.node, this.type,
1048 [this.bound]) 1050 [this.bound])
1049 : super(name, ElementKind.TYPE_VARIABLE, enclosing); 1051 : super(name, ElementKind.TYPE_VARIABLE, enclosing);
1050 Type computeType(compiler) => type; 1052 Type computeType(compiler) => type;
1051 Node parseNode(compiler) => node; 1053 Node parseNode(compiler) => node;
1052 toString() => "${enclosingElement.toString()}.${name.slowToString()}"; 1054 toString() => "${enclosingElement.toString()}.${name.slowToString()}";
1053 } 1055 }
OLDNEW
« no previous file with comments | « dart/lib/compiler/implementation/compiler.dart ('k') | dart/lib/compiler/implementation/leg.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698