| OLD | NEW | 
|---|
| 1 // Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 /// Analysis to determine how to generate code for `LookupMap`s. | 5 /// Analysis to determine how to generate code for `LookupMap`s. | 
| 6 library compiler.src.js_backend.lookup_map_analysis; | 6 library compiler.src.js_backend.lookup_map_analysis; | 
| 7 | 7 | 
| 8 import 'package:pub_semver/pub_semver.dart'; | 8 import 'package:pub_semver/pub_semver.dart'; | 
| 9 | 9 | 
| 10 import '../common.dart'; | 10 import '../common.dart'; | 
| 11 import '../common_elements.dart'; | 11 import '../common_elements.dart'; | 
| 12 import '../common/backend_api.dart'; | 12 import '../common/backend_api.dart'; | 
| 13 import '../compile_time_constants.dart'; | 13 import '../compile_time_constants.dart'; | 
| 14 import '../constants/constant_system.dart'; | 14 import '../constants/constant_system.dart'; | 
| 15 import '../constants/values.dart' | 15 import '../constants/values.dart' | 
| 16     show | 16     show | 
| 17         ConstantValue, | 17         ConstantValue, | 
| 18         ConstructedConstantValue, | 18         ConstructedConstantValue, | 
| 19         ListConstantValue, | 19         ListConstantValue, | 
| 20         NullConstantValue, | 20         NullConstantValue, | 
| 21         StringConstantValue, | 21         StringConstantValue, | 
| 22         TypeConstantValue; | 22         TypeConstantValue; | 
| 23 import '../elements/elements.dart' show ClassElement, FieldElement; | 23 import '../elements/elements.dart' show ClassElement, FieldElement; | 
| 24 import '../elements/entities.dart'; | 24 import '../elements/entities.dart'; | 
| 25 import '../elements/resolution_types.dart' show ResolutionInterfaceType; | 25 import '../elements/resolution_types.dart' show ResolutionInterfaceType; | 
| 26 import '../options.dart'; |  | 
| 27 import '../universe/use.dart' show ConstantUse, StaticUse; | 26 import '../universe/use.dart' show ConstantUse, StaticUse; | 
| 28 import '../universe/world_impact.dart' | 27 import '../universe/world_impact.dart' | 
| 29     show WorldImpact, StagedWorldImpactBuilder; | 28     show WorldImpact, StagedWorldImpactBuilder; | 
| 30 import 'backend_helpers.dart'; | 29 import 'backend_helpers.dart'; | 
| 31 | 30 | 
| 32 /// Lookup map handling for resolution. | 31 /// Lookup map handling for resolution. | 
| 33 /// | 32 /// | 
| 34 /// This analysis checks for the import of `package:lookup_map/lookup_map.dart`, | 33 /// This analysis checks for the import of `package:lookup_map/lookup_map.dart`, | 
| 35 /// and if found, read the `_version` variable from it. | 34 /// and if found, read the `_version` variable from it. | 
| 36 /// | 35 /// | 
| (...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 510         original.fields[analysis._valueField] = keyValuePairs[1]; | 509         original.fields[analysis._valueField] = keyValuePairs[1]; | 
| 511       } | 510       } | 
| 512     } else { | 511     } else { | 
| 513       original.fields[analysis._entriesField] = | 512       original.fields[analysis._entriesField] = | 
| 514           new ListConstantValue(listType, keyValuePairs); | 513           new ListConstantValue(listType, keyValuePairs); | 
| 515     } | 514     } | 
| 516   } | 515   } | 
| 517 } | 516 } | 
| 518 | 517 | 
| 519 final _validLookupMapVersionConstraint = new VersionConstraint.parse('^0.0.1'); | 518 final _validLookupMapVersionConstraint = new VersionConstraint.parse('^0.0.1'); | 
| OLD | NEW | 
|---|