| OLD | NEW |
| 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 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 481 } | 481 } |
| 482 | 482 |
| 483 | 483 |
| 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->InFromSpace(object)); |
| 492 | 492 |
| 493 if (!FLAG_allocation_site_pretenuring || | 493 if (!FLAG_allocation_site_pretenuring || |
| 494 !AllocationSite::CanTrack(object->map()->instance_type())) return; | 494 !AllocationSite::CanTrack(object->map()->instance_type())) return; |
| 495 | 495 |
| 496 // 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 |
| 497 // 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 |
| 498 // suffices to compare ptr and top here. | 498 // suffices to compare ptr and top here. |
| 499 Address ptr = object->address() + object->Size(); | 499 Address ptr = object->address() + object->Size(); |
| 500 Address top = heap->new_space()->FromSpacePageHigh(); | 500 Address top = heap->new_space()->FromSpacePageHigh(); |
| 501 ASSERT(ptr == top || ptr + HeapObject::kHeaderSize <= top); | 501 ASSERT(ptr == top || ptr + HeapObject::kHeaderSize <= top); |
| (...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 833 #ifdef DEBUG | 833 #ifdef DEBUG |
| 834 Isolate* isolate = Isolate::Current(); | 834 Isolate* isolate = Isolate::Current(); |
| 835 isolate->heap()->disallow_allocation_failure_ = old_state_; | 835 isolate->heap()->disallow_allocation_failure_ = old_state_; |
| 836 #endif | 836 #endif |
| 837 } | 837 } |
| 838 | 838 |
| 839 | 839 |
| 840 } } // namespace v8::internal | 840 } } // namespace v8::internal |
| 841 | 841 |
| 842 #endif // V8_HEAP_INL_H_ | 842 #endif // V8_HEAP_INL_H_ |
| OLD | NEW |