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 |
(...skipping 11 matching lines...) Expand all Loading... |
22 FieldElement, | 22 FieldElement, |
23 MemberElement, | 23 MemberElement, |
24 MixinApplicationElement; | 24 MixinApplicationElement; |
25 import '../elements/entities.dart'; | 25 import '../elements/entities.dart'; |
26 import '../elements/entity_utils.dart' as utils; | 26 import '../elements/entity_utils.dart' as utils; |
27 import '../elements/jumps.dart'; | 27 import '../elements/jumps.dart'; |
28 import '../elements/names.dart'; | 28 import '../elements/names.dart'; |
29 import '../elements/resolution_types.dart'; | 29 import '../elements/resolution_types.dart'; |
30 import '../elements/types.dart'; | 30 import '../elements/types.dart'; |
31 import '../js/js.dart' as jsAst; | 31 import '../js/js.dart' as jsAst; |
| 32 import '../js_model/closure.dart'; |
32 import '../universe/call_structure.dart' show CallStructure; | 33 import '../universe/call_structure.dart' show CallStructure; |
33 import '../universe/selector.dart' show Selector, SelectorKind; | 34 import '../universe/selector.dart' show Selector, SelectorKind; |
34 import '../universe/world_builder.dart' show CodegenWorldBuilder; | 35 import '../universe/world_builder.dart' show CodegenWorldBuilder; |
35 import 'package:front_end/src/fasta/scanner/characters.dart'; | 36 import 'package:front_end/src/fasta/scanner/characters.dart'; |
36 import '../util/util.dart'; | 37 import '../util/util.dart'; |
37 import '../world.dart' show ClosedWorld; | 38 import '../world.dart' show ClosedWorld; |
38 import 'backend.dart'; | 39 import 'backend.dart'; |
39 import 'constant_system_javascript.dart'; | 40 import 'constant_system_javascript.dart'; |
40 import 'native_data.dart'; | 41 import 'native_data.dart'; |
41 import 'runtime_types.dart'; | 42 import 'runtime_types.dart'; |
(...skipping 2195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2237 void addSuggestion(String original, String suggestion) { | 2238 void addSuggestion(String original, String suggestion) { |
2238 assert(!_suggestedNames.containsKey(original)); | 2239 assert(!_suggestedNames.containsKey(original)); |
2239 _suggestedNames[original] = suggestion; | 2240 _suggestedNames[original] = suggestion; |
2240 } | 2241 } |
2241 | 2242 |
2242 bool hasSuggestion(String original) => _suggestedNames.containsKey(original); | 2243 bool hasSuggestion(String original) => _suggestedNames.containsKey(original); |
2243 bool isSuggestion(String candidate) { | 2244 bool isSuggestion(String candidate) { |
2244 return _suggestedNames.containsValue(candidate); | 2245 return _suggestedNames.containsValue(candidate); |
2245 } | 2246 } |
2246 } | 2247 } |
OLD | NEW |