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

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

Issue 104903002: Generalize AllocationMemento::FindForHeapObject and remove corresponding new space check. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years 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 | src/objects.h » ('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 466 matching lines...) Expand 10 before | Expand all | Expand 10 after
477 } 477 }
478 } 478 }
479 479
480 480
481 void Heap::ScavengePointer(HeapObject** p) { 481 void Heap::ScavengePointer(HeapObject** p) {
482 ScavengeObject(p, *p); 482 ScavengeObject(p, *p);
483 } 483 }
484 484
485 485
486 void Heap::UpdateAllocationSiteFeedback(HeapObject* object) { 486 void Heap::UpdateAllocationSiteFeedback(HeapObject* object) {
487 if (FLAG_allocation_site_pretenuring && object->IsJSObject()) { 487 if (FLAG_allocation_site_pretenuring &&
488 AllocationMemento* memento = AllocationMemento::FindForJSObject( 488 AllocationSite::CanTrack(object->map()->instance_type())) {
489 JSObject::cast(object), true); 489 AllocationMemento* memento = AllocationMemento::FindForHeapObject(
490 object, true);
490 if (memento != NULL) { 491 if (memento != NULL) {
491 ASSERT(memento->IsValid()); 492 ASSERT(memento->IsValid());
492 memento->GetAllocationSite()->IncrementMementoFoundCount(); 493 memento->GetAllocationSite()->IncrementMementoFoundCount();
493 } 494 }
494 } 495 }
495 } 496 }
496 497
497 498
498 void Heap::ScavengeObject(HeapObject** p, HeapObject* object) { 499 void Heap::ScavengeObject(HeapObject** p, HeapObject* object) {
499 ASSERT(object->GetIsolate()->heap()->InFromSpace(object)); 500 ASSERT(object->GetIsolate()->heap()->InFromSpace(object));
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
871 #ifdef DEBUG 872 #ifdef DEBUG
872 Isolate* isolate = Isolate::Current(); 873 Isolate* isolate = Isolate::Current();
873 isolate->heap()->disallow_allocation_failure_ = old_state_; 874 isolate->heap()->disallow_allocation_failure_ = old_state_;
874 #endif 875 #endif
875 } 876 }
876 877
877 878
878 } } // namespace v8::internal 879 } } // namespace v8::internal
879 880
880 #endif // V8_HEAP_INL_H_ 881 #endif // V8_HEAP_INL_H_
OLDNEW
« no previous file with comments | « no previous file | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698