| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 js_backend.namer; | 5 library js_backend.namer; |
| 6 | 6 |
| 7 import 'dart:collection' show HashMap; | 7 import 'dart:collection' show HashMap; |
| 8 | 8 |
| 9 import 'package:js_runtime/shared/embedded_names.dart' show JsGetName; | 9 import 'package:js_runtime/shared/embedded_names.dart' show JsGetName; |
| 10 | 10 |
| 11 import '../closure.dart'; | 11 import '../closure.dart'; |
| 12 import '../common.dart'; | 12 import '../common.dart'; |
| 13 import '../common/names.dart' show Identifiers, Selectors; | 13 import '../common/names.dart' show Identifiers, Selectors; |
| 14 import '../compiler.dart' show Compiler; | 14 import '../compiler.dart' show Compiler; |
| 15 import '../constants/values.dart'; | 15 import '../constants/values.dart'; |
| 16 import '../core_types.dart' show CommonElements; | 16 import '../core_types.dart' show CommonElements; |
| 17 import '../dart_types.dart'; | 17 import '../elements/resolution_types.dart'; |
| 18 import '../diagnostics/invariant.dart' show DEBUG_MODE; | 18 import '../diagnostics/invariant.dart' show DEBUG_MODE; |
| 19 import '../elements/elements.dart'; | 19 import '../elements/elements.dart'; |
| 20 import '../elements/entities.dart'; | 20 import '../elements/entities.dart'; |
| 21 import '../js/js.dart' as jsAst; | 21 import '../js/js.dart' as jsAst; |
| 22 import '../js/js.dart' show js; | 22 import '../js/js.dart' show js; |
| 23 import '../tree/tree.dart'; | 23 import '../tree/tree.dart'; |
| 24 import '../universe/call_structure.dart' show CallStructure; | 24 import '../universe/call_structure.dart' show CallStructure; |
| 25 import '../universe/selector.dart' show Selector, SelectorKind; | 25 import '../universe/selector.dart' show Selector, SelectorKind; |
| 26 import '../util/characters.dart'; | 26 import '../util/characters.dart'; |
| 27 import '../util/util.dart'; | 27 import '../util/util.dart'; |
| (...skipping 2067 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2095 void addSuggestion(String original, String suggestion) { | 2095 void addSuggestion(String original, String suggestion) { |
| 2096 assert(!_suggestedNames.containsKey(original)); | 2096 assert(!_suggestedNames.containsKey(original)); |
| 2097 _suggestedNames[original] = suggestion; | 2097 _suggestedNames[original] = suggestion; |
| 2098 } | 2098 } |
| 2099 | 2099 |
| 2100 bool hasSuggestion(String original) => _suggestedNames.containsKey(original); | 2100 bool hasSuggestion(String original) => _suggestedNames.containsKey(original); |
| 2101 bool isSuggestion(String candidate) { | 2101 bool isSuggestion(String candidate) { |
| 2102 return _suggestedNames.containsValue(candidate); | 2102 return _suggestedNames.containsValue(candidate); |
| 2103 } | 2103 } |
| 2104 } | 2104 } |
| OLD | NEW |