Chromium Code Reviews| 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 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 519 // If the first word is a forwarding address, the object has already been | 519 // If the first word is a forwarding address, the object has already been |
| 520 // copied. | 520 // copied. |
| 521 if (first_word.IsForwardingAddress()) { | 521 if (first_word.IsForwardingAddress()) { |
| 522 HeapObject* dest = first_word.ToForwardingAddress(); | 522 HeapObject* dest = first_word.ToForwardingAddress(); |
| 523 ASSERT(object->GetIsolate()->heap()->InFromSpace(*p)); | 523 ASSERT(object->GetIsolate()->heap()->InFromSpace(*p)); |
| 524 *p = dest; | 524 *p = dest; |
| 525 return; | 525 return; |
| 526 } | 526 } |
| 527 | 527 |
| 528 if (FLAG_trace_track_allocation_sites && | 528 if (FLAG_trace_track_allocation_sites && |
| 529 AllocationSite::CanTrack(object->map()->instance_type()) && | 529 AllocationSite::CanTrack(object->map()->instance_type()) && |
|
mvstanton
2013/10/02 10:56:45
See my other comment about CanTrack().
Hannes Payer (out of office)
2013/10/02 11:02:19
Done.
| |
| 530 object->IsJSObject()) { | 530 object->IsJSObject()) { |
| 531 if (AllocationMemento::FindForJSObject(JSObject::cast(object)) != NULL) { | 531 if (AllocationMemento::FindForJSObject(JSObject::cast(object), true) != |
| 532 object->GetIsolate()->heap()->allocation_mementos_found_on_scavenge_++; | 532 NULL) { |
| 533 object->GetIsolate()->heap()->allocation_mementos_found_++; | |
| 533 } | 534 } |
| 534 } | 535 } |
| 535 | 536 |
| 536 // AllocationMementos are unrooted and shouldn't survive a scavenge | 537 // AllocationMementos are unrooted and shouldn't survive a scavenge |
| 537 ASSERT(object->map() != object->GetHeap()->allocation_memento_map()); | 538 ASSERT(object->map() != object->GetHeap()->allocation_memento_map()); |
| 538 // Call the slow part of scavenge object. | 539 // Call the slow part of scavenge object. |
| 539 return ScavengeObjectSlow(p, object); | 540 return ScavengeObjectSlow(p, object); |
| 540 } | 541 } |
| 541 | 542 |
| 542 | 543 |
| (...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 889 #ifdef DEBUG | 890 #ifdef DEBUG |
| 890 Isolate* isolate = Isolate::Current(); | 891 Isolate* isolate = Isolate::Current(); |
| 891 isolate->heap()->disallow_allocation_failure_ = old_state_; | 892 isolate->heap()->disallow_allocation_failure_ = old_state_; |
| 892 #endif | 893 #endif |
| 893 } | 894 } |
| 894 | 895 |
| 895 | 896 |
| 896 } } // namespace v8::internal | 897 } } // namespace v8::internal |
| 897 | 898 |
| 898 #endif // V8_HEAP_INL_H_ | 899 #endif // V8_HEAP_INL_H_ |
| OLD | NEW |