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

Side by Side Diff: frog/leg/elements/elements.dart

Issue 8974014: Resolve initializers in constructors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Don't call function that does not exist. Created 9 years 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 | frog/leg/resolver.dart » ('j') | frog/leg/resolver.dart » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 } 116 }
117 } 117 }
118 118
119 class ForeignElement extends Element { 119 class ForeignElement extends Element {
120 ForeignElement(SourceString name) : super(name, ElementKind.FOREIGN, null); 120 ForeignElement(SourceString name) : super(name, ElementKind.FOREIGN, null);
121 121
122 Type computeType(Compiler compiler, types) { 122 Type computeType(Compiler compiler, types) {
123 return types.dynamicType; 123 return types.dynamicType;
124 } 124 }
125 125
126 parseNode(compiler, types) { 126 parseNode(Canceler canceler, Logger logger) {
127 throw "internal error: ForeignElement has no node"; 127 throw "internal error: ForeignElement has no node";
128 } 128 }
129 } 129 }
130 130
131 /** 131 /**
132 * TODO(ngeoffray): Remove this method in favor of using the universe. 132 * TODO(ngeoffray): Remove this method in favor of using the universe.
133 * 133 *
134 * Return the type referred to by the type annotation. This method 134 * Return the type referred to by the type annotation. This method
135 * accepts annotations with 'typeName == null' to indicate a missing 135 * accepts annotations with 'typeName == null' to indicate a missing
136 * annotation. 136 * annotation.
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 // TODO(ngeoffray): Implement these. 279 // TODO(ngeoffray): Implement these.
280 bool canHaveDefaultConstructor() => true; 280 bool canHaveDefaultConstructor() => true;
281 281
282 SynthesizedConstructorElement getSynthesizedConstructor() { 282 SynthesizedConstructorElement getSynthesizedConstructor() {
283 if (synthesizedConstructor === null && canHaveDefaultConstructor()) { 283 if (synthesizedConstructor === null && canHaveDefaultConstructor()) {
284 synthesizedConstructor = new SynthesizedConstructorElement(this); 284 synthesizedConstructor = new SynthesizedConstructorElement(this);
285 } 285 }
286 return synthesizedConstructor; 286 return synthesizedConstructor;
287 } 287 }
288 288
289 parseNode(compiler, types) => node; 289 parseNode(Canceler canceler, Logger logger) => node;
290 290
291 /** 291 /**
292 * Returns the super class, if any. 292 * Returns the super class, if any.
293 * 293 *
294 * The returned element may not be resolved yet. 294 * The returned element may not be resolved yet.
295 */ 295 */
296 ClassElement get superClass() { 296 ClassElement get superClass() {
297 assert(isResolved); 297 assert(isResolved);
298 return supertype === null ? null : supertype.element; 298 return supertype === null ? null : supertype.element;
299 } 299 }
(...skipping 11 matching lines...) Expand all
311 && !element.isInstanceMember() 311 && !element.isInstanceMember()
312 && (element.kind === ElementKind.FIELD); 312 && (element.kind === ElementKind.FIELD);
313 } 313 }
314 314
315 static bool isInstanceMethod(Element element) { 315 static bool isInstanceMethod(Element element) {
316 return (element != null) 316 return (element != null)
317 && element.isInstanceMember() 317 && element.isInstanceMember()
318 && (element.kind === ElementKind.FUNCTION); 318 && (element.kind === ElementKind.FUNCTION);
319 } 319 }
320 } 320 }
OLDNEW
« no previous file with comments | « no previous file | frog/leg/resolver.dart » ('j') | frog/leg/resolver.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698