OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 // This code was auto-generated, is not intended to be edited, and is subject to | 5 // This code was auto-generated, is not intended to be edited, and is subject to |
6 // significant change. Please see the README file for more information. | 6 // significant change. Please see the README file for more information. |
7 | 7 |
8 library engine.constant; | 8 library engine.constant; |
9 | 9 |
10 import 'dart:collection'; | 10 import 'dart:collection'; |
(...skipping 3563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3574 return isIdentical(rightOperand); | 3574 return isIdentical(rightOperand); |
3575 } | 3575 } |
3576 | 3576 |
3577 @override | 3577 @override |
3578 BoolState isIdentical(InstanceState rightOperand) { | 3578 BoolState isIdentical(InstanceState rightOperand) { |
3579 if (rightOperand is DynamicState) { | 3579 if (rightOperand is DynamicState) { |
3580 return BoolState.UNKNOWN_VALUE; | 3580 return BoolState.UNKNOWN_VALUE; |
3581 } | 3581 } |
3582 return BoolState.from(this == rightOperand); | 3582 return BoolState.from(this == rightOperand); |
3583 } | 3583 } |
| 3584 |
| 3585 @override |
| 3586 String toString() { |
| 3587 StringBuffer buffer = new StringBuffer(); |
| 3588 List<String> fieldNames = _fieldMap.keys.toList(); |
| 3589 fieldNames.sort(); |
| 3590 bool first = true; |
| 3591 for (String fieldName in fieldNames) { |
| 3592 if (first) { |
| 3593 first = false; |
| 3594 } else { |
| 3595 buffer.write('; '); |
| 3596 } |
| 3597 buffer.write(fieldName); |
| 3598 buffer.write(' = '); |
| 3599 buffer.write(_fieldMap[fieldName]); |
| 3600 }; |
| 3601 return buffer.toString(); |
| 3602 } |
3584 } | 3603 } |
3585 | 3604 |
3586 /** | 3605 /** |
3587 * The class `InstanceState` defines the behavior of objects representing the st
ate of a Dart | 3606 * The class `InstanceState` defines the behavior of objects representing the st
ate of a Dart |
3588 * object. | 3607 * object. |
3589 */ | 3608 */ |
3590 abstract class InstanceState { | 3609 abstract class InstanceState { |
3591 /** | 3610 /** |
3592 * If this represents a generic dart object, return a map from its fieldnames
to their values. | 3611 * If this represents a generic dart object, return a map from its fieldnames
to their values. |
3593 * Otherwise return null. | 3612 * Otherwise return null. |
(...skipping 993 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4587 return isIdentical(rightOperand); | 4606 return isIdentical(rightOperand); |
4588 } | 4607 } |
4589 | 4608 |
4590 @override | 4609 @override |
4591 BoolState isIdentical(InstanceState rightOperand) { | 4610 BoolState isIdentical(InstanceState rightOperand) { |
4592 if (rightOperand is DynamicState) { | 4611 if (rightOperand is DynamicState) { |
4593 return BoolState.UNKNOWN_VALUE; | 4612 return BoolState.UNKNOWN_VALUE; |
4594 } | 4613 } |
4595 return BoolState.from(this == rightOperand); | 4614 return BoolState.from(this == rightOperand); |
4596 } | 4615 } |
| 4616 |
| 4617 @override |
| 4618 String toString() { |
| 4619 StringBuffer buffer = new StringBuffer(); |
| 4620 buffer.write('['); |
| 4621 bool first = true; |
| 4622 _elements.forEach((DartObjectImpl element) { |
| 4623 if (first) { |
| 4624 first = false; |
| 4625 } else { |
| 4626 buffer.write(', '); |
| 4627 } |
| 4628 buffer.write(element); |
| 4629 }); |
| 4630 buffer.write(']'); |
| 4631 return buffer.toString(); |
| 4632 } |
4597 } | 4633 } |
4598 | 4634 |
4599 /** | 4635 /** |
4600 * The unique instance of the class `ListState` represents the state of an objec
t representing | 4636 * The unique instance of the class `ListState` represents the state of an objec
t representing |
4601 * a map. | 4637 * a map. |
4602 */ | 4638 */ |
4603 class MapState extends InstanceState { | 4639 class MapState extends InstanceState { |
4604 /** | 4640 /** |
4605 * The entries in the map. | 4641 * The entries in the map. |
4606 */ | 4642 */ |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4680 return isIdentical(rightOperand); | 4716 return isIdentical(rightOperand); |
4681 } | 4717 } |
4682 | 4718 |
4683 @override | 4719 @override |
4684 BoolState isIdentical(InstanceState rightOperand) { | 4720 BoolState isIdentical(InstanceState rightOperand) { |
4685 if (rightOperand is DynamicState) { | 4721 if (rightOperand is DynamicState) { |
4686 return BoolState.UNKNOWN_VALUE; | 4722 return BoolState.UNKNOWN_VALUE; |
4687 } | 4723 } |
4688 return BoolState.from(this == rightOperand); | 4724 return BoolState.from(this == rightOperand); |
4689 } | 4725 } |
| 4726 |
| 4727 @override |
| 4728 String toString() { |
| 4729 StringBuffer buffer = new StringBuffer(); |
| 4730 buffer.write('{'); |
| 4731 bool first = true; |
| 4732 _entries.forEach((DartObjectImpl key, DartObjectImpl value) { |
| 4733 if (first) { |
| 4734 first = false; |
| 4735 } else { |
| 4736 buffer.write(', '); |
| 4737 } |
| 4738 buffer.write(key); |
| 4739 buffer.write(' = '); |
| 4740 buffer.write(value); |
| 4741 }); |
| 4742 buffer.write('}'); |
| 4743 return buffer.toString(); |
| 4744 } |
4690 } | 4745 } |
4691 | 4746 |
4692 /** | 4747 /** |
4693 * The unique instance of the class `NullState` represents the state of the valu
e 'null'. | 4748 * The unique instance of the class `NullState` represents the state of the valu
e 'null'. |
4694 */ | 4749 */ |
4695 class NullState extends InstanceState { | 4750 class NullState extends InstanceState { |
4696 /** | 4751 /** |
4697 * An instance representing the boolean value 'true'. | 4752 * An instance representing the boolean value 'true'. |
4698 */ | 4753 */ |
4699 static NullState NULL_STATE = new NullState(); | 4754 static NullState NULL_STATE = new NullState(); |
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5186 return BoolState.from(_element == rightElement); | 5241 return BoolState.from(_element == rightElement); |
5187 } else if (rightOperand is DynamicState) { | 5242 } else if (rightOperand is DynamicState) { |
5188 return BoolState.UNKNOWN_VALUE; | 5243 return BoolState.UNKNOWN_VALUE; |
5189 } | 5244 } |
5190 return BoolState.FALSE_STATE; | 5245 return BoolState.FALSE_STATE; |
5191 } | 5246 } |
5192 | 5247 |
5193 @override | 5248 @override |
5194 String toString() => _element == null ? "-unknown-" : _element.name; | 5249 String toString() => _element == null ? "-unknown-" : _element.name; |
5195 } | 5250 } |
OLD | NEW |