| 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 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 501 void StorePointer(type const* addr, type value) { | 501 void StorePointer(type const* addr, type value) { |
| 502 #if defined(DEBUG) | 502 #if defined(DEBUG) |
| 503 ValidateOverwrittenPointer(*addr); | 503 ValidateOverwrittenPointer(*addr); |
| 504 #endif // DEBUG | 504 #endif // DEBUG |
| 505 VerifiedMemory::Write(const_cast<type*>(addr), value); | 505 VerifiedMemory::Write(const_cast<type*>(addr), value); |
| 506 // Filter stores based on source and target. | 506 // Filter stores based on source and target. |
| 507 if (!value->IsHeapObject()) return; | 507 if (!value->IsHeapObject()) return; |
| 508 if (value->IsNewObject() && this->IsOldObject() && | 508 if (value->IsNewObject() && this->IsOldObject() && |
| 509 !this->IsRemembered()) { | 509 !this->IsRemembered()) { |
| 510 this->SetRememberedBit(); | 510 this->SetRememberedBit(); |
| 511 Isolate::Current()->store_buffer()->AddObject(this); | 511 Thread::Current()->StoreBufferAddObject(this); |
| 512 } | 512 } |
| 513 } | 513 } |
| 514 | 514 |
| 515 // Use for storing into an explicitly Smi-typed field of an object | 515 // Use for storing into an explicitly Smi-typed field of an object |
| 516 // (i.e., both the previous and new value are Smis). | 516 // (i.e., both the previous and new value are Smis). |
| 517 void StoreSmi(RawSmi* const* addr, RawSmi* value) { | 517 void StoreSmi(RawSmi* const* addr, RawSmi* value) { |
| 518 #if defined(DEBUG) | 518 #if defined(DEBUG) |
| 519 ValidateOverwrittenSmi(*addr); | 519 ValidateOverwrittenSmi(*addr); |
| 520 #endif // DEBUG | 520 #endif // DEBUG |
| 521 // Can't use Contains, as array length is initialized through this method. | 521 // Can't use Contains, as array length is initialized through this method. |
| (...skipping 1615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2137 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == | 2137 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == |
| 2138 kTypedDataInt8ArrayViewCid + 15); | 2138 kTypedDataInt8ArrayViewCid + 15); |
| 2139 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); | 2139 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); |
| 2140 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); | 2140 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); |
| 2141 return (kNullCid - kTypedDataInt8ArrayCid); | 2141 return (kNullCid - kTypedDataInt8ArrayCid); |
| 2142 } | 2142 } |
| 2143 | 2143 |
| 2144 } // namespace dart | 2144 } // namespace dart |
| 2145 | 2145 |
| 2146 #endif // VM_RAW_OBJECT_H_ | 2146 #endif // VM_RAW_OBJECT_H_ |
| OLD | NEW |