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

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

Issue 10001008: Many type fixes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 8 years, 8 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 | « lib/compiler/implementation/dart2js.dart ('k') | 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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 ClassElement getEnclosingClass() { 174 ClassElement getEnclosingClass() {
175 for (Element e = this; e !== null; e = e.enclosingElement) { 175 for (Element e = this; e !== null; e = e.enclosingElement) {
176 if (e.kind === ElementKind.CLASS) return e; 176 if (e.kind === ElementKind.CLASS) return e;
177 } 177 }
178 return null; 178 return null;
179 } 179 }
180 180
181 toString() => '$kind(${name.slowToString()})'; 181 toString() => '$kind(${name.slowToString()})';
182 182
183 bool _isNative = false; 183 bool _isNative = false;
184 void setNative() => _isNative = true; 184 void setNative() { _isNative = true; }
185 bool isNative() => _isNative; 185 bool isNative() => _isNative;
186 } 186 }
187 187
188 class ContainerElement extends Element { 188 class ContainerElement extends Element {
189 ContainerElement(name, kind, enclosingElement) : 189 ContainerElement(name, kind, enclosingElement) :
190 super(name, kind, enclosingElement); 190 super(name, kind, enclosingElement);
191 191
192 abstract void addMember(Element element, DiagnosticListener listener); 192 abstract void addMember(Element element, DiagnosticListener listener);
193 193
194 void addGetterOrSetter(Element element, 194 void addGetterOrSetter(Element element,
(...skipping 821 matching lines...) Expand 10 before | Expand all | Expand 10 after
1016 final Node node; 1016 final Node node;
1017 Type bound; 1017 Type bound;
1018 Type type; 1018 Type type;
1019 TypeVariableElement(name, Element enclosing, this.node, this.type, 1019 TypeVariableElement(name, Element enclosing, this.node, this.type,
1020 [this.bound]) 1020 [this.bound])
1021 : super(name, ElementKind.TYPE_VARIABLE, enclosing); 1021 : super(name, ElementKind.TYPE_VARIABLE, enclosing);
1022 Type computeType(compiler) => type; 1022 Type computeType(compiler) => type;
1023 Node parseNode(compiler) => node; 1023 Node parseNode(compiler) => node;
1024 toString() => "${enclosingElement.toString()}.${name.slowToString()}"; 1024 toString() => "${enclosingElement.toString()}.${name.slowToString()}";
1025 } 1025 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/dart2js.dart ('k') | lib/compiler/implementation/resolver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698