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

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

Issue 1212513002: sdk files reorganization to make dart2js a proper package (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: renamed Created 5 years, 5 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
OLDNEW
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4 /**
5 * Helps dealing with reflection in the case that the source code has been
6 * changed as a result of compiling with dart2dart.
7 */
8 library _mirror_helper;
9
10 import 'dart:mirrors';
11
12 /// The compiler will replace this variable with a map containing all the
13 /// renames made in dart2dart.
14 const Map<String, String> _SYMBOLS = null;
15
16 /// This method is a wrapper for MirrorSystem.getName() and will be inlined and
17 /// called in the generated output Dart code.
18 String helperGetName(Symbol sym) {
19 var name = MirrorSystem.getName(sym);
20 if (_SYMBOLS.containsKey(name)) {
21 return _SYMBOLS[name];
22 } else {
23 return name;
24 }
25 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698