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 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 518 | 518 |
| 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(HEAP->InFromSpace(*p)); | 523 ASSERT(HEAP->InFromSpace(*p)); |
| 524 *p = dest; | 524 *p = dest; |
| 525 return; | 525 return; |
| 526 } | 526 } |
| 527 | 527 |
| 528 // TODO(hpayer): temporary debugging code, should be removed. | |
| 529 CHECK(object->map() != object->GetHeap()->allocation_memento_map()); | |
|
mvstanton
2013/09/10 15:42:30
Nice, and can you reference chromium issue 284577
Hannes Payer (out of office)
2013/09/10 17:21:52
Done.
| |
| 528 // Call the slow part of scavenge object. | 530 // Call the slow part of scavenge object. |
| 529 return ScavengeObjectSlow(p, object); | 531 return ScavengeObjectSlow(p, object); |
| 530 } | 532 } |
| 531 | 533 |
| 532 | 534 |
| 533 MaybeObject* Heap::AllocateEmptyJSArrayWithAllocationSite( | 535 MaybeObject* Heap::AllocateEmptyJSArrayWithAllocationSite( |
| 534 ElementsKind elements_kind, | 536 ElementsKind elements_kind, |
| 535 Handle<AllocationSite> allocation_site) { | 537 Handle<AllocationSite> allocation_site) { |
| 536 return AllocateJSArrayAndStorageWithAllocationSite(elements_kind, 0, 0, | 538 return AllocateJSArrayAndStorageWithAllocationSite(elements_kind, 0, 0, |
| 537 allocation_site, DONT_INITIALIZE_ARRAY_ELEMENTS); | 539 allocation_site, DONT_INITIALIZE_ARRAY_ELEMENTS); |
| (...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 881 DisallowAllocationFailure::~DisallowAllocationFailure() { | 883 DisallowAllocationFailure::~DisallowAllocationFailure() { |
| 882 #ifdef DEBUG | 884 #ifdef DEBUG |
| 883 HEAP->disallow_allocation_failure_ = old_state_; | 885 HEAP->disallow_allocation_failure_ = old_state_; |
| 884 #endif | 886 #endif |
| 885 } | 887 } |
| 886 | 888 |
| 887 | 889 |
| 888 } } // namespace v8::internal | 890 } } // namespace v8::internal |
| 889 | 891 |
| 890 #endif // V8_HEAP_INL_H_ | 892 #endif // V8_HEAP_INL_H_ |
| OLD | NEW |