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

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

Issue 10105031: Check number of type arguments. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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
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 700 matching lines...) Expand 10 before | Expand all | Expand 10 after
711 } 711 }
712 } 712 }
713 713
714 Type computeType(compiler) { 714 Type computeType(compiler) {
715 if (type === null) { 715 if (type === null) {
716 type = new SimpleType(name, this); 716 type = new SimpleType(name, this);
717 } 717 }
718 return type; 718 return type;
719 } 719 }
720 720
721 ClassElement ensureResolved(Compiler compiler) { 721 ClassElement ensureResolved(Compiler compiler) {
ahe 2012/04/18 09:09:54 Long term, I would like to get these kinds of meth
722 if (!isResolved && !isBeingResolved) { 722 if (!isResolved && !isBeingResolved) {
723 isBeingResolved = true; 723 isBeingResolved = true;
724 compiler.resolveType(this); 724 compiler.resolveClass(this);
725 isBeingResolved = false; 725 isBeingResolved = false;
726 isResolved = true; 726 isResolved = true;
727 } 727 }
728 return this; 728 return this;
729 } 729 }
730 730
731 Element lookupTypeParameter(SourceString parameterName) { 731 Element lookupTypeParameter(SourceString parameterName) {
732 Element result = typeParameters[parameterName]; 732 Element result = typeParameters[parameterName];
733 return result; 733 return result;
734 } 734 }
(...skipping 281 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

Powered by Google App Engine
This is Rietveld 408576698