| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 dart2js.serialization.util; | 5 library dart2js.serialization.util; |
| 6 | 6 |
| 7 import '../constants/expressions.dart'; |
| 7 import '../dart_types.dart'; | 8 import '../dart_types.dart'; |
| 8 import '../common/resolution.dart'; | |
| 9 import '../constants/expressions.dart'; | |
| 10 import '../elements/elements.dart'; | 9 import '../elements/elements.dart'; |
| 11 import '../resolution/access_semantics.dart'; | 10 import '../resolution/access_semantics.dart'; |
| 12 import '../resolution/operators.dart'; | 11 import '../resolution/operators.dart'; |
| 13 import '../resolution/send_structure.dart'; | 12 import '../resolution/send_structure.dart'; |
| 14 import '../universe/call_structure.dart'; | 13 import '../universe/call_structure.dart'; |
| 15 import '../universe/selector.dart'; | 14 import '../universe/selector.dart'; |
| 16 import '../universe/world_impact.dart'; | |
| 17 import '../universe/use.dart'; | |
| 18 import '../util/enumset.dart'; | |
| 19 | |
| 20 import 'keys.dart'; | 15 import 'keys.dart'; |
| 21 import 'serialization.dart'; | 16 import 'serialization.dart'; |
| 22 | 17 |
| 23 /// Serialize [name] into [encoder]. | 18 /// Serialize [name] into [encoder]. |
| 24 void serializeName(Name name, ObjectEncoder encoder) { | 19 void serializeName(Name name, ObjectEncoder encoder) { |
| 25 encoder.setString(Key.NAME, name.text); | 20 encoder.setString(Key.NAME, name.text); |
| 26 encoder.setBool(Key.IS_SETTER, name.isSetter); | 21 encoder.setBool(Key.IS_SETTER, name.isSetter); |
| 27 if (name.library != null) { | 22 if (name.library != null) { |
| 28 encoder.setElement(Key.LIBRARY, name.library); | 23 encoder.setElement(Key.LIBRARY, name.library); |
| 29 } | 24 } |
| (...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 472 case AccessKind.COMPOUND: | 467 case AccessKind.COMPOUND: |
| 473 CompoundAccessKind compoundAccessKind = | 468 CompoundAccessKind compoundAccessKind = |
| 474 decoder.getEnum(Key.SUB_KIND, CompoundAccessKind.values); | 469 decoder.getEnum(Key.SUB_KIND, CompoundAccessKind.values); |
| 475 Element getter = decoder.getElement(Key.GETTER); | 470 Element getter = decoder.getElement(Key.GETTER); |
| 476 Element setter = decoder.getElement(Key.SETTER); | 471 Element setter = decoder.getElement(Key.SETTER); |
| 477 return new CompoundAccessSemantics(compoundAccessKind, getter, setter); | 472 return new CompoundAccessSemantics(compoundAccessKind, getter, setter); |
| 478 case AccessKind.CONSTANT: | 473 case AccessKind.CONSTANT: |
| 479 throw new UnsupportedError('Unsupported access kind: $kind'); | 474 throw new UnsupportedError('Unsupported access kind: $kind'); |
| 480 } | 475 } |
| 481 } | 476 } |
| OLD | NEW |