Chromium Code Reviews| 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 #ifndef VM_RAW_OBJECT_H_ | 5 #ifndef VM_RAW_OBJECT_H_ |
| 6 #define VM_RAW_OBJECT_H_ | 6 #define VM_RAW_OBJECT_H_ |
| 7 | 7 |
| 8 #include "vm/assert.h" | 8 #include "vm/assert.h" |
| 9 #include "vm/globals.h" | 9 #include "vm/globals.h" |
| 10 #include "vm/snapshot.h" | 10 #include "vm/snapshot.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 42 V(Number) \ | 42 V(Number) \ |
| 43 V(Integer) \ | 43 V(Integer) \ |
| 44 V(Smi) \ | 44 V(Smi) \ |
| 45 V(Mint) \ | 45 V(Mint) \ |
| 46 V(Bigint) \ | 46 V(Bigint) \ |
| 47 V(Double) \ | 47 V(Double) \ |
| 48 V(String) \ | 48 V(String) \ |
| 49 V(OneByteString) \ | 49 V(OneByteString) \ |
| 50 V(TwoByteString) \ | 50 V(TwoByteString) \ |
| 51 V(FourByteString) \ | 51 V(FourByteString) \ |
| 52 V(ExternalOneByteString) \ | |
| 53 V(ExternalTwoByteString) \ | |
| 54 V(ExternalFourByteString) \ | |
| 52 V(Bool) \ | 55 V(Bool) \ |
| 53 V(Array) \ | 56 V(Array) \ |
| 54 V(ImmutableArray) \ | 57 V(ImmutableArray) \ |
| 55 V(Closure) \ | 58 V(Closure) \ |
| 56 V(Stacktrace) \ | 59 V(Stacktrace) \ |
| 57 V(JSRegExp) \ | 60 V(JSRegExp) \ |
| 58 | 61 |
| 59 #define CLASS_LIST(V) \ | 62 #define CLASS_LIST(V) \ |
| 60 V(Object) \ | 63 V(Object) \ |
| 61 CLASS_LIST_NO_OBJECT(V) | 64 CLASS_LIST_NO_OBJECT(V) |
| (...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 680 | 683 |
| 681 | 684 |
| 682 class RawFourByteString : public RawString { | 685 class RawFourByteString : public RawString { |
| 683 RAW_HEAP_OBJECT_IMPLEMENTATION(FourByteString); | 686 RAW_HEAP_OBJECT_IMPLEMENTATION(FourByteString); |
| 684 | 687 |
| 685 // Variable length data follows here. | 688 // Variable length data follows here. |
| 686 uint32_t data_[0]; | 689 uint32_t data_[0]; |
| 687 }; | 690 }; |
| 688 | 691 |
| 689 | 692 |
| 693 class RawExternalOneByteString : public RawString { | |
| 694 RAW_HEAP_OBJECT_IMPLEMENTATION(ExternalOneByteString); | |
| 695 | |
| 696 uint8_t* data_; | |
|
turnidge
2011/10/25 18:07:20
Out of curiosity, can we rely on external strings
cshapiro
2011/10/25 20:42:47
Certainly not. We inherit a length field from the
turnidge
2011/10/25 20:45:15
Ah, thanks.
| |
| 697 }; | |
| 698 | |
| 699 | |
| 700 class RawExternalTwoByteString : public RawString { | |
| 701 RAW_HEAP_OBJECT_IMPLEMENTATION(ExternalTwoByteString); | |
| 702 | |
| 703 uint16_t* data_; | |
| 704 }; | |
| 705 | |
| 706 | |
| 707 class RawExternalFourByteString : public RawString { | |
| 708 RAW_HEAP_OBJECT_IMPLEMENTATION(ExternalFourByteString); | |
| 709 | |
| 710 uint32_t* data_; | |
| 711 }; | |
| 712 | |
| 713 | |
| 690 class RawBool : public RawInstance { | 714 class RawBool : public RawInstance { |
| 691 RAW_HEAP_OBJECT_IMPLEMENTATION(Bool); | 715 RAW_HEAP_OBJECT_IMPLEMENTATION(Bool); |
| 692 | 716 |
| 693 bool value_; | 717 bool value_; |
| 694 }; | 718 }; |
| 695 | 719 |
| 696 | 720 |
| 697 class RawArray : public RawInstance { | 721 class RawArray : public RawInstance { |
| 698 RAW_HEAP_OBJECT_IMPLEMENTATION(Array); | 722 RAW_HEAP_OBJECT_IMPLEMENTATION(Array); |
| 699 | 723 |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 771 intptr_t type_; // Uninitialized, simple or complex. | 795 intptr_t type_; // Uninitialized, simple or complex. |
| 772 intptr_t flags_; // Represents global/local, case insensitive, multiline. | 796 intptr_t flags_; // Represents global/local, case insensitive, multiline. |
| 773 | 797 |
| 774 // Variable length data follows here. | 798 // Variable length data follows here. |
| 775 uint8_t data_[0]; | 799 uint8_t data_[0]; |
| 776 }; | 800 }; |
| 777 | 801 |
| 778 } // namespace dart | 802 } // namespace dart |
| 779 | 803 |
| 780 #endif // VM_RAW_OBJECT_H_ | 804 #endif // VM_RAW_OBJECT_H_ |
| OLD | NEW |