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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/mirror_renamer/renamer.dart

Issue 27510003: Scanner for UTF-8 byte arrays (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: fixes compiler tests Created 7 years, 2 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 mirror_renamer; 5 part of mirror_renamer;
6 6
7 class MirrorRenamer { 7 class MirrorRenamer {
8 static const String MIRROR_HELPER_GET_NAME_FUNCTION = 'helperGetName'; 8 static const String MIRROR_HELPER_GET_NAME_FUNCTION = 'helperGetName';
9 static const String MIRROR_HELPER_LIBRARY_NAME = '_mirror_helper'; 9 static const String MIRROR_HELPER_LIBRARY_NAME = '_mirror_helper';
10 static const String MIRROR_HELPER_SYMBOLS_MAP_NAME = '_SYMBOLS'; 10 static const String MIRROR_HELPER_SYMBOLS_MAP_NAME = '_SYMBOLS';
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 if (!first) { 80 if (!first) {
81 sb.write(','); 81 sb.write(',');
82 } else { 82 } else {
83 first = false; 83 first = false;
84 } 84 }
85 sb.write("'$mangledName' : '"); 85 sb.write("'$mangledName' : '");
86 sb.write(symbols[mangledName]); 86 sb.write(symbols[mangledName]);
87 sb.write("'"); 87 sb.write("'");
88 } 88 }
89 sb.write('};'); 89 sb.write('};');
90 sb.writeCharCode(0); // Terminate the string with '0', see [StringScanner].
90 topLevelNodes.add(parse(sb.toString())); 91 topLevelNodes.add(parse(sb.toString()));
91 92
92 // Replace calls to Mirrorsystem.getName with calls to helper function. 93 // Replace calls to Mirrorsystem.getName with calls to helper function.
93 mirrorSystemGetNameNodes.forEach((node) { 94 mirrorSystemGetNameNodes.forEach((node) {
94 renames[node.selector] = renames[mirrorHelperGetNameFunctionNode.name]; 95 renames[node.selector] = renames[mirrorHelperGetNameFunctionNode.name];
95 renames[node.receiver] = ''; 96 renames[node.receiver] = '';
96 }); 97 });
97 } 98 }
98 } 99 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698