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

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

Issue 10119010: Start propagating non-primitive types in the backend, and fold instructions that know about the typ… (Closed) Base URL: http://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 731 matching lines...) Expand 10 before | Expand all | Expand 10 after
742 Element e = s.lookupLocalMember(memberName); 742 Element e = s.lookupLocalMember(memberName);
743 if (e !== null) { 743 if (e !== null) {
744 if (!memberName.isPrivate() || getLibrary() === e.getLibrary()) { 744 if (!memberName.isPrivate() || getLibrary() === e.getLibrary()) {
745 return e; 745 return e;
746 } 746 }
747 } 747 }
748 } 748 }
749 return null; 749 return null;
750 } 750 }
751 751
752 Element lookupMember(SourceString memberName) {
ahe 2012/04/18 15:23:00 Could you put a big fat warning about this not bei
ngeoffray 2012/04/19 08:09:33 Done.
753 Element localMember = localMembers[memberName];
754 return localMember === null ? lookupSuperMember(memberName) : localMember;
755 }
756
752 Element lookupConstructor(SourceString className, 757 Element lookupConstructor(SourceString className,
753 [SourceString constructorName = 758 [SourceString constructorName =
754 const SourceString(''), 759 const SourceString(''),
755 Element noMatch(Element)]) { 760 Element noMatch(Element)]) {
756 // TODO(karlklose): have a map from class names to a map of constructors 761 // TODO(karlklose): have a map from class names to a map of constructors
757 // instead of creating the name here? 762 // instead of creating the name here?
758 SourceString normalizedName; 763 SourceString normalizedName;
759 if (constructorName !== const SourceString('')) { 764 if (constructorName !== const SourceString('')) {
760 normalizedName = Elements.constructConstructorName(className, 765 normalizedName = Elements.constructConstructorName(className,
761 constructorName); 766 constructorName);
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
1016 final Node node; 1021 final Node node;
1017 Type bound; 1022 Type bound;
1018 Type type; 1023 Type type;
1019 TypeVariableElement(name, Element enclosing, this.node, this.type, 1024 TypeVariableElement(name, Element enclosing, this.node, this.type,
1020 [this.bound]) 1025 [this.bound])
1021 : super(name, ElementKind.TYPE_VARIABLE, enclosing); 1026 : super(name, ElementKind.TYPE_VARIABLE, enclosing);
1022 Type computeType(compiler) => type; 1027 Type computeType(compiler) => type;
1023 Node parseNode(compiler) => node; 1028 Node parseNode(compiler) => node;
1024 toString() => "${enclosingElement.toString()}.${name.slowToString()}"; 1029 toString() => "${enclosingElement.toString()}.${name.slowToString()}";
1025 } 1030 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698