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

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

Issue 9619020: Don't cancel when naming a typedef. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 9 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 | « frog/leg/elements/elements.dart ('k') | frog/leg/ssa/codegen.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) 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 /** 5 /**
6 * Assigns JavaScript identifiers to Dart variables, class-names and members. 6 * Assigns JavaScript identifiers to Dart variables, class-names and members.
7 */ 7 */
8 class Namer { 8 class Namer {
9 final Compiler compiler; 9 final Compiler compiler;
10 10
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 case ElementKind.PARAMETER: 156 case ElementKind.PARAMETER:
157 // The name is not guaranteed to be unique. 157 // The name is not guaranteed to be unique.
158 return guess; 158 return guess;
159 159
160 case ElementKind.GENERATIVE_CONSTRUCTOR: 160 case ElementKind.GENERATIVE_CONSTRUCTOR:
161 case ElementKind.FUNCTION: 161 case ElementKind.FUNCTION:
162 case ElementKind.CLASS: 162 case ElementKind.CLASS:
163 case ElementKind.FIELD: 163 case ElementKind.FIELD:
164 case ElementKind.GETTER: 164 case ElementKind.GETTER:
165 case ElementKind.SETTER: 165 case ElementKind.SETTER:
166 case ElementKind.TYPEDEF:
166 String result = getFreshGlobalName(guess); 167 String result = getFreshGlobalName(guess);
167 globals[element] = result; 168 globals[element] = result;
168 return result; 169 return result;
169 170
170 default: 171 default:
171 compiler.internalError('getName for unknown kind: ${element.kind}', 172 compiler.internalError('getName for unknown kind: ${element.kind}',
172 node: element.parseNode(compiler)); 173 node: element.parseNode(compiler));
173 } 174 }
174 } 175 }
175 } 176 }
(...skipping 11 matching lines...) Expand all
187 } 188 }
188 189
189 String isolateBailoutAccess(Element element) { 190 String isolateBailoutAccess(Element element) {
190 return '${isolateAccess(element)}\$bailout'; 191 return '${isolateAccess(element)}\$bailout';
191 } 192 }
192 193
193 String operatorIs(Element element) { 194 String operatorIs(Element element) {
194 return 'is\$${getName(element)}'; 195 return 'is\$${getName(element)}';
195 } 196 }
196 } 197 }
OLDNEW
« no previous file with comments | « frog/leg/elements/elements.dart ('k') | frog/leg/ssa/codegen.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698