Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(384)

Side by Side Diff: src/heap/heap.h

Issue 2626893005: Revert of Internalize strings in-place (Closed)
Patch Set: rebased Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/factory.cc ('k') | src/heap/heap.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 V(Map, message_object_map, JSMessageObjectMap) \ 94 V(Map, message_object_map, JSMessageObjectMap) \
95 V(Map, external_map, ExternalMap) \ 95 V(Map, external_map, ExternalMap) \
96 V(Map, bytecode_array_map, BytecodeArrayMap) \ 96 V(Map, bytecode_array_map, BytecodeArrayMap) \
97 V(Map, module_info_map, ModuleInfoMap) \ 97 V(Map, module_info_map, ModuleInfoMap) \
98 V(Map, type_feedback_vector_map, TypeFeedbackVectorMap) \ 98 V(Map, type_feedback_vector_map, TypeFeedbackVectorMap) \
99 /* String maps */ \ 99 /* String maps */ \
100 V(Map, native_source_string_map, NativeSourceStringMap) \ 100 V(Map, native_source_string_map, NativeSourceStringMap) \
101 V(Map, string_map, StringMap) \ 101 V(Map, string_map, StringMap) \
102 V(Map, cons_one_byte_string_map, ConsOneByteStringMap) \ 102 V(Map, cons_one_byte_string_map, ConsOneByteStringMap) \
103 V(Map, cons_string_map, ConsStringMap) \ 103 V(Map, cons_string_map, ConsStringMap) \
104 V(Map, thin_one_byte_string_map, ThinOneByteStringMap) \
105 V(Map, thin_string_map, ThinStringMap) \
106 V(Map, sliced_string_map, SlicedStringMap) \ 104 V(Map, sliced_string_map, SlicedStringMap) \
107 V(Map, sliced_one_byte_string_map, SlicedOneByteStringMap) \ 105 V(Map, sliced_one_byte_string_map, SlicedOneByteStringMap) \
108 V(Map, external_string_map, ExternalStringMap) \ 106 V(Map, external_string_map, ExternalStringMap) \
109 V(Map, external_string_with_one_byte_data_map, \ 107 V(Map, external_string_with_one_byte_data_map, \
110 ExternalStringWithOneByteDataMap) \ 108 ExternalStringWithOneByteDataMap) \
111 V(Map, external_one_byte_string_map, ExternalOneByteStringMap) \ 109 V(Map, external_one_byte_string_map, ExternalOneByteStringMap) \
112 V(Map, short_external_string_map, ShortExternalStringMap) \ 110 V(Map, short_external_string_map, ShortExternalStringMap) \
113 V(Map, short_external_string_with_one_byte_data_map, \ 111 V(Map, short_external_string_with_one_byte_data_map, \
114 ShortExternalStringWithOneByteDataMap) \ 112 ShortExternalStringWithOneByteDataMap) \
115 V(Map, internalized_string_map, InternalizedStringMap) \ 113 V(Map, internalized_string_map, InternalizedStringMap) \
(...skipping 2010 matching lines...) Expand 10 before | Expand all | Expand 10 after
2126 // Allocates a new utility object in the old generation. 2124 // Allocates a new utility object in the old generation.
2127 MUST_USE_RESULT AllocationResult AllocateStruct(InstanceType type); 2125 MUST_USE_RESULT AllocationResult AllocateStruct(InstanceType type);
2128 2126
2129 // Allocates a new foreign object. 2127 // Allocates a new foreign object.
2130 MUST_USE_RESULT AllocationResult 2128 MUST_USE_RESULT AllocationResult
2131 AllocateForeign(Address address, PretenureFlag pretenure = NOT_TENURED); 2129 AllocateForeign(Address address, PretenureFlag pretenure = NOT_TENURED);
2132 2130
2133 MUST_USE_RESULT AllocationResult 2131 MUST_USE_RESULT AllocationResult
2134 AllocateCode(int object_size, bool immovable); 2132 AllocateCode(int object_size, bool immovable);
2135 2133
2134 MUST_USE_RESULT AllocationResult InternalizeStringWithKey(HashTableKey* key);
2135
2136 MUST_USE_RESULT AllocationResult InternalizeString(String* str);
2137
2136 // =========================================================================== 2138 // ===========================================================================
2137 2139
2138 void set_force_oom(bool value) { force_oom_ = value; } 2140 void set_force_oom(bool value) { force_oom_ = value; }
2139 2141
2140 // The amount of external memory registered through the API. 2142 // The amount of external memory registered through the API.
2141 int64_t external_memory_; 2143 int64_t external_memory_;
2142 2144
2143 // The limit when to trigger memory pressure from the API. 2145 // The limit when to trigger memory pressure from the API.
2144 int64_t external_memory_limit_; 2146 int64_t external_memory_limit_;
2145 2147
(...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after
2692 friend class LargeObjectSpace; 2694 friend class LargeObjectSpace;
2693 friend class NewSpace; 2695 friend class NewSpace;
2694 friend class PagedSpace; 2696 friend class PagedSpace;
2695 DISALLOW_COPY_AND_ASSIGN(AllocationObserver); 2697 DISALLOW_COPY_AND_ASSIGN(AllocationObserver);
2696 }; 2698 };
2697 2699
2698 } // namespace internal 2700 } // namespace internal
2699 } // namespace v8 2701 } // namespace v8
2700 2702
2701 #endif // V8_HEAP_HEAP_H_ 2703 #endif // V8_HEAP_HEAP_H_
OLDNEW
« no previous file with comments | « src/factory.cc ('k') | src/heap/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698