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 '../constants/values.dart'; | 14 import '../constants/values.dart'; |
15 import '../common_elements.dart' show CommonElements; | 15 import '../common_elements.dart' show CommonElements; |
16 import '../diagnostics/invariant.dart' show DEBUG_MODE; | 16 import '../diagnostics/invariant.dart' show DEBUG_MODE; |
17 import '../elements/elements.dart'; | 17 import '../elements/elements.dart'; |
18 import '../elements/entities.dart'; | 18 import '../elements/entities.dart'; |
19 import '../elements/entity_utils.dart' as utils; | 19 import '../elements/entity_utils.dart' as utils; |
| 20 import '../elements/jumps.dart'; |
20 import '../elements/names.dart'; | 21 import '../elements/names.dart'; |
21 import '../elements/resolution_types.dart'; | 22 import '../elements/resolution_types.dart'; |
22 import '../elements/types.dart'; | 23 import '../elements/types.dart'; |
23 import '../js/js.dart' as jsAst; | 24 import '../js/js.dart' as jsAst; |
24 import '../tree/tree.dart'; | 25 import '../tree/tree.dart'; |
25 import '../universe/call_structure.dart' show CallStructure; | 26 import '../universe/call_structure.dart' show CallStructure; |
26 import '../universe/selector.dart' show Selector, SelectorKind; | 27 import '../universe/selector.dart' show Selector, SelectorKind; |
27 import '../universe/world_builder.dart' show CodegenWorldBuilder; | 28 import '../universe/world_builder.dart' show CodegenWorldBuilder; |
28 import 'package:front_end/src/fasta/scanner/characters.dart'; | 29 import 'package:front_end/src/fasta/scanner/characters.dart'; |
29 import '../util/util.dart'; | 30 import '../util/util.dart'; |
(...skipping 2208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2238 void addSuggestion(String original, String suggestion) { | 2239 void addSuggestion(String original, String suggestion) { |
2239 assert(!_suggestedNames.containsKey(original)); | 2240 assert(!_suggestedNames.containsKey(original)); |
2240 _suggestedNames[original] = suggestion; | 2241 _suggestedNames[original] = suggestion; |
2241 } | 2242 } |
2242 | 2243 |
2243 bool hasSuggestion(String original) => _suggestedNames.containsKey(original); | 2244 bool hasSuggestion(String original) => _suggestedNames.containsKey(original); |
2244 bool isSuggestion(String candidate) { | 2245 bool isSuggestion(String candidate) { |
2245 return _suggestedNames.containsValue(candidate); | 2246 return _suggestedNames.containsValue(candidate); |
2246 } | 2247 } |
2247 } | 2248 } |
OLD | NEW |