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 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
448 ASSERT(HEAP->InFromSpace(*p)); | 448 ASSERT(HEAP->InFromSpace(*p)); |
449 *p = dest; | 449 *p = dest; |
450 return; | 450 return; |
451 } | 451 } |
452 | 452 |
453 // Call the slow part of scavenge object. | 453 // Call the slow part of scavenge object. |
454 return ScavengeObjectSlow(p, object); | 454 return ScavengeObjectSlow(p, object); |
455 } | 455 } |
456 | 456 |
457 | 457 |
| 458 MaybeObject* Heap::AllocateEmptyJSArrayWithAllocationSite( |
| 459 ElementsKind elements_kind, |
| 460 Handle<Object> allocation_site_payload) { |
| 461 return AllocateJSArrayAndStorageWithAllocationSite(elements_kind, 0, 0, |
| 462 allocation_site_payload, |
| 463 DONT_INITIALIZE_ARRAY_ELEMENTS); |
| 464 } |
| 465 |
| 466 |
458 bool Heap::CollectGarbage(AllocationSpace space, const char* gc_reason) { | 467 bool Heap::CollectGarbage(AllocationSpace space, const char* gc_reason) { |
459 const char* collector_reason = NULL; | 468 const char* collector_reason = NULL; |
460 GarbageCollector collector = SelectGarbageCollector(space, &collector_reason); | 469 GarbageCollector collector = SelectGarbageCollector(space, &collector_reason); |
461 return CollectGarbage(space, collector, gc_reason, collector_reason); | 470 return CollectGarbage(space, collector, gc_reason, collector_reason); |
462 } | 471 } |
463 | 472 |
464 | 473 |
465 MaybeObject* Heap::PrepareForCompare(String* str) { | 474 MaybeObject* Heap::PrepareForCompare(String* str) { |
466 // Always flatten small strings and force flattening of long strings | 475 // Always flatten small strings and force flattening of long strings |
467 // after we have accumulated a certain amount we failed to flatten. | 476 // after we have accumulated a certain amount we failed to flatten. |
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
858 AssertNoAllocation::~AssertNoAllocation() { } | 867 AssertNoAllocation::~AssertNoAllocation() { } |
859 DisableAssertNoAllocation::DisableAssertNoAllocation() { } | 868 DisableAssertNoAllocation::DisableAssertNoAllocation() { } |
860 DisableAssertNoAllocation::~DisableAssertNoAllocation() { } | 869 DisableAssertNoAllocation::~DisableAssertNoAllocation() { } |
861 | 870 |
862 #endif | 871 #endif |
863 | 872 |
864 | 873 |
865 } } // namespace v8::internal | 874 } } // namespace v8::internal |
866 | 875 |
867 #endif // V8_HEAP_INL_H_ | 876 #endif // V8_HEAP_INL_H_ |
OLD | NEW |