| OLD | NEW |
| 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 library dart._js_names; | 5 library dart._js_names; |
| 6 | 6 |
| 7 import 'dart:_foreign_helper' show | 7 import 'dart:_foreign_helper' show |
| 8 JS, | 8 JS, |
| 9 JS_GET_NAME; | 9 JS_GET_NAME; |
| 10 | 10 |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 var names = JS('=Object', 'init.mangledGlobalNames'); | 97 var names = JS('=Object', 'init.mangledGlobalNames'); |
| 98 return JsCache.fetch(names, name); | 98 return JsCache.fetch(names, name); |
| 99 } | 99 } |
| 100 | 100 |
| 101 String unmangleAllIdentifiersIfPreservedAnyways(String str) { | 101 String unmangleAllIdentifiersIfPreservedAnyways(String str) { |
| 102 return JS("String", | 102 return JS("String", |
| 103 r"(#).replace(/[^<,> ]+/g," | 103 r"(#).replace(/[^<,> ]+/g," |
| 104 r"function(m) { return init.mangledGlobalNames[m] || m; })", | 104 r"function(m) { return init.mangledGlobalNames[m] || m; })", |
| 105 str); | 105 str); |
| 106 } | 106 } |
| OLD | NEW |