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

Side by Side Diff: src/store-buffer.cc

Issue 370993004: Fix compilation with clang after r22208 (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 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 | « no previous file | no next file » | 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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/store-buffer.h" 5 #include "src/store-buffer.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "src/v8.h" 9 #include "src/v8.h"
10 10
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 object = reinterpret_cast<Object*>( 396 object = reinterpret_cast<Object*>(
397 base::NoBarrier_Load(reinterpret_cast<base::AtomicWord*>(slot))); 397 base::NoBarrier_Load(reinterpret_cast<base::AtomicWord*>(slot)));
398 if (heap_->InNewSpace(object)) { 398 if (heap_->InNewSpace(object)) {
399 EnterDirectlyIntoStoreBuffer(slot_address); 399 EnterDirectlyIntoStoreBuffer(slot_address);
400 } 400 }
401 } 401 }
402 } 402 }
403 } 403 }
404 404
405 405
406 // Compute start address of the first map following given addr.
407 static inline Address MapStartAlign(Address addr) {
408 Address page = Page::FromAddress(addr)->area_start();
409 return page + (((addr - page) + (Map::kSize - 1)) / Map::kSize * Map::kSize);
410 }
411
412
413 // Compute end address of the first map preceding given addr.
414 static inline Address MapEndAlign(Address addr) {
415 Address page = Page::FromAllocationTop(addr)->area_start();
416 return page + ((addr - page) / Map::kSize * Map::kSize);
417 }
418
419
420 void StoreBuffer::IteratePointersInStoreBuffer( 406 void StoreBuffer::IteratePointersInStoreBuffer(
421 ObjectSlotCallback slot_callback, 407 ObjectSlotCallback slot_callback,
422 bool clear_maps) { 408 bool clear_maps) {
423 Address* limit = old_top_; 409 Address* limit = old_top_;
424 old_top_ = old_start_; 410 old_top_ = old_start_;
425 { 411 {
426 DontMoveStoreBufferEntriesScope scope(this); 412 DontMoveStoreBufferEntriesScope scope(this);
427 for (Address* current = old_start_; current < limit; current++) { 413 for (Address* current = old_start_; current < limit; current++) {
428 #ifdef DEBUG 414 #ifdef DEBUG
429 Address* saved_top = old_top_; 415 Address* saved_top = old_top_;
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
579 } 565 }
580 old_buffer_is_sorted_ = false; 566 old_buffer_is_sorted_ = false;
581 old_buffer_is_filtered_ = false; 567 old_buffer_is_filtered_ = false;
582 *old_top_++ = reinterpret_cast<Address>(int_addr << kPointerSizeLog2); 568 *old_top_++ = reinterpret_cast<Address>(int_addr << kPointerSizeLog2);
583 ASSERT(old_top_ <= old_limit_); 569 ASSERT(old_top_ <= old_limit_);
584 } 570 }
585 heap_->isolate()->counters()->store_buffer_compactions()->Increment(); 571 heap_->isolate()->counters()->store_buffer_compactions()->Increment();
586 } 572 }
587 573
588 } } // namespace v8::internal 574 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698