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

Side by Side Diff: lib/compiler/implementation/js/printer.dart

Issue 11273041: Make first and last getters. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update status files with co19 issue number. 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 class Printer implements NodeVisitor { 5 class Printer implements NodeVisitor {
6 final bool shouldCompressOutput; 6 final bool shouldCompressOutput;
7 leg.Compiler compiler; 7 leg.Compiler compiler;
8 leg.CodeBuffer outBuffer; 8 leg.CodeBuffer outBuffer;
9 int indentLevel = 0; 9 int indentLevel = 0;
10 bool inForInit = false; 10 bool inForInit = false;
(...skipping 960 matching lines...) Expand 10 before | Expand all | Expand 10 after
971 var codes = <int>[]; 971 var codes = <int>[];
972 for (var i = 0; i < alphaChars; i++) { 972 for (var i = 0; i < alphaChars; i++) {
973 nameSpaceSize ~/= LETTERS; 973 nameSpaceSize ~/= LETTERS;
974 codes.add(nthLetter((n ~/ nameSpaceSize) % LETTERS)); 974 codes.add(nthLetter((n ~/ nameSpaceSize) % LETTERS));
975 } 975 }
976 codes.add(charCodes.$0 + digit); 976 codes.add(charCodes.$0 + digit);
977 newName = new String.fromCharCodes(codes); 977 newName = new String.fromCharCodes(codes);
978 } 978 }
979 assert(const RegExp(r'[a-zA-Z][a-zA-Z0-9]*').hasMatch(newName)); 979 assert(const RegExp(r'[a-zA-Z][a-zA-Z0-9]*').hasMatch(newName));
980 nameNumber++; 980 nameNumber++;
981 maps.last()[oldName] = newName; 981 maps.last[oldName] = newName;
982 return newName; 982 return newName;
983 } 983 }
984 } 984 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/dart_backend/backend.dart ('k') | lib/compiler/implementation/lib/interceptors.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698