| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_HEAP_HEAP_H_ | 5 #ifndef V8_HEAP_HEAP_H_ |
| 6 #define V8_HEAP_HEAP_H_ | 6 #define V8_HEAP_HEAP_H_ |
| 7 | 7 |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 #include <map> | 9 #include <map> |
| 10 | 10 |
| (...skipping 1626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1637 static const int kAllocationSiteScratchpadSize = 256; | 1637 static const int kAllocationSiteScratchpadSize = 256; |
| 1638 | 1638 |
| 1639 Heap(); | 1639 Heap(); |
| 1640 | 1640 |
| 1641 static String* UpdateNewSpaceReferenceInExternalStringTableEntry( | 1641 static String* UpdateNewSpaceReferenceInExternalStringTableEntry( |
| 1642 Heap* heap, Object** pointer); | 1642 Heap* heap, Object** pointer); |
| 1643 | 1643 |
| 1644 static void ScavengeStoreBufferCallback(Heap* heap, MemoryChunk* page, | 1644 static void ScavengeStoreBufferCallback(Heap* heap, MemoryChunk* page, |
| 1645 StoreBufferEvent event); | 1645 StoreBufferEvent event); |
| 1646 | 1646 |
| 1647 // Selects the proper allocation space depending on the given object | 1647 // Selects the proper allocation space based on the pretenuring decision. |
| 1648 // size and pretenuring decision. | 1648 static AllocationSpace SelectSpace(PretenureFlag pretenure) { |
| 1649 static AllocationSpace SelectSpace(int object_size, PretenureFlag pretenure) { | |
| 1650 if (object_size > Page::kMaxRegularHeapObjectSize) return LO_SPACE; | |
| 1651 return (pretenure == TENURED) ? OLD_SPACE : NEW_SPACE; | 1649 return (pretenure == TENURED) ? OLD_SPACE : NEW_SPACE; |
| 1652 } | 1650 } |
| 1653 | 1651 |
| 1654 #define ROOT_ACCESSOR(type, name, camel_name) \ | 1652 #define ROOT_ACCESSOR(type, name, camel_name) \ |
| 1655 inline void set_##name(type* value); | 1653 inline void set_##name(type* value); |
| 1656 ROOT_LIST(ROOT_ACCESSOR) | 1654 ROOT_LIST(ROOT_ACCESSOR) |
| 1657 #undef ROOT_ACCESSOR | 1655 #undef ROOT_ACCESSOR |
| 1658 | 1656 |
| 1659 StoreBuffer* store_buffer() { return &store_buffer_; } | 1657 StoreBuffer* store_buffer() { return &store_buffer_; } |
| 1660 | 1658 |
| (...skipping 1054 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2715 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. | 2713 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. |
| 2716 | 2714 |
| 2717 private: | 2715 private: |
| 2718 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 2716 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
| 2719 }; | 2717 }; |
| 2720 #endif // DEBUG | 2718 #endif // DEBUG |
| 2721 } | 2719 } |
| 2722 } // namespace v8::internal | 2720 } // namespace v8::internal |
| 2723 | 2721 |
| 2724 #endif // V8_HEAP_HEAP_H_ | 2722 #endif // V8_HEAP_HEAP_H_ |
| OLD | NEW |