| 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 647 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 712 | 713 |
| 713 friend class RawImmutableArray; | 714 friend class RawImmutableArray; |
| 714 }; | 715 }; |
| 715 | 716 |
| 716 | 717 |
| 717 class RawImmutableArray : public RawArray { | 718 class RawImmutableArray : public RawArray { |
| 718 RAW_HEAP_OBJECT_IMPLEMENTATION(ImmutableArray); | 719 RAW_HEAP_OBJECT_IMPLEMENTATION(ImmutableArray); |
| 719 }; | 720 }; |
| 720 | 721 |
| 721 | 722 |
| 723 class RawByteBuffer : public RawInstance { |
| 724 RAW_HEAP_OBJECT_IMPLEMENTATION(ByteBuffer); |
| 725 |
| 726 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->length_); } |
| 727 RawSmi* length_; |
| 728 RawObject** to() { |
| 729 return reinterpret_cast<RawObject**>(&ptr()->length_); |
| 730 } |
| 731 uint8_t* data_; |
| 732 }; |
| 733 |
| 734 |
| 722 class RawClosure : public RawInstance { | 735 class RawClosure : public RawInstance { |
| 723 RAW_HEAP_OBJECT_IMPLEMENTATION(Closure); | 736 RAW_HEAP_OBJECT_IMPLEMENTATION(Closure); |
| 724 | 737 |
| 725 RawObject** from() { | 738 RawObject** from() { |
| 726 return reinterpret_cast<RawObject**>(&ptr()->type_arguments_); | 739 return reinterpret_cast<RawObject**>(&ptr()->type_arguments_); |
| 727 } | 740 } |
| 728 RawTypeArguments* type_arguments_; | 741 RawTypeArguments* type_arguments_; |
| 729 RawFunction* function_; | 742 RawFunction* function_; |
| 730 RawContext* context_; | 743 RawContext* context_; |
| 731 // TODO(iposva): Remove this temporary hack. | 744 // TODO(iposva): Remove this temporary hack. |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 770 intptr_t type_; // Uninitialized, simple or complex. | 783 intptr_t type_; // Uninitialized, simple or complex. |
| 771 intptr_t flags_; // Represents global/local, case insensitive, multiline. | 784 intptr_t flags_; // Represents global/local, case insensitive, multiline. |
| 772 | 785 |
| 773 // Variable length data follows here. | 786 // Variable length data follows here. |
| 774 uint8_t data_[0]; | 787 uint8_t data_[0]; |
| 775 }; | 788 }; |
| 776 | 789 |
| 777 } // namespace dart | 790 } // namespace dart |
| 778 | 791 |
| 779 #endif // VM_RAW_OBJECT_H_ | 792 #endif // VM_RAW_OBJECT_H_ |
| OLD | NEW |