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

Side by Side Diff: lib/compiler/implementation/dart_backend/renamer.dart

Issue 11262032: Add 'part of' in dart2js code. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 1 month 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 part of dart_backend;
6
5 Function get _compareNodes => 7 Function get _compareNodes =>
6 compareBy((n) => n.getBeginToken().charOffset); 8 compareBy((n) => n.getBeginToken().charOffset);
7 9
8 typedef String _Renamer(Renamable renamable); 10 typedef String _Renamer(Renamable renamable);
9 abstract class Renamable { 11 abstract class Renamable {
10 const int RENAMABLE_TYPE_ELEMENT = 1; 12 const int RENAMABLE_TYPE_ELEMENT = 1;
11 const int RENAMABLE_TYPE_MEMBER = 2; 13 const int RENAMABLE_TYPE_MEMBER = 2;
12 const int RENAMABLE_TYPE_LOCAL = 3; 14 const int RENAMABLE_TYPE_LOCAL = 3;
13 15
14 final Set<Node> nodes; 16 final Set<Node> nodes;
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 index ~/= firstCharAlphabet.length; 287 index ~/= firstCharAlphabet.length;
286 int length = otherCharsAlphabet.length; 288 int length = otherCharsAlphabet.length;
287 while (index >= length) { 289 while (index >= length) {
288 resultBuilder.add(otherCharsAlphabet[index % length]); 290 resultBuilder.add(otherCharsAlphabet[index % length]);
289 index ~/= length; 291 index ~/= length;
290 } 292 }
291 resultBuilder.add(otherCharsAlphabet[index]); 293 resultBuilder.add(otherCharsAlphabet[index]);
292 return resultBuilder.toString(); 294 return resultBuilder.toString();
293 } 295 }
294 } 296 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698