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 1622 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1633 static const int kAllocationSiteScratchpadSize = 256; | 1633 static const int kAllocationSiteScratchpadSize = 256; |
1634 | 1634 |
1635 Heap(); | 1635 Heap(); |
1636 | 1636 |
1637 static String* UpdateNewSpaceReferenceInExternalStringTableEntry( | 1637 static String* UpdateNewSpaceReferenceInExternalStringTableEntry( |
1638 Heap* heap, Object** pointer); | 1638 Heap* heap, Object** pointer); |
1639 | 1639 |
1640 static void ScavengeStoreBufferCallback(Heap* heap, MemoryChunk* page, | 1640 static void ScavengeStoreBufferCallback(Heap* heap, MemoryChunk* page, |
1641 StoreBufferEvent event); | 1641 StoreBufferEvent event); |
1642 | 1642 |
1643 // Selects the proper allocation space depending on the given object | 1643 // Selects the proper allocation space based on the pretenuring decision. |
1644 // size and pretenuring decision. | 1644 static AllocationSpace SelectSpace(PretenureFlag pretenure) { |
1645 static AllocationSpace SelectSpace(int object_size, PretenureFlag pretenure) { | |
1646 if (object_size > Page::kMaxRegularHeapObjectSize) return LO_SPACE; | |
1647 return (pretenure == TENURED) ? OLD_SPACE : NEW_SPACE; | 1645 return (pretenure == TENURED) ? OLD_SPACE : NEW_SPACE; |
1648 } | 1646 } |
1649 | 1647 |
1650 #define ROOT_ACCESSOR(type, name, camel_name) \ | 1648 #define ROOT_ACCESSOR(type, name, camel_name) \ |
1651 inline void set_##name(type* value); | 1649 inline void set_##name(type* value); |
1652 ROOT_LIST(ROOT_ACCESSOR) | 1650 ROOT_LIST(ROOT_ACCESSOR) |
1653 #undef ROOT_ACCESSOR | 1651 #undef ROOT_ACCESSOR |
1654 | 1652 |
1655 StoreBuffer* store_buffer() { return &store_buffer_; } | 1653 StoreBuffer* store_buffer() { return &store_buffer_; } |
1656 | 1654 |
(...skipping 1043 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2700 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. | 2698 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. |
2701 | 2699 |
2702 private: | 2700 private: |
2703 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 2701 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
2704 }; | 2702 }; |
2705 #endif // DEBUG | 2703 #endif // DEBUG |
2706 } | 2704 } |
2707 } // namespace v8::internal | 2705 } // namespace v8::internal |
2708 | 2706 |
2709 #endif // V8_HEAP_HEAP_H_ | 2707 #endif // V8_HEAP_HEAP_H_ |
OLD | NEW |