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

Side by Side Diff: sdk/lib/_internal/compiler/js_lib/mirror_helper.dart

Issue 538513002: Move js library back into compiler directory. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 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 * Helps dealing with reflection in the case that the source code has been 5 * Helps dealing with reflection in the case that the source code has been
6 * changed as a result of compiling with dart2dart. 6 * changed as a result of compiling with dart2dart.
7 */ 7 */
8 library _mirror_helper; 8 library _mirror_helper;
9 9
10 import 'dart:mirrors'; 10 import 'dart:mirrors';
11 11
12 /// The compiler will replace this variable with a map containing all the 12 /// The compiler will replace this variable with a map containing all the
13 /// renames made in dart2dart. 13 /// renames made in dart2dart.
14 const Map<String, String> _SYMBOLS = null; 14 const Map<String, String> _SYMBOLS = null;
15 15
16 /// This method is a wrapper for MirrorSystem.getName() and will be inlined and 16 /// This method is a wrapper for MirrorSystem.getName() and will be inlined and
17 /// called in the generated output Dart code. 17 /// called in the generated output Dart code.
18 String helperGetName(Symbol sym) { 18 String helperGetName(Symbol sym) {
19 var name = MirrorSystem.getName(sym); 19 var name = MirrorSystem.getName(sym);
20 if (_SYMBOLS.containsKey(name)) { 20 if (_SYMBOLS.containsKey(name)) {
21 return _SYMBOLS[name]; 21 return _SYMBOLS[name];
22 } else { 22 } else {
23 return name; 23 return name;
24 } 24 }
25 } 25 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/compiler/js_lib/math_patch.dart ('k') | sdk/lib/_internal/compiler/js_lib/mirrors_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698