Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(294)

Side by Side Diff: runtime/vm/raw_object.h

Issue 1168483003: Thread-local store buffers, v2 (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address review comments. Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/scavenger.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/scavenger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698