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_H_ | 5 #ifndef V8_HEAP_H_ |
6 #define V8_HEAP_H_ | 6 #define V8_HEAP_H_ |
7 | 7 |
8 #include <cmath> | 8 #include <cmath> |
9 | 9 |
10 #include "allocation.h" | 10 #include "allocation.h" |
(...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
731 // when shortening objects. | 731 // when shortening objects. |
732 void CreateFillerObjectAt(Address addr, int size); | 732 void CreateFillerObjectAt(Address addr, int size); |
733 | 733 |
734 bool CanMoveObjectStart(HeapObject* object); | 734 bool CanMoveObjectStart(HeapObject* object); |
735 | 735 |
736 enum InvocationMode { FROM_GC, FROM_MUTATOR }; | 736 enum InvocationMode { FROM_GC, FROM_MUTATOR }; |
737 | 737 |
738 // Maintain marking consistency for IncrementalMarking. | 738 // Maintain marking consistency for IncrementalMarking. |
739 void AdjustLiveBytes(Address address, int by, InvocationMode mode); | 739 void AdjustLiveBytes(Address address, int by, InvocationMode mode); |
740 | 740 |
741 bool InternalizeStringIfExists(String* str, String** result); | |
742 | |
743 // Converts the given boolean condition to JavaScript boolean value. | 741 // Converts the given boolean condition to JavaScript boolean value. |
744 inline Object* ToBoolean(bool condition); | 742 inline Object* ToBoolean(bool condition); |
745 | 743 |
746 // Performs garbage collection operation. | 744 // Performs garbage collection operation. |
747 // Returns whether there is a chance that another major GC could | 745 // Returns whether there is a chance that another major GC could |
748 // collect more garbage. | 746 // collect more garbage. |
749 inline bool CollectGarbage( | 747 inline bool CollectGarbage( |
750 AllocationSpace space, | 748 AllocationSpace space, |
751 const char* gc_reason = NULL, | 749 const char* gc_reason = NULL, |
752 const GCCallbackFlags gc_callback_flags = kNoGCCallbackFlags); | 750 const GCCallbackFlags gc_callback_flags = kNoGCCallbackFlags); |
(...skipping 2057 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2810 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. | 2808 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. |
2811 | 2809 |
2812 private: | 2810 private: |
2813 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 2811 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
2814 }; | 2812 }; |
2815 #endif // DEBUG | 2813 #endif // DEBUG |
2816 | 2814 |
2817 } } // namespace v8::internal | 2815 } } // namespace v8::internal |
2818 | 2816 |
2819 #endif // V8_HEAP_H_ | 2817 #endif // V8_HEAP_H_ |
OLD | NEW |