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

Side by Side Diff: src/heap-inl.h

Issue 149393005: Make eager allocation site pretenuring decisions. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 10 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/heap.cc ('k') | src/objects.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 473 matching lines...) Expand 10 before | Expand all | Expand 10 after
484 void Heap::ScavengePointer(HeapObject** p) { 484 void Heap::ScavengePointer(HeapObject** p) {
485 ScavengeObject(p, *p); 485 ScavengeObject(p, *p);
486 } 486 }
487 487
488 488
489 void Heap::UpdateAllocationSiteFeedback(HeapObject* object) { 489 void Heap::UpdateAllocationSiteFeedback(HeapObject* object) {
490 Heap* heap = object->GetHeap(); 490 Heap* heap = object->GetHeap();
491 ASSERT(heap->InNewSpace(object)); 491 ASSERT(heap->InNewSpace(object));
492 492
493 if (!FLAG_allocation_site_pretenuring || 493 if (!FLAG_allocation_site_pretenuring ||
494 !heap->new_space_high_promotion_mode_active_ ||
495 !AllocationSite::CanTrack(object->map()->instance_type())) return; 494 !AllocationSite::CanTrack(object->map()->instance_type())) return;
496 495
497 // Either object is the last object in the from space, or there is another 496 // Either object is the last object in the from space, or there is another
498 // object of at least word size (the header map word) following it, so 497 // object of at least word size (the header map word) following it, so
499 // suffices to compare ptr and top here. 498 // suffices to compare ptr and top here.
500 Address ptr = object->address() + object->Size(); 499 Address ptr = object->address() + object->Size();
501 Address top = heap->new_space()->FromSpacePageHigh(); 500 Address top = heap->new_space()->FromSpacePageHigh();
502 ASSERT(ptr == top || ptr + HeapObject::kHeaderSize <= top); 501 ASSERT(ptr == top || ptr + HeapObject::kHeaderSize <= top);
503 if (ptr == top) return; 502 if (ptr == top) return;
504 503
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
834 #ifdef DEBUG 833 #ifdef DEBUG
835 Isolate* isolate = Isolate::Current(); 834 Isolate* isolate = Isolate::Current();
836 isolate->heap()->disallow_allocation_failure_ = old_state_; 835 isolate->heap()->disallow_allocation_failure_ = old_state_;
837 #endif 836 #endif
838 } 837 }
839 838
840 839
841 } } // namespace v8::internal 840 } } // namespace v8::internal
842 841
843 #endif // V8_HEAP_INL_H_ 842 #endif // V8_HEAP_INL_H_
OLDNEW
« no previous file with comments | « src/heap.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698