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 RUNTIME_VM_RAW_OBJECT_H_ | 5 #ifndef RUNTIME_VM_RAW_OBJECT_H_ |
6 #define RUNTIME_VM_RAW_OBJECT_H_ | 6 #define RUNTIME_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 1143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1154 | 1154 |
1155 Entry* first_entry() { return &ptr()->data()[0]; } | 1155 Entry* first_entry() { return &ptr()->data()[0]; } |
1156 | 1156 |
1157 friend class Object; | 1157 friend class Object; |
1158 }; | 1158 }; |
1159 | 1159 |
1160 | 1160 |
1161 class RawInstructions : public RawObject { | 1161 class RawInstructions : public RawObject { |
1162 RAW_HEAP_OBJECT_IMPLEMENTATION(Instructions); | 1162 RAW_HEAP_OBJECT_IMPLEMENTATION(Instructions); |
1163 | 1163 |
1164 int32_t size_; | 1164 // Instructions size in bytes and flags. |
| 1165 // Currently, only flag indicates 1 or 2 entry points. |
| 1166 uint32_t size_and_flags_; |
1165 | 1167 |
1166 // Variable length data follows here. | 1168 // Variable length data follows here. |
1167 uint8_t* data() { OPEN_ARRAY_START(uint8_t, uint8_t); } | 1169 uint8_t* data() { OPEN_ARRAY_START(uint8_t, uint8_t); } |
1168 | 1170 |
1169 // Private helper function used while visiting stack frames. The | 1171 // Private helper function used while visiting stack frames. The |
1170 // code which iterates over dart frames is also called during GC and | 1172 // code which iterates over dart frames is also called during GC and |
1171 // is not allowed to create handles. | 1173 // is not allowed to create handles. |
1172 static bool ContainsPC(RawInstructions* raw_instr, uword pc); | 1174 static bool ContainsPC(RawInstructions* raw_instr, uword pc); |
1173 | 1175 |
1174 friend class RawCode; | 1176 friend class RawCode; |
(...skipping 1199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2374 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == | 2376 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == |
2375 kTypedDataInt8ArrayViewCid + 15); | 2377 kTypedDataInt8ArrayViewCid + 15); |
2376 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); | 2378 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); |
2377 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); | 2379 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); |
2378 return (kNullCid - kTypedDataInt8ArrayCid); | 2380 return (kNullCid - kTypedDataInt8ArrayCid); |
2379 } | 2381 } |
2380 | 2382 |
2381 } // namespace dart | 2383 } // namespace dart |
2382 | 2384 |
2383 #endif // RUNTIME_VM_RAW_OBJECT_H_ | 2385 #endif // RUNTIME_VM_RAW_OBJECT_H_ |
OLD | NEW |