| 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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(Bool) \ | 52 V(Bool) \ |
| 53 V(Array) \ | 53 V(Array) \ |
| 54 V(ImmutableArray) \ | 54 V(ImmutableArray) \ |
| 55 V(ByteBuffer) \ |
| 55 V(Closure) \ | 56 V(Closure) \ |
| 56 V(Stacktrace) \ | 57 V(Stacktrace) \ |
| 57 V(JSRegExp) \ | 58 V(JSRegExp) \ |
| 58 | 59 |
| 59 #define CLASS_LIST(V) \ | 60 #define CLASS_LIST(V) \ |
| 60 V(Object) \ | 61 V(Object) \ |
| 61 CLASS_LIST_NO_OBJECT(V) | 62 CLASS_LIST_NO_OBJECT(V) |
| 62 | 63 |
| 63 | 64 |
| 64 // Forward declarations. | 65 // Forward declarations. |
| (...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 711 | 712 |
| 712 friend class RawImmutableArray; | 713 friend class RawImmutableArray; |
| 713 }; | 714 }; |
| 714 | 715 |
| 715 | 716 |
| 716 class RawImmutableArray : public RawArray { | 717 class RawImmutableArray : public RawArray { |
| 717 RAW_HEAP_OBJECT_IMPLEMENTATION(ImmutableArray); | 718 RAW_HEAP_OBJECT_IMPLEMENTATION(ImmutableArray); |
| 718 }; | 719 }; |
| 719 | 720 |
| 720 | 721 |
| 722 class RawByteBuffer : public RawInstance { |
| 723 RAW_HEAP_OBJECT_IMPLEMENTATION(ByteBuffer); |
| 724 |
| 725 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->length_); } |
| 726 RawSmi* length_; |
| 727 RawObject** to() { return reinterpret_cast<RawObject**>(&ptr()->length_); } |
| 728 uint8_t* data_; |
| 729 }; |
| 730 |
| 731 |
| 721 class RawClosure : public RawInstance { | 732 class RawClosure : public RawInstance { |
| 722 RAW_HEAP_OBJECT_IMPLEMENTATION(Closure); | 733 RAW_HEAP_OBJECT_IMPLEMENTATION(Closure); |
| 723 | 734 |
| 724 RawObject** from() { | 735 RawObject** from() { |
| 725 return reinterpret_cast<RawObject**>(&ptr()->type_arguments_); | 736 return reinterpret_cast<RawObject**>(&ptr()->type_arguments_); |
| 726 } | 737 } |
| 727 RawTypeArguments* type_arguments_; | 738 RawTypeArguments* type_arguments_; |
| 728 RawFunction* function_; | 739 RawFunction* function_; |
| 729 RawContext* context_; | 740 RawContext* context_; |
| 730 // TODO(iposva): Remove this temporary hack. | 741 // TODO(iposva): Remove this temporary hack. |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 769 intptr_t type_; // Uninitialized, simple or complex. | 780 intptr_t type_; // Uninitialized, simple or complex. |
| 770 intptr_t flags_; // Represents global/local, case insensitive, multiline. | 781 intptr_t flags_; // Represents global/local, case insensitive, multiline. |
| 771 | 782 |
| 772 // Variable length data follows here. | 783 // Variable length data follows here. |
| 773 uint8_t data_[0]; | 784 uint8_t data_[0]; |
| 774 }; | 785 }; |
| 775 | 786 |
| 776 } // namespace dart | 787 } // namespace dart |
| 777 | 788 |
| 778 #endif // VM_RAW_OBJECT_H_ | 789 #endif // VM_RAW_OBJECT_H_ |
| OLD | NEW |