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

Side by Side Diff: pkg/compiler/lib/src/js_backend/namer.dart

Issue 2996463002: Make minification Entity-friendly. (Closed)
Patch Set: . Created 3 years, 4 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
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 show 18 show
19 ClassElement, 19 ClassElement,
20 Element, 20 Element,
21 Elements, 21 Elements,
22 FieldElement,
23 MemberElement, 22 MemberElement,
24 MixinApplicationElement; 23 MixinApplicationElement;
25 import '../elements/entities.dart'; 24 import '../elements/entities.dart';
26 import '../elements/entity_utils.dart' as utils; 25 import '../elements/entity_utils.dart' as utils;
27 import '../elements/jumps.dart'; 26 import '../elements/jumps.dart';
28 import '../elements/names.dart'; 27 import '../elements/names.dart';
29 import '../elements/resolution_types.dart'; 28 import '../elements/resolution_types.dart';
30 import '../elements/types.dart'; 29 import '../elements/types.dart';
31 import '../js/js.dart' as jsAst; 30 import '../js/js.dart' as jsAst;
31 import '../js_model/closure.dart';
32 import '../universe/call_structure.dart' show CallStructure; 32 import '../universe/call_structure.dart' show CallStructure;
33 import '../universe/selector.dart' show Selector, SelectorKind; 33 import '../universe/selector.dart' show Selector, SelectorKind;
34 import '../universe/world_builder.dart' show CodegenWorldBuilder; 34 import '../universe/world_builder.dart' show CodegenWorldBuilder;
35 import 'package:front_end/src/fasta/scanner/characters.dart'; 35 import 'package:front_end/src/fasta/scanner/characters.dart';
36 import '../util/util.dart'; 36 import '../util/util.dart';
37 import '../world.dart' show ClosedWorld; 37 import '../world.dart' show ClosedWorld;
38 import 'backend.dart'; 38 import 'backend.dart';
39 import 'constant_system_javascript.dart'; 39 import 'constant_system_javascript.dart';
40 import 'native_data.dart'; 40 import 'native_data.dart';
41 import 'runtime_types.dart'; 41 import 'runtime_types.dart';
(...skipping 2195 matching lines...) Expand 10 before | Expand all | Expand 10 after
2237 void addSuggestion(String original, String suggestion) { 2237 void addSuggestion(String original, String suggestion) {
2238 assert(!_suggestedNames.containsKey(original)); 2238 assert(!_suggestedNames.containsKey(original));
2239 _suggestedNames[original] = suggestion; 2239 _suggestedNames[original] = suggestion;
2240 } 2240 }
2241 2241
2242 bool hasSuggestion(String original) => _suggestedNames.containsKey(original); 2242 bool hasSuggestion(String original) => _suggestedNames.containsKey(original);
2243 bool isSuggestion(String candidate) { 2243 bool isSuggestion(String candidate) {
2244 return _suggestedNames.containsValue(candidate); 2244 return _suggestedNames.containsValue(candidate);
2245 } 2245 }
2246 } 2246 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_backend/field_naming_mixin.dart ('k') | tests/compiler/dart2js_extra/dart2js_extra.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698