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

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

Issue 391693002: In-object double fields unboxing (for 64-bit only). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed Toon's comments Created 6 years, 1 month 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
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 <algorithm> 5 #include <algorithm>
6 6
7 #include "src/v8.h" 7 #include "src/v8.h"
8 8
9 #include "src/base/atomicops.h" 9 #include "src/base/atomicops.h"
10 #include "src/counters.h" 10 #include "src/counters.h"
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 // TODO(hpayer): This may introduce a huge pause here. We 500 // TODO(hpayer): This may introduce a huge pause here. We
501 // just care about finish sweeping of the scan on scavenge page. 501 // just care about finish sweeping of the scan on scavenge page.
502 heap_->mark_compact_collector()->EnsureSweepingCompleted(); 502 heap_->mark_compact_collector()->EnsureSweepingCompleted();
503 } 503 }
504 } 504 }
505 CHECK(page->owner() == heap_->old_pointer_space()); 505 CHECK(page->owner() == heap_->old_pointer_space());
506 HeapObjectIterator iterator(page, NULL); 506 HeapObjectIterator iterator(page, NULL);
507 for (HeapObject* heap_object = iterator.Next(); heap_object != NULL; 507 for (HeapObject* heap_object = iterator.Next(); heap_object != NULL;
508 heap_object = iterator.Next()) { 508 heap_object = iterator.Next()) {
509 // We iterate over objects that contain new space pointers only. 509 // We iterate over objects that contain new space pointers only.
510 if (!heap_object->MayContainRawValues()) { 510 bool may_contain_raw_values = heap_object->MayContainRawValues();
511 FindPointersToNewSpaceInRegion( 511 if (!may_contain_raw_values) {
512 heap_object->address() + HeapObject::kHeaderSize, 512 Address obj_address = heap_object->address();
513 heap_object->address() + heap_object->Size(), slot_callback, 513 Address start_address = obj_address + HeapObject::kHeaderSize;
514 clear_maps); 514 Address end_address = obj_address + heap_object->Size();
515 #if V8_DOUBLE_FIELDS_UNBOXING
516 InobjectPropertiesHelper helper(heap_object->map());
517 bool has_only_tagged_fields = helper.all_fields_tagged();
518
519 if (!has_only_tagged_fields) {
520 for (Address slot = start_address; slot < end_address;
521 slot += kPointerSize) {
522 if (helper.IsTagged(slot - obj_address)) {
523 FindPointersToNewSpaceInRegion(slot, slot + kPointerSize,
Hannes Payer (out of office) 2014/11/06 12:29:46 Similar as before, do you think maximum contiguous
Igor Sheludko 2014/11/07 08:03:52 I would prefer to implement that in a next CL.
Hannes Payer (out of office) 2014/11/10 15:26:08 Then please leave a todo.
Igor Sheludko 2014/11/10 15:43:54 Done.
524 slot_callback, clear_maps);
525 }
526 }
527 } else {
528 #endif
529 // Object has only tagged fields.
530 FindPointersToNewSpaceInRegion(start_address, end_address,
531 slot_callback, clear_maps);
532 #if V8_DOUBLE_FIELDS_UNBOXING
533 }
534 #endif
515 } 535 }
516 } 536 }
517 } 537 }
518 } 538 }
519 } 539 }
520 } 540 }
521 if (callback_ != NULL) { 541 if (callback_ != NULL) {
522 (*callback_)(heap_, NULL, kStoreBufferScanningPageEvent); 542 (*callback_)(heap_, NULL, kStoreBufferScanningPageEvent);
523 } 543 }
524 } 544 }
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
572 } 592 }
573 old_buffer_is_sorted_ = false; 593 old_buffer_is_sorted_ = false;
574 old_buffer_is_filtered_ = false; 594 old_buffer_is_filtered_ = false;
575 *old_top_++ = reinterpret_cast<Address>(int_addr << kPointerSizeLog2); 595 *old_top_++ = reinterpret_cast<Address>(int_addr << kPointerSizeLog2);
576 DCHECK(old_top_ <= old_limit_); 596 DCHECK(old_top_ <= old_limit_);
577 } 597 }
578 heap_->isolate()->counters()->store_buffer_compactions()->Increment(); 598 heap_->isolate()->counters()->store_buffer_compactions()->Increment();
579 } 599 }
580 } 600 }
581 } // namespace v8::internal 601 } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698