| 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 1419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1430 friend class Object; | 1430 friend class Object; |
| 1431 friend class RawClosureData; | 1431 friend class RawClosureData; |
| 1432 friend class SnapshotReader; | 1432 friend class SnapshotReader; |
| 1433 }; | 1433 }; |
| 1434 | 1434 |
| 1435 | 1435 |
| 1436 class RawICData : public RawObject { | 1436 class RawICData : public RawObject { |
| 1437 RAW_HEAP_OBJECT_IMPLEMENTATION(ICData); | 1437 RAW_HEAP_OBJECT_IMPLEMENTATION(ICData); |
| 1438 | 1438 |
| 1439 RawObject** from() { | 1439 RawObject** from() { |
| 1440 return reinterpret_cast<RawObject**>(&ptr()->owner_); | 1440 return reinterpret_cast<RawObject**>(&ptr()->ic_data_); |
| 1441 } |
| 1442 RawArray* ic_data_; // Contains class-ids, target and count. |
| 1443 RawString* target_name_; // Name of target function. |
| 1444 RawArray* args_descriptor_; // Arguments descriptor. |
| 1445 RawObject** to_precompiled_snapshot() { |
| 1446 return reinterpret_cast<RawObject**>(&ptr()->args_descriptor_); |
| 1441 } | 1447 } |
| 1442 RawObject* owner_; // Parent/calling function or original IC of cloned IC. | 1448 RawObject* owner_; // Parent/calling function or original IC of cloned IC. |
| 1443 RawString* target_name_; // Name of target function. | |
| 1444 RawArray* args_descriptor_; // Arguments descriptor. | |
| 1445 RawArray* ic_data_; // Contains class-ids, target and count. | |
| 1446 RawObject** to() { | 1449 RawObject** to() { |
| 1447 return reinterpret_cast<RawObject**>(&ptr()->ic_data_); | 1450 return reinterpret_cast<RawObject**>(&ptr()->owner_); |
| 1448 } | 1451 } |
| 1449 int32_t deopt_id_; // Deoptimization id corresponding to this IC. | 1452 int32_t deopt_id_; // Deoptimization id corresponding to this IC. |
| 1450 uint32_t state_bits_; // Number of arguments tested in IC, deopt reasons, | 1453 uint32_t state_bits_; // Number of arguments tested in IC, deopt reasons, |
| 1451 // is closure call, JS warning issued, range feedback. | 1454 // is closure call, JS warning issued, range feedback. |
| 1452 }; | 1455 }; |
| 1453 | 1456 |
| 1454 | 1457 |
| 1455 class RawMegamorphicCache : public RawObject { | 1458 class RawMegamorphicCache : public RawObject { |
| 1456 RAW_HEAP_OBJECT_IMPLEMENTATION(MegamorphicCache); | 1459 RAW_HEAP_OBJECT_IMPLEMENTATION(MegamorphicCache); |
| 1457 | 1460 |
| (...skipping 887 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2345 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == | 2348 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == |
| 2346 kTypedDataInt8ArrayViewCid + 15); | 2349 kTypedDataInt8ArrayViewCid + 15); |
| 2347 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); | 2350 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); |
| 2348 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); | 2351 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); |
| 2349 return (kNullCid - kTypedDataInt8ArrayCid); | 2352 return (kNullCid - kTypedDataInt8ArrayCid); |
| 2350 } | 2353 } |
| 2351 | 2354 |
| 2352 } // namespace dart | 2355 } // namespace dart |
| 2353 | 2356 |
| 2354 #endif // VM_RAW_OBJECT_H_ | 2357 #endif // VM_RAW_OBJECT_H_ |
| OLD | NEW |