| 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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 /* Array element maps */ \ | 128 /* Array element maps */ \ |
| 129 V(Map, fixed_uint8_array_map, FixedUint8ArrayMap) \ | 129 V(Map, fixed_uint8_array_map, FixedUint8ArrayMap) \ |
| 130 V(Map, fixed_int8_array_map, FixedInt8ArrayMap) \ | 130 V(Map, fixed_int8_array_map, FixedInt8ArrayMap) \ |
| 131 V(Map, fixed_uint16_array_map, FixedUint16ArrayMap) \ | 131 V(Map, fixed_uint16_array_map, FixedUint16ArrayMap) \ |
| 132 V(Map, fixed_int16_array_map, FixedInt16ArrayMap) \ | 132 V(Map, fixed_int16_array_map, FixedInt16ArrayMap) \ |
| 133 V(Map, fixed_uint32_array_map, FixedUint32ArrayMap) \ | 133 V(Map, fixed_uint32_array_map, FixedUint32ArrayMap) \ |
| 134 V(Map, fixed_int32_array_map, FixedInt32ArrayMap) \ | 134 V(Map, fixed_int32_array_map, FixedInt32ArrayMap) \ |
| 135 V(Map, fixed_float32_array_map, FixedFloat32ArrayMap) \ | 135 V(Map, fixed_float32_array_map, FixedFloat32ArrayMap) \ |
| 136 V(Map, fixed_float64_array_map, FixedFloat64ArrayMap) \ | 136 V(Map, fixed_float64_array_map, FixedFloat64ArrayMap) \ |
| 137 V(Map, fixed_uint8_clamped_array_map, FixedUint8ClampedArrayMap) \ | 137 V(Map, fixed_uint8_clamped_array_map, FixedUint8ClampedArrayMap) \ |
| 138 V(Map, float32x4_map, Float32x4Map) \ | |
| 139 V(Map, int32x4_map, Int32x4Map) \ | |
| 140 V(Map, uint32x4_map, Uint32x4Map) \ | |
| 141 V(Map, bool32x4_map, Bool32x4Map) \ | |
| 142 V(Map, int16x8_map, Int16x8Map) \ | |
| 143 V(Map, uint16x8_map, Uint16x8Map) \ | |
| 144 V(Map, bool16x8_map, Bool16x8Map) \ | |
| 145 V(Map, int8x16_map, Int8x16Map) \ | |
| 146 V(Map, uint8x16_map, Uint8x16Map) \ | |
| 147 V(Map, bool8x16_map, Bool8x16Map) \ | |
| 148 /* Canonical empty values */ \ | 138 /* Canonical empty values */ \ |
| 149 V(ByteArray, empty_byte_array, EmptyByteArray) \ | 139 V(ByteArray, empty_byte_array, EmptyByteArray) \ |
| 150 V(FixedTypedArrayBase, empty_fixed_uint8_array, EmptyFixedUint8Array) \ | 140 V(FixedTypedArrayBase, empty_fixed_uint8_array, EmptyFixedUint8Array) \ |
| 151 V(FixedTypedArrayBase, empty_fixed_int8_array, EmptyFixedInt8Array) \ | 141 V(FixedTypedArrayBase, empty_fixed_int8_array, EmptyFixedInt8Array) \ |
| 152 V(FixedTypedArrayBase, empty_fixed_uint16_array, EmptyFixedUint16Array) \ | 142 V(FixedTypedArrayBase, empty_fixed_uint16_array, EmptyFixedUint16Array) \ |
| 153 V(FixedTypedArrayBase, empty_fixed_int16_array, EmptyFixedInt16Array) \ | 143 V(FixedTypedArrayBase, empty_fixed_int16_array, EmptyFixedInt16Array) \ |
| 154 V(FixedTypedArrayBase, empty_fixed_uint32_array, EmptyFixedUint32Array) \ | 144 V(FixedTypedArrayBase, empty_fixed_uint32_array, EmptyFixedUint32Array) \ |
| 155 V(FixedTypedArrayBase, empty_fixed_int32_array, EmptyFixedInt32Array) \ | 145 V(FixedTypedArrayBase, empty_fixed_int32_array, EmptyFixedInt32Array) \ |
| 156 V(FixedTypedArrayBase, empty_fixed_float32_array, EmptyFixedFloat32Array) \ | 146 V(FixedTypedArrayBase, empty_fixed_float32_array, EmptyFixedFloat32Array) \ |
| 157 V(FixedTypedArrayBase, empty_fixed_float64_array, EmptyFixedFloat64Array) \ | 147 V(FixedTypedArrayBase, empty_fixed_float64_array, EmptyFixedFloat64Array) \ |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 V(NullValue) \ | 262 V(NullValue) \ |
| 273 V(TrueValue) \ | 263 V(TrueValue) \ |
| 274 V(FalseValue) \ | 264 V(FalseValue) \ |
| 275 V(UninitializedValue) \ | 265 V(UninitializedValue) \ |
| 276 V(CellMap) \ | 266 V(CellMap) \ |
| 277 V(GlobalPropertyCellMap) \ | 267 V(GlobalPropertyCellMap) \ |
| 278 V(SharedFunctionInfoMap) \ | 268 V(SharedFunctionInfoMap) \ |
| 279 V(MetaMap) \ | 269 V(MetaMap) \ |
| 280 V(HeapNumberMap) \ | 270 V(HeapNumberMap) \ |
| 281 V(MutableHeapNumberMap) \ | 271 V(MutableHeapNumberMap) \ |
| 282 V(Float32x4Map) \ | |
| 283 V(Int32x4Map) \ | |
| 284 V(Uint32x4Map) \ | |
| 285 V(Bool32x4Map) \ | |
| 286 V(Int16x8Map) \ | |
| 287 V(Uint16x8Map) \ | |
| 288 V(Bool16x8Map) \ | |
| 289 V(Int8x16Map) \ | |
| 290 V(Uint8x16Map) \ | |
| 291 V(Bool8x16Map) \ | |
| 292 V(NativeContextMap) \ | 272 V(NativeContextMap) \ |
| 293 V(FixedArrayMap) \ | 273 V(FixedArrayMap) \ |
| 294 V(CodeMap) \ | 274 V(CodeMap) \ |
| 295 V(ScopeInfoMap) \ | 275 V(ScopeInfoMap) \ |
| 296 V(ModuleInfoMap) \ | 276 V(ModuleInfoMap) \ |
| 297 V(FixedCOWArrayMap) \ | 277 V(FixedCOWArrayMap) \ |
| 298 V(FixedDoubleArrayMap) \ | 278 V(FixedDoubleArrayMap) \ |
| 299 V(WeakCellMap) \ | 279 V(WeakCellMap) \ |
| 300 V(TransitionArrayMap) \ | 280 V(TransitionArrayMap) \ |
| 301 V(NoInterceptorResultSentinel) \ | 281 V(NoInterceptorResultSentinel) \ |
| (...skipping 1645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1947 // Passing an allocation site means that a memento will be created that | 1927 // Passing an allocation site means that a memento will be created that |
| 1948 // points to the site. | 1928 // points to the site. |
| 1949 MUST_USE_RESULT AllocationResult | 1929 MUST_USE_RESULT AllocationResult |
| 1950 AllocateJSObjectFromMap(Map* map, PretenureFlag pretenure = NOT_TENURED, | 1930 AllocateJSObjectFromMap(Map* map, PretenureFlag pretenure = NOT_TENURED, |
| 1951 AllocationSite* allocation_site = NULL); | 1931 AllocationSite* allocation_site = NULL); |
| 1952 | 1932 |
| 1953 // Allocates a HeapNumber from value. | 1933 // Allocates a HeapNumber from value. |
| 1954 MUST_USE_RESULT AllocationResult AllocateHeapNumber( | 1934 MUST_USE_RESULT AllocationResult AllocateHeapNumber( |
| 1955 MutableMode mode = IMMUTABLE, PretenureFlag pretenure = NOT_TENURED); | 1935 MutableMode mode = IMMUTABLE, PretenureFlag pretenure = NOT_TENURED); |
| 1956 | 1936 |
| 1957 // Allocates SIMD values from the given lane values. | |
| 1958 #define SIMD_ALLOCATE_DECLARATION(TYPE, Type, type, lane_count, lane_type) \ | |
| 1959 AllocationResult Allocate##Type(lane_type lanes[lane_count], \ | |
| 1960 PretenureFlag pretenure = NOT_TENURED); | |
| 1961 SIMD128_TYPES(SIMD_ALLOCATE_DECLARATION) | |
| 1962 #undef SIMD_ALLOCATE_DECLARATION | |
| 1963 | |
| 1964 // Allocates a byte array of the specified length | 1937 // Allocates a byte array of the specified length |
| 1965 MUST_USE_RESULT AllocationResult | 1938 MUST_USE_RESULT AllocationResult |
| 1966 AllocateByteArray(int length, PretenureFlag pretenure = NOT_TENURED); | 1939 AllocateByteArray(int length, PretenureFlag pretenure = NOT_TENURED); |
| 1967 | 1940 |
| 1968 // Allocates a bytecode array with given contents. | 1941 // Allocates a bytecode array with given contents. |
| 1969 MUST_USE_RESULT AllocationResult | 1942 MUST_USE_RESULT AllocationResult |
| 1970 AllocateBytecodeArray(int length, const byte* raw_bytecodes, int frame_size, | 1943 AllocateBytecodeArray(int length, const byte* raw_bytecodes, int frame_size, |
| 1971 int parameter_count, FixedArray* constant_pool); | 1944 int parameter_count, FixedArray* constant_pool); |
| 1972 | 1945 |
| 1973 MUST_USE_RESULT AllocationResult CopyCode(Code* code); | 1946 MUST_USE_RESULT AllocationResult CopyCode(Code* code); |
| (...skipping 693 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2667 friend class LargeObjectSpace; | 2640 friend class LargeObjectSpace; |
| 2668 friend class NewSpace; | 2641 friend class NewSpace; |
| 2669 friend class PagedSpace; | 2642 friend class PagedSpace; |
| 2670 DISALLOW_COPY_AND_ASSIGN(AllocationObserver); | 2643 DISALLOW_COPY_AND_ASSIGN(AllocationObserver); |
| 2671 }; | 2644 }; |
| 2672 | 2645 |
| 2673 } // namespace internal | 2646 } // namespace internal |
| 2674 } // namespace v8 | 2647 } // namespace v8 |
| 2675 | 2648 |
| 2676 #endif // V8_HEAP_HEAP_H_ | 2649 #endif // V8_HEAP_HEAP_H_ |
| OLD | NEW |