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

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

Issue 9359039: Source in most stuff. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: rebased Created 8 years, 10 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 | « dart/frog/leg/compiler.dart ('k') | dart/frog/leg/frog_leg.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 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 if (identifier === null) { 320 if (identifier === null) {
321 compiler.cancel('library prefixes not handled', 321 compiler.cancel('library prefixes not handled',
322 node: typeAnnotation.typeName); 322 node: typeAnnotation.typeName);
323 } 323 }
324 final SourceString name = identifier.source; 324 final SourceString name = identifier.source;
325 Element element = library.find(name); 325 Element element = library.find(name);
326 if (element !== null && element.kind === ElementKind.CLASS) { 326 if (element !== null && element.kind === ElementKind.CLASS) {
327 // TODO(karlklose): substitute type parameters. 327 // TODO(karlklose): substitute type parameters.
328 return element.computeType(compiler); 328 return element.computeType(compiler);
329 } 329 }
330 return compiler.types.lookup(name); 330 Type type = compiler.types.lookup(name);
331 if (type === null) {
332 type = compiler.types.dynamicType;
333 }
334 return type;
331 } 335 }
332 336
333 class FunctionParameters { 337 class FunctionParameters {
334 Link<Element> requiredParameters; 338 Link<Element> requiredParameters;
335 Link<Element> optionalParameters; 339 Link<Element> optionalParameters;
336 int requiredParameterCount; 340 int requiredParameterCount;
337 int optionalParameterCount; 341 int optionalParameterCount;
338 FunctionParameters(this.requiredParameters, 342 FunctionParameters(this.requiredParameters,
339 this.optionalParameters, 343 this.optionalParameters,
340 this.requiredParameterCount, 344 this.requiredParameterCount,
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
715 bool isContinueTarget = false; 719 bool isContinueTarget = false;
716 720
717 StatementElement(this.origin, Element enclosingElement) 721 StatementElement(this.origin, Element enclosingElement)
718 : super(const SourceString(""), ElementKind.STATEMENT, enclosingElement); 722 : super(const SourceString(""), ElementKind.STATEMENT, enclosingElement);
719 StatementElement.label(String name, this.origin, Element enclosingElement) 723 StatementElement.label(String name, this.origin, Element enclosingElement)
720 : super(new SourceString(name), ElementKind.STATEMENT, enclosingElement); 724 : super(new SourceString(name), ElementKind.STATEMENT, enclosingElement);
721 bool get isTarget() => isBreakTarget || isContinueTarget; 725 bool get isTarget() => isBreakTarget || isContinueTarget;
722 726
723 Node parseNode(DiagnosticListener l) => origin; 727 Node parseNode(DiagnosticListener l) => origin;
724 } 728 }
OLDNEW
« no previous file with comments | « dart/frog/leg/compiler.dart ('k') | dart/frog/leg/frog_leg.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698