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

Side by Side Diff: src/spaces.h

Issue 6824078: Move most of the incremental marking write barrier to generated code. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: '' Created 9 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « src/serialize.cc ('k') | src/spaces.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 } 333 }
334 334
335 void set_owner(Space* space) { 335 void set_owner(Space* space) {
336 ASSERT((reinterpret_cast<intptr_t>(space) & kFailureTagMask) == 0); 336 ASSERT((reinterpret_cast<intptr_t>(space) & kFailureTagMask) == 0);
337 owner_ = reinterpret_cast<Address>(space) + kFailureTag; 337 owner_ = reinterpret_cast<Address>(space) + kFailureTag;
338 ASSERT((reinterpret_cast<intptr_t>(owner_) & kFailureTagMask) == 338 ASSERT((reinterpret_cast<intptr_t>(owner_) & kFailureTagMask) ==
339 kFailureTag); 339 kFailureTag);
340 } 340 }
341 341
342 bool scan_on_scavenge() { return scan_on_scavenge_; } 342 bool scan_on_scavenge() { return scan_on_scavenge_; }
343 void set_scan_on_scavenge(bool scan) { scan_on_scavenge_ = scan; } 343 void initialize_scan_on_scavenge(bool scan) { scan_on_scavenge_ = scan; }
344 inline void set_scan_on_scavenge(bool scan);
344 345
345 int store_buffer_counter() { return store_buffer_counter_; } 346 int store_buffer_counter() { return store_buffer_counter_; }
346 void set_store_buffer_counter(int counter) { 347 void set_store_buffer_counter(int counter) {
347 store_buffer_counter_ = counter; 348 store_buffer_counter_ = counter;
348 } 349 }
349 350
350 Address body() { return address() + kObjectStartOffset; } 351 Address body() { return address() + kObjectStartOffset; }
351 352
352 int body_size() { return size() - kObjectStartOffset; } 353 int body_size() { return size() - kObjectStartOffset; }
353 354
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 440
440 inline Address MarkbitIndexToAddress(uint32_t index) { 441 inline Address MarkbitIndexToAddress(uint32_t index) {
441 return this->address() + (index << kPointerSizeLog2); 442 return this->address() + (index << kPointerSizeLog2);
442 } 443 }
443 444
444 void InsertAfter(MemoryChunk* other); 445 void InsertAfter(MemoryChunk* other);
445 void Unlink(); 446 void Unlink();
446 447
447 inline Heap* heap() { return heap_; } 448 inline Heap* heap() { return heap_; }
448 449
450 static const int kFlagsOffset = kPointerSize * 3;
451 static const int kScanOnScavengeOffset = kPointerSize * 6;
452
449 protected: 453 protected:
450 MemoryChunk* next_chunk_; 454 MemoryChunk* next_chunk_;
451 MemoryChunk* prev_chunk_; 455 MemoryChunk* prev_chunk_;
452 size_t size_; 456 size_t size_;
453 intptr_t flags_; 457 intptr_t flags_;
454 // The identity of the owning space. This is tagged as a failure pointer, but 458 // The identity of the owning space. This is tagged as a failure pointer, but
455 // no failure can be in an object, so this can be distinguished from any entry 459 // no failure can be in an object, so this can be distinguished from any entry
456 // in a fixed array. 460 // in a fixed array.
457 Address owner_; 461 Address owner_;
458 Heap* heap_; 462 Heap* heap_;
(...skipping 1746 matching lines...) Expand 10 before | Expand all | Expand 10 after
2205 } 2209 }
2206 // Must be small, since an iteration is used for lookup. 2210 // Must be small, since an iteration is used for lookup.
2207 static const int kMaxComments = 64; 2211 static const int kMaxComments = 64;
2208 }; 2212 };
2209 #endif 2213 #endif
2210 2214
2211 2215
2212 } } // namespace v8::internal 2216 } } // namespace v8::internal
2213 2217
2214 #endif // V8_SPACES_H_ 2218 #endif // V8_SPACES_H_
OLDNEW
« no previous file with comments | « src/serialize.cc ('k') | src/spaces.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698