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

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

Issue 10693123: Use better names for closures and static variables. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 5 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 | « no previous file | lib/compiler/implementation/emitter.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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 111
112 Type computeType(Compiler compiler) { 112 Type computeType(Compiler compiler) {
113 compiler.internalError("$this.computeType.", token: position()); 113 compiler.internalError("$this.computeType.", token: position());
114 } 114 }
115 115
116 void addMetadata(Node node) { 116 void addMetadata(Node node) {
117 metadata = metadata.prepend(node); 117 metadata = metadata.prepend(node);
118 } 118 }
119 119
120 bool isFunction() => kind === ElementKind.FUNCTION; 120 bool isFunction() => kind === ElementKind.FUNCTION;
121 bool isClosure() => false;
121 bool isMember() => 122 bool isMember() =>
122 enclosingElement !== null && enclosingElement.kind === ElementKind.CLASS; 123 enclosingElement !== null && enclosingElement.kind === ElementKind.CLASS;
123 bool isInstanceMember() => false; 124 bool isInstanceMember() => false;
124 bool isFactoryConstructor() => modifiers !== null && modifiers.isFactory(); 125 bool isFactoryConstructor() => modifiers !== null && modifiers.isFactory();
125 bool isGenerativeConstructor() => kind === ElementKind.GENERATIVE_CONSTRUCTOR; 126 bool isGenerativeConstructor() => kind === ElementKind.GENERATIVE_CONSTRUCTOR;
126 bool isGenerativeConstructorBody() => 127 bool isGenerativeConstructorBody() =>
127 kind === ElementKind.GENERATIVE_CONSTRUCTOR_BODY; 128 kind === ElementKind.GENERATIVE_CONSTRUCTOR_BODY;
128 bool isCompilationUnit() { 129 bool isCompilationUnit() {
129 return kind === ElementKind.COMPILATION_UNIT || 130 return kind === ElementKind.COMPILATION_UNIT ||
130 kind === ElementKind.LIBRARY; 131 kind === ElementKind.LIBRARY;
(...skipping 1015 matching lines...) Expand 10 before | Expand all | Expand 10 after
1146 final Node node; 1147 final Node node;
1147 Type bound; 1148 Type bound;
1148 Type type; 1149 Type type;
1149 TypeVariableElement(name, Element enclosing, this.node, this.type, 1150 TypeVariableElement(name, Element enclosing, this.node, this.type,
1150 [this.bound]) 1151 [this.bound])
1151 : super(name, ElementKind.TYPE_VARIABLE, enclosing); 1152 : super(name, ElementKind.TYPE_VARIABLE, enclosing);
1152 Type computeType(compiler) => type; 1153 Type computeType(compiler) => type;
1153 Node parseNode(compiler) => node; 1154 Node parseNode(compiler) => node;
1154 toString() => "${enclosingElement.toString()}.${name.slowToString()}"; 1155 toString() => "${enclosingElement.toString()}.${name.slowToString()}";
1155 } 1156 }
OLDNEW
« no previous file with comments | « no previous file | lib/compiler/implementation/emitter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698