| 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 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 362 ptr()->tags_ = WatchedBit::update(false, tags); | 362 ptr()->tags_ = WatchedBit::update(false, tags); |
| 363 } | 363 } |
| 364 | 364 |
| 365 // Support for object tags. | 365 // Support for object tags. |
| 366 bool IsCanonical() const { | 366 bool IsCanonical() const { |
| 367 return CanonicalObjectTag::decode(ptr()->tags_); | 367 return CanonicalObjectTag::decode(ptr()->tags_); |
| 368 } | 368 } |
| 369 void SetCanonical() { | 369 void SetCanonical() { |
| 370 UpdateTagBit<CanonicalObjectTag>(true); | 370 UpdateTagBit<CanonicalObjectTag>(true); |
| 371 } | 371 } |
| 372 void ClearCanonical() { |
| 373 UpdateTagBit<CanonicalObjectTag>(false); |
| 374 } |
| 372 bool IsCreatedFromSnapshot() const { | 375 bool IsCreatedFromSnapshot() const { |
| 373 return CreatedFromSnapshotTag::decode(ptr()->tags_); | 376 return CreatedFromSnapshotTag::decode(ptr()->tags_); |
| 374 } | 377 } |
| 375 void SetCreatedFromSnapshot() { | 378 void SetCreatedFromSnapshot() { |
| 376 UpdateTagBit<CreatedFromSnapshotTag>(true); | 379 UpdateTagBit<CreatedFromSnapshotTag>(true); |
| 377 } | 380 } |
| 378 | 381 |
| 379 // Support for GC remembered bit. | 382 // Support for GC remembered bit. |
| 380 bool IsRemembered() const { | 383 bool IsRemembered() const { |
| 381 return RememberedBit::decode(ptr()->tags_); | 384 return RememberedBit::decode(ptr()->tags_); |
| (...skipping 1807 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2189 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == | 2192 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == |
| 2190 kTypedDataInt8ArrayViewCid + 15); | 2193 kTypedDataInt8ArrayViewCid + 15); |
| 2191 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); | 2194 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); |
| 2192 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); | 2195 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); |
| 2193 return (kNullCid - kTypedDataInt8ArrayCid); | 2196 return (kNullCid - kTypedDataInt8ArrayCid); |
| 2194 } | 2197 } |
| 2195 | 2198 |
| 2196 } // namespace dart | 2199 } // namespace dart |
| 2197 | 2200 |
| 2198 #endif // VM_RAW_OBJECT_H_ | 2201 #endif // VM_RAW_OBJECT_H_ |
| OLD | NEW |