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

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

Issue 10533126: Remove string constants from Types class. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | dart/lib/compiler/implementation/resolver.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 662 matching lines...) Expand 10 before | Expand all | Expand 10 after
673 class SynthesizedConstructorElement extends FunctionElement { 673 class SynthesizedConstructorElement extends FunctionElement {
674 SynthesizedConstructorElement(Element enclosing) 674 SynthesizedConstructorElement(Element enclosing)
675 : super(enclosing.name, ElementKind.GENERATIVE_CONSTRUCTOR, 675 : super(enclosing.name, ElementKind.GENERATIVE_CONSTRUCTOR,
676 null, enclosing); 676 null, enclosing);
677 677
678 Token position() => enclosingElement.position(); 678 Token position() => enclosingElement.position();
679 } 679 }
680 680
681 class VoidElement extends Element { 681 class VoidElement extends Element {
682 VoidElement(Element enclosing) 682 VoidElement(Element enclosing)
683 : super(Types.VOID, ElementKind.VOID, enclosing); 683 : super(const SourceString('void'), ElementKind.VOID, enclosing);
684 Type computeType(compiler) => compiler.types.voidType; 684 Type computeType(compiler) => compiler.types.voidType;
685 Node parseNode(_) { 685 Node parseNode(_) {
686 throw 'internal error: parseNode on void'; 686 throw 'internal error: parseNode on void';
687 } 687 }
688 bool impliesType() => true; 688 bool impliesType() => true;
689 } 689 }
690 690
691 class ClassElement extends ContainerElement { 691 class ClassElement extends ContainerElement {
692 final int id; 692 final int id;
693 Type type; 693 Type type;
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
1059 final Node node; 1059 final Node node;
1060 Type bound; 1060 Type bound;
1061 Type type; 1061 Type type;
1062 TypeVariableElement(name, Element enclosing, this.node, this.type, 1062 TypeVariableElement(name, Element enclosing, this.node, this.type,
1063 [this.bound]) 1063 [this.bound])
1064 : super(name, ElementKind.TYPE_VARIABLE, enclosing); 1064 : super(name, ElementKind.TYPE_VARIABLE, enclosing);
1065 Type computeType(compiler) => type; 1065 Type computeType(compiler) => type;
1066 Node parseNode(compiler) => node; 1066 Node parseNode(compiler) => node;
1067 toString() => "${enclosingElement.toString()}.${name.slowToString()}"; 1067 toString() => "${enclosingElement.toString()}.${name.slowToString()}";
1068 } 1068 }
OLDNEW
« no previous file with comments | « no previous file | dart/lib/compiler/implementation/resolver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698