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

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

Issue 1131783003: Embedded constant pools. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix debug-mode Arm issue. Created 5 years, 6 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/heap-snapshot-generator.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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 V(Map, shared_function_info_map, SharedFunctionInfoMap) \ 45 V(Map, shared_function_info_map, SharedFunctionInfoMap) \
46 V(Map, meta_map, MetaMap) \ 46 V(Map, meta_map, MetaMap) \
47 V(Map, heap_number_map, HeapNumberMap) \ 47 V(Map, heap_number_map, HeapNumberMap) \
48 V(Map, mutable_heap_number_map, MutableHeapNumberMap) \ 48 V(Map, mutable_heap_number_map, MutableHeapNumberMap) \
49 V(Map, native_context_map, NativeContextMap) \ 49 V(Map, native_context_map, NativeContextMap) \
50 V(Map, fixed_array_map, FixedArrayMap) \ 50 V(Map, fixed_array_map, FixedArrayMap) \
51 V(Map, code_map, CodeMap) \ 51 V(Map, code_map, CodeMap) \
52 V(Map, scope_info_map, ScopeInfoMap) \ 52 V(Map, scope_info_map, ScopeInfoMap) \
53 V(Map, fixed_cow_array_map, FixedCOWArrayMap) \ 53 V(Map, fixed_cow_array_map, FixedCOWArrayMap) \
54 V(Map, fixed_double_array_map, FixedDoubleArrayMap) \ 54 V(Map, fixed_double_array_map, FixedDoubleArrayMap) \
55 V(Map, constant_pool_array_map, ConstantPoolArrayMap) \
56 V(Map, weak_cell_map, WeakCellMap) \ 55 V(Map, weak_cell_map, WeakCellMap) \
57 V(Map, one_byte_string_map, OneByteStringMap) \ 56 V(Map, one_byte_string_map, OneByteStringMap) \
58 V(Map, one_byte_internalized_string_map, OneByteInternalizedStringMap) \ 57 V(Map, one_byte_internalized_string_map, OneByteInternalizedStringMap) \
59 V(Map, function_context_map, FunctionContextMap) \ 58 V(Map, function_context_map, FunctionContextMap) \
60 V(FixedArray, empty_fixed_array, EmptyFixedArray) \ 59 V(FixedArray, empty_fixed_array, EmptyFixedArray) \
61 V(ByteArray, empty_byte_array, EmptyByteArray) \ 60 V(ByteArray, empty_byte_array, EmptyByteArray) \
62 V(DescriptorArray, empty_descriptor_array, EmptyDescriptorArray) \ 61 V(DescriptorArray, empty_descriptor_array, EmptyDescriptorArray) \
63 V(ConstantPoolArray, empty_constant_pool_array, EmptyConstantPoolArray) \
64 /* The roots above this line should be boring from a GC point of view. */ \ 62 /* The roots above this line should be boring from a GC point of view. */ \
65 /* This means they are never in new space and never on a page that is */ \ 63 /* This means they are never in new space and never on a page that is */ \
66 /* being compacted. */ \ 64 /* being compacted. */ \
67 V(Oddball, no_interceptor_result_sentinel, NoInterceptorResultSentinel) \ 65 V(Oddball, no_interceptor_result_sentinel, NoInterceptorResultSentinel) \
68 V(Oddball, arguments_marker, ArgumentsMarker) \ 66 V(Oddball, arguments_marker, ArgumentsMarker) \
69 V(Oddball, exception, Exception) \ 67 V(Oddball, exception, Exception) \
70 V(Oddball, termination_exception, TerminationException) \ 68 V(Oddball, termination_exception, TerminationException) \
71 V(FixedArray, number_string_cache, NumberStringCache) \ 69 V(FixedArray, number_string_cache, NumberStringCache) \
72 V(Object, instanceof_cache_function, InstanceofCacheFunction) \ 70 V(Object, instanceof_cache_function, InstanceofCacheFunction) \
73 V(Object, instanceof_cache_map, InstanceofCacheMap) \ 71 V(Object, instanceof_cache_map, InstanceofCacheMap) \
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 V(SharedFunctionInfoMap) \ 341 V(SharedFunctionInfoMap) \
344 V(MetaMap) \ 342 V(MetaMap) \
345 V(HeapNumberMap) \ 343 V(HeapNumberMap) \
346 V(MutableHeapNumberMap) \ 344 V(MutableHeapNumberMap) \
347 V(NativeContextMap) \ 345 V(NativeContextMap) \
348 V(FixedArrayMap) \ 346 V(FixedArrayMap) \
349 V(CodeMap) \ 347 V(CodeMap) \
350 V(ScopeInfoMap) \ 348 V(ScopeInfoMap) \
351 V(FixedCOWArrayMap) \ 349 V(FixedCOWArrayMap) \
352 V(FixedDoubleArrayMap) \ 350 V(FixedDoubleArrayMap) \
353 V(ConstantPoolArrayMap) \
354 V(WeakCellMap) \ 351 V(WeakCellMap) \
355 V(NoInterceptorResultSentinel) \ 352 V(NoInterceptorResultSentinel) \
356 V(HashTableMap) \ 353 V(HashTableMap) \
357 V(OrderedHashTableMap) \ 354 V(OrderedHashTableMap) \
358 V(EmptyFixedArray) \ 355 V(EmptyFixedArray) \
359 V(EmptyByteArray) \ 356 V(EmptyByteArray) \
360 V(EmptyDescriptorArray) \ 357 V(EmptyDescriptorArray) \
361 V(EmptyConstantPoolArray) \
362 V(ArgumentsMarker) \ 358 V(ArgumentsMarker) \
363 V(SymbolMap) \ 359 V(SymbolMap) \
364 V(SloppyArgumentsElementsMap) \ 360 V(SloppyArgumentsElementsMap) \
365 V(FunctionContextMap) \ 361 V(FunctionContextMap) \
366 V(CatchContextMap) \ 362 V(CatchContextMap) \
367 V(WithContextMap) \ 363 V(WithContextMap) \
368 V(BlockContextMap) \ 364 V(BlockContextMap) \
369 V(ModuleContextMap) \ 365 V(ModuleContextMap) \
370 V(ScriptContextMap) \ 366 V(ScriptContextMap) \
371 V(UndefinedMap) \ 367 V(UndefinedMap) \
(...skipping 1588 matching lines...) Expand 10 before | Expand all | Expand 10 after
1960 // Make a copy of src, set the map, and return the copy. Returns 1956 // Make a copy of src, set the map, and return the copy. Returns
1961 // Failure::RetryAfterGC(requested_bytes, space) if the allocation failed. 1957 // Failure::RetryAfterGC(requested_bytes, space) if the allocation failed.
1962 MUST_USE_RESULT AllocationResult 1958 MUST_USE_RESULT AllocationResult
1963 CopyFixedArrayWithMap(FixedArray* src, Map* map); 1959 CopyFixedArrayWithMap(FixedArray* src, Map* map);
1964 1960
1965 // Make a copy of src and return it. Returns 1961 // Make a copy of src and return it. Returns
1966 // Failure::RetryAfterGC(requested_bytes, space) if the allocation failed. 1962 // Failure::RetryAfterGC(requested_bytes, space) if the allocation failed.
1967 MUST_USE_RESULT inline AllocationResult CopyFixedDoubleArray( 1963 MUST_USE_RESULT inline AllocationResult CopyFixedDoubleArray(
1968 FixedDoubleArray* src); 1964 FixedDoubleArray* src);
1969 1965
1970 // Make a copy of src and return it. Returns
1971 // Failure::RetryAfterGC(requested_bytes, space) if the allocation failed.
1972 MUST_USE_RESULT inline AllocationResult CopyConstantPoolArray(
1973 ConstantPoolArray* src);
1974
1975
1976 // Computes a single character string where the character has code. 1966 // Computes a single character string where the character has code.
1977 // A cache is used for one-byte (Latin1) codes. 1967 // A cache is used for one-byte (Latin1) codes.
1978 MUST_USE_RESULT AllocationResult 1968 MUST_USE_RESULT AllocationResult
1979 LookupSingleCharacterStringFromCode(uint16_t code); 1969 LookupSingleCharacterStringFromCode(uint16_t code);
1980 1970
1981 // Allocate a symbol in old space. 1971 // Allocate a symbol in old space.
1982 MUST_USE_RESULT AllocationResult AllocateSymbol(); 1972 MUST_USE_RESULT AllocationResult AllocateSymbol();
1983 1973
1984 // Make a copy of src, set the map, and return the copy.
1985 MUST_USE_RESULT AllocationResult
1986 CopyConstantPoolArrayWithMap(ConstantPoolArray* src, Map* map);
1987
1988 MUST_USE_RESULT AllocationResult AllocateConstantPoolArray(
1989 const ConstantPoolArray::NumberOfEntries& small);
1990
1991 MUST_USE_RESULT AllocationResult AllocateExtendedConstantPoolArray(
1992 const ConstantPoolArray::NumberOfEntries& small,
1993 const ConstantPoolArray::NumberOfEntries& extended);
1994
1995 // Allocates an external array of the specified length and type. 1974 // Allocates an external array of the specified length and type.
1996 MUST_USE_RESULT AllocationResult 1975 MUST_USE_RESULT AllocationResult
1997 AllocateExternalArray(int length, ExternalArrayType array_type, 1976 AllocateExternalArray(int length, ExternalArrayType array_type,
1998 void* external_pointer, PretenureFlag pretenure); 1977 void* external_pointer, PretenureFlag pretenure);
1999 1978
2000 // Allocates a fixed typed array of the specified length and type. 1979 // Allocates a fixed typed array of the specified length and type.
2001 MUST_USE_RESULT AllocationResult 1980 MUST_USE_RESULT AllocationResult
2002 AllocateFixedTypedArray(int length, ExternalArrayType array_type, 1981 AllocateFixedTypedArray(int length, ExternalArrayType array_type,
2003 PretenureFlag pretenure); 1982 PretenureFlag pretenure);
2004 1983
(...skipping 19 matching lines...) Expand all
2024 MUST_USE_RESULT AllocationResult AllocateEmptyFixedArray(); 2003 MUST_USE_RESULT AllocationResult AllocateEmptyFixedArray();
2025 2004
2026 // Allocate empty external array of given type. 2005 // Allocate empty external array of given type.
2027 MUST_USE_RESULT AllocationResult 2006 MUST_USE_RESULT AllocationResult
2028 AllocateEmptyExternalArray(ExternalArrayType array_type); 2007 AllocateEmptyExternalArray(ExternalArrayType array_type);
2029 2008
2030 // Allocate empty fixed typed array of given type. 2009 // Allocate empty fixed typed array of given type.
2031 MUST_USE_RESULT AllocationResult 2010 MUST_USE_RESULT AllocationResult
2032 AllocateEmptyFixedTypedArray(ExternalArrayType array_type); 2011 AllocateEmptyFixedTypedArray(ExternalArrayType array_type);
2033 2012
2034 // Allocate empty constant pool array.
2035 MUST_USE_RESULT AllocationResult AllocateEmptyConstantPoolArray();
2036
2037 // Allocate a tenured simple cell. 2013 // Allocate a tenured simple cell.
2038 MUST_USE_RESULT AllocationResult AllocateCell(Object* value); 2014 MUST_USE_RESULT AllocationResult AllocateCell(Object* value);
2039 2015
2040 // Allocate a tenured JS global property cell initialized with the hole. 2016 // Allocate a tenured JS global property cell initialized with the hole.
2041 MUST_USE_RESULT AllocationResult AllocatePropertyCell(); 2017 MUST_USE_RESULT AllocationResult AllocatePropertyCell();
2042 2018
2043 MUST_USE_RESULT AllocationResult AllocateWeakCell(HeapObject* value); 2019 MUST_USE_RESULT AllocationResult AllocateWeakCell(HeapObject* value);
2044 2020
2045 // Allocates a new utility object in the old generation. 2021 // Allocates a new utility object in the old generation.
2046 MUST_USE_RESULT AllocationResult AllocateStruct(InstanceType type); 2022 MUST_USE_RESULT AllocationResult AllocateStruct(InstanceType type);
(...skipping 699 matching lines...) Expand 10 before | Expand all | Expand 10 after
2746 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. 2722 DisallowHeapAllocation no_allocation; // i.e. no gc allowed.
2747 2723
2748 private: 2724 private:
2749 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); 2725 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer);
2750 }; 2726 };
2751 #endif // DEBUG 2727 #endif // DEBUG
2752 } 2728 }
2753 } // namespace v8::internal 2729 } // namespace v8::internal
2754 2730
2755 #endif // V8_HEAP_HEAP_H_ 2731 #endif // V8_HEAP_HEAP_H_
OLDNEW
« no previous file with comments | « src/heap-snapshot-generator.cc ('k') | src/heap/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698