| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 "platform/assert.h" | 8 #include "platform/assert.h" |
| 9 #include "vm/globals.h" | 9 #include "vm/globals.h" |
| 10 #include "vm/token.h" | 10 #include "vm/token.h" |
| (...skipping 876 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 887 | 887 |
| 888 class RawContextScope : public RawObject { | 888 class RawContextScope : public RawObject { |
| 889 RAW_HEAP_OBJECT_IMPLEMENTATION(ContextScope); | 889 RAW_HEAP_OBJECT_IMPLEMENTATION(ContextScope); |
| 890 | 890 |
| 891 // TODO(iposva): Switch to convential enum offset based structure to avoid | 891 // TODO(iposva): Switch to convential enum offset based structure to avoid |
| 892 // alignment mishaps. | 892 // alignment mishaps. |
| 893 struct VariableDesc { | 893 struct VariableDesc { |
| 894 RawSmi* token_pos; | 894 RawSmi* token_pos; |
| 895 RawString* name; | 895 RawString* name; |
| 896 RawBool* is_final; | 896 RawBool* is_final; |
| 897 RawAbstractType* type; | 897 RawBool* is_const; |
| 898 union { |
| 899 RawAbstractType* type; |
| 900 RawInstance* value; // iff is_const is true |
| 901 }; |
| 898 RawSmi* context_index; | 902 RawSmi* context_index; |
| 899 RawSmi* context_level; | 903 RawSmi* context_level; |
| 900 }; | 904 }; |
| 901 | 905 |
| 902 intptr_t num_variables_; | 906 intptr_t num_variables_; |
| 903 | 907 |
| 904 // Variable length data follows here. | 908 // Variable length data follows here. |
| 905 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->data_[0]); } | 909 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->data_[0]); } |
| 906 RawObject* data_[0]; | 910 RawObject* data_[0]; |
| 907 RawObject** to(intptr_t num_vars) { | 911 RawObject** to(intptr_t num_vars) { |
| (...skipping 702 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1610 kExternalUint64ArrayCid == kExternalInt8ArrayCid + 7 && | 1614 kExternalUint64ArrayCid == kExternalInt8ArrayCid + 7 && |
| 1611 kExternalFloat32ArrayCid == kExternalInt8ArrayCid + 8 && | 1615 kExternalFloat32ArrayCid == kExternalInt8ArrayCid + 8 && |
| 1612 kExternalFloat64ArrayCid == kExternalInt8ArrayCid + 9 && | 1616 kExternalFloat64ArrayCid == kExternalInt8ArrayCid + 9 && |
| 1613 kStacktraceCid == kExternalInt8ArrayCid + 10); | 1617 kStacktraceCid == kExternalInt8ArrayCid + 10); |
| 1614 return (index >= kExternalInt8ArrayCid && index <= kExternalFloat64ArrayCid); | 1618 return (index >= kExternalInt8ArrayCid && index <= kExternalFloat64ArrayCid); |
| 1615 } | 1619 } |
| 1616 | 1620 |
| 1617 } // namespace dart | 1621 } // namespace dart |
| 1618 | 1622 |
| 1619 #endif // VM_RAW_OBJECT_H_ | 1623 #endif // VM_RAW_OBJECT_H_ |
| OLD | NEW |