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 744 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
755 // Allocates a partial map for bootstrapping. | 755 // Allocates a partial map for bootstrapping. |
756 MUST_USE_RESULT MaybeObject* AllocatePartialMap(InstanceType instance_type, | 756 MUST_USE_RESULT MaybeObject* AllocatePartialMap(InstanceType instance_type, |
757 int instance_size); | 757 int instance_size); |
758 | 758 |
759 // Allocate a block of memory in the given space (filled with a filler). | 759 // Allocate a block of memory in the given space (filled with a filler). |
760 // Used as a fall-back for generated code when the space is full. | 760 // Used as a fall-back for generated code when the space is full. |
761 MUST_USE_RESULT MaybeObject* AllocateFillerObject(int size, | 761 MUST_USE_RESULT MaybeObject* AllocateFillerObject(int size, |
762 bool double_align, | 762 bool double_align, |
763 AllocationSpace space); | 763 AllocationSpace space); |
764 | 764 |
765 // Allocates an empty PolymorphicCodeCache. | |
766 MUST_USE_RESULT MaybeObject* AllocatePolymorphicCodeCache(); | |
767 | |
768 // Clear the Instanceof cache (used when a prototype changes). | 765 // Clear the Instanceof cache (used when a prototype changes). |
769 inline void ClearInstanceofCache(); | 766 inline void ClearInstanceofCache(); |
770 | 767 |
771 // Iterates the whole code space to clear all ICs of the given kind. | 768 // Iterates the whole code space to clear all ICs of the given kind. |
772 void ClearAllICsByKind(Code::Kind kind); | 769 void ClearAllICsByKind(Code::Kind kind); |
773 | 770 |
774 // For use during bootup. | 771 // For use during bootup. |
775 void RepairFreeListsAfterBoot(); | 772 void RepairFreeListsAfterBoot(); |
776 | 773 |
777 // Allocates and fully initializes a String. There are two String | 774 // Allocates and fully initializes a String. There are two String |
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1297 HeapObject* object, ScratchpadSlotMode mode); | 1294 HeapObject* object, ScratchpadSlotMode mode); |
1298 | 1295 |
1299 // Support for partial snapshots. After calling this we have a linear | 1296 // Support for partial snapshots. After calling this we have a linear |
1300 // space to write objects in each space. | 1297 // space to write objects in each space. |
1301 void ReserveSpace(int *sizes, Address* addresses); | 1298 void ReserveSpace(int *sizes, Address* addresses); |
1302 | 1299 |
1303 // | 1300 // |
1304 // Support for the API. | 1301 // Support for the API. |
1305 // | 1302 // |
1306 | 1303 |
1307 bool CreateApiObjects(); | 1304 void CreateApiObjects(); |
1308 | 1305 |
1309 // Adjusts the amount of registered external memory. | 1306 // Adjusts the amount of registered external memory. |
1310 // Returns the adjusted value. | 1307 // Returns the adjusted value. |
1311 inline int64_t AdjustAmountOfExternalAllocatedMemory( | 1308 inline int64_t AdjustAmountOfExternalAllocatedMemory( |
1312 int64_t change_in_bytes); | 1309 int64_t change_in_bytes); |
1313 | 1310 |
1314 // This is only needed for testing high promotion mode. | 1311 // This is only needed for testing high promotion mode. |
1315 void SetNewSpaceHighPromotionModeActive(bool mode) { | 1312 void SetNewSpaceHighPromotionModeActive(bool mode) { |
1316 new_space_high_promotion_mode_active_ = mode; | 1313 new_space_high_promotion_mode_active_ = mode; |
1317 } | 1314 } |
(...skipping 659 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1977 int length, PretenureFlag pretenure); | 1974 int length, PretenureFlag pretenure); |
1978 | 1975 |
1979 // Initializes a JSObject based on its map. | 1976 // Initializes a JSObject based on its map. |
1980 void InitializeJSObjectFromMap(JSObject* obj, | 1977 void InitializeJSObjectFromMap(JSObject* obj, |
1981 FixedArray* properties, | 1978 FixedArray* properties, |
1982 Map* map); | 1979 Map* map); |
1983 void InitializeAllocationMemento(AllocationMemento* memento, | 1980 void InitializeAllocationMemento(AllocationMemento* memento, |
1984 AllocationSite* allocation_site); | 1981 AllocationSite* allocation_site); |
1985 | 1982 |
1986 bool CreateInitialMaps(); | 1983 bool CreateInitialMaps(); |
1987 bool CreateInitialObjects(); | 1984 void CreateInitialObjects(); |
1988 | 1985 |
1989 // These five Create*EntryStub functions are here and forced to not be inlined | 1986 // These five Create*EntryStub functions are here and forced to not be inlined |
1990 // because of a gcc-4.4 bug that assigns wrong vtable entries. | 1987 // because of a gcc-4.4 bug that assigns wrong vtable entries. |
1991 NO_INLINE(void CreateJSEntryStub()); | 1988 NO_INLINE(void CreateJSEntryStub()); |
1992 NO_INLINE(void CreateJSConstructEntryStub()); | 1989 NO_INLINE(void CreateJSConstructEntryStub()); |
1993 | 1990 |
1994 void CreateFixedStubs(); | 1991 void CreateFixedStubs(); |
1995 | 1992 |
1996 // Allocate empty fixed array. | 1993 // Allocate empty fixed array. |
1997 MUST_USE_RESULT MaybeObject* AllocateEmptyFixedArray(); | 1994 MUST_USE_RESULT MaybeObject* AllocateEmptyFixedArray(); |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2062 | 2059 |
2063 // Slow part of scavenge object. | 2060 // Slow part of scavenge object. |
2064 static void ScavengeObjectSlow(HeapObject** p, HeapObject* object); | 2061 static void ScavengeObjectSlow(HeapObject** p, HeapObject* object); |
2065 | 2062 |
2066 // Total RegExp code ever generated | 2063 // Total RegExp code ever generated |
2067 double total_regexp_code_generated_; | 2064 double total_regexp_code_generated_; |
2068 | 2065 |
2069 GCTracer* tracer_; | 2066 GCTracer* tracer_; |
2070 | 2067 |
2071 // Allocates a small number to string cache. | 2068 // Allocates a small number to string cache. |
2072 MUST_USE_RESULT MaybeObject* AllocateInitialNumberStringCache(); | 2069 MUST_USE_RESULT MaybeObject* AllocateInitialNumberStringCache(); |
Igor Sheludko
2014/04/28 15:56:08
I think you can now remove this as well.
| |
2073 // Creates and installs the full-sized number string cache. | 2070 // Creates and installs the full-sized number string cache. |
2074 int FullSizeNumberStringCacheLength(); | 2071 int FullSizeNumberStringCacheLength(); |
2075 // Flush the number to string cache. | 2072 // Flush the number to string cache. |
2076 void FlushNumberStringCache(); | 2073 void FlushNumberStringCache(); |
2077 | 2074 |
2078 // Allocates a fixed-size allocation sites scratchpad. | |
2079 MUST_USE_RESULT MaybeObject* AllocateAllocationSitesScratchpad(); | |
2080 | |
2081 // Sets used allocation sites entries to undefined. | 2075 // Sets used allocation sites entries to undefined. |
2082 void FlushAllocationSitesScratchpad(); | 2076 void FlushAllocationSitesScratchpad(); |
2083 | 2077 |
2084 // Initializes the allocation sites scratchpad with undefined values. | 2078 // Initializes the allocation sites scratchpad with undefined values. |
2085 void InitializeAllocationSitesScratchpad(); | 2079 void InitializeAllocationSitesScratchpad(); |
2086 | 2080 |
2087 // Adds an allocation site to the scratchpad if there is space left. | 2081 // Adds an allocation site to the scratchpad if there is space left. |
2088 void AddAllocationSiteToScratchpad(AllocationSite* site, | 2082 void AddAllocationSiteToScratchpad(AllocationSite* site, |
2089 ScratchpadSlotMode mode); | 2083 ScratchpadSlotMode mode); |
2090 | 2084 |
(...skipping 798 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2889 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. | 2883 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. |
2890 | 2884 |
2891 private: | 2885 private: |
2892 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 2886 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
2893 }; | 2887 }; |
2894 #endif // DEBUG | 2888 #endif // DEBUG |
2895 | 2889 |
2896 } } // namespace v8::internal | 2890 } } // namespace v8::internal |
2897 | 2891 |
2898 #endif // V8_HEAP_H_ | 2892 #endif // V8_HEAP_H_ |
OLD | NEW |