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/atomic.h" | 9 #include "vm/atomic.h" |
10 #include "vm/globals.h" | 10 #include "vm/globals.h" |
(...skipping 1069 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1080 Entry* first_entry() { return &ptr()->data()[0]; } | 1080 Entry* first_entry() { return &ptr()->data()[0]; } |
1081 | 1081 |
1082 friend class Object; | 1082 friend class Object; |
1083 friend class SnapshotReader; | 1083 friend class SnapshotReader; |
1084 }; | 1084 }; |
1085 | 1085 |
1086 | 1086 |
1087 class RawInstructions : public RawObject { | 1087 class RawInstructions : public RawObject { |
1088 RAW_HEAP_OBJECT_IMPLEMENTATION(Instructions); | 1088 RAW_HEAP_OBJECT_IMPLEMENTATION(Instructions); |
1089 | 1089 |
1090 RawObject** from() { | |
1091 return reinterpret_cast<RawObject**>(&ptr()->code_); | |
rmacnak
2015/09/29 16:50:12
Need to exclude code_ when running precompiled or
Cutch
2015/09/29 23:24:29
This is handled inside RawInstructions::VisitInstr
| |
1092 } | |
1093 RawCode* code_; | |
1094 RawObject** to() { | |
1095 return reinterpret_cast<RawObject**>(&ptr()->code_); | |
1096 } | |
1097 | |
1090 int32_t size_; | 1098 int32_t size_; |
1091 | 1099 |
1092 // Variable length data follows here. | 1100 // Variable length data follows here. |
1093 uint8_t* data() { OPEN_ARRAY_START(uint8_t, uint8_t); } | 1101 uint8_t* data() { OPEN_ARRAY_START(uint8_t, uint8_t); } |
1094 | 1102 |
1095 // Private helper function used while visiting stack frames. The | 1103 // Private helper function used while visiting stack frames. The |
1096 // code which iterates over dart frames is also called during GC and | 1104 // code which iterates over dart frames is also called during GC and |
1097 // is not allowed to create handles. | 1105 // is not allowed to create handles. |
1098 static bool ContainsPC(RawInstructions* raw_instr, uword pc); | 1106 static bool ContainsPC(RawInstructions* raw_instr, uword pc); |
1099 | 1107 |
(...skipping 1132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2232 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == | 2240 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == |
2233 kTypedDataInt8ArrayViewCid + 15); | 2241 kTypedDataInt8ArrayViewCid + 15); |
2234 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); | 2242 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); |
2235 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); | 2243 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); |
2236 return (kNullCid - kTypedDataInt8ArrayCid); | 2244 return (kNullCid - kTypedDataInt8ArrayCid); |
2237 } | 2245 } |
2238 | 2246 |
2239 } // namespace dart | 2247 } // namespace dart |
2240 | 2248 |
2241 #endif // VM_RAW_OBJECT_H_ | 2249 #endif // VM_RAW_OBJECT_H_ |
OLD | NEW |