| 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 30 matching lines...) Expand all Loading... |
| 41 V(Oddball, false_value, FalseValue) \ | 41 V(Oddball, false_value, FalseValue) \ |
| 42 V(String, empty_string, empty_string) \ | 42 V(String, empty_string, empty_string) \ |
| 43 V(Oddball, uninitialized_value, UninitializedValue) \ | 43 V(Oddball, uninitialized_value, UninitializedValue) \ |
| 44 V(Map, cell_map, CellMap) \ | 44 V(Map, cell_map, CellMap) \ |
| 45 V(Map, global_property_cell_map, GlobalPropertyCellMap) \ | 45 V(Map, global_property_cell_map, GlobalPropertyCellMap) \ |
| 46 V(Map, shared_function_info_map, SharedFunctionInfoMap) \ | 46 V(Map, shared_function_info_map, SharedFunctionInfoMap) \ |
| 47 V(Map, meta_map, MetaMap) \ | 47 V(Map, meta_map, MetaMap) \ |
| 48 V(Map, heap_number_map, HeapNumberMap) \ | 48 V(Map, heap_number_map, HeapNumberMap) \ |
| 49 V(Map, mutable_heap_number_map, MutableHeapNumberMap) \ | 49 V(Map, mutable_heap_number_map, MutableHeapNumberMap) \ |
| 50 V(Map, float32x4_map, Float32x4Map) \ | 50 V(Map, float32x4_map, Float32x4Map) \ |
| 51 V(Map, int32x4_map, Int32x4Map) \ |
| 52 V(Map, bool32x4_map, Bool32x4Map) \ |
| 53 V(Map, int16x8_map, Int16x8Map) \ |
| 54 V(Map, bool16x8_map, Bool16x8Map) \ |
| 55 V(Map, int8x16_map, Int8x16Map) \ |
| 56 V(Map, bool8x16_map, Bool8x16Map) \ |
| 51 V(Map, native_context_map, NativeContextMap) \ | 57 V(Map, native_context_map, NativeContextMap) \ |
| 52 V(Map, fixed_array_map, FixedArrayMap) \ | 58 V(Map, fixed_array_map, FixedArrayMap) \ |
| 53 V(Map, code_map, CodeMap) \ | 59 V(Map, code_map, CodeMap) \ |
| 54 V(Map, scope_info_map, ScopeInfoMap) \ | 60 V(Map, scope_info_map, ScopeInfoMap) \ |
| 55 V(Map, fixed_cow_array_map, FixedCOWArrayMap) \ | 61 V(Map, fixed_cow_array_map, FixedCOWArrayMap) \ |
| 56 V(Map, fixed_double_array_map, FixedDoubleArrayMap) \ | 62 V(Map, fixed_double_array_map, FixedDoubleArrayMap) \ |
| 57 V(Map, weak_cell_map, WeakCellMap) \ | 63 V(Map, weak_cell_map, WeakCellMap) \ |
| 58 V(Map, one_byte_string_map, OneByteStringMap) \ | 64 V(Map, one_byte_string_map, OneByteStringMap) \ |
| 59 V(Map, one_byte_internalized_string_map, OneByteInternalizedStringMap) \ | 65 V(Map, one_byte_internalized_string_map, OneByteInternalizedStringMap) \ |
| 60 V(Map, function_context_map, FunctionContextMap) \ | 66 V(Map, function_context_map, FunctionContextMap) \ |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 V(Arguments_string, "Arguments") \ | 212 V(Arguments_string, "Arguments") \ |
| 207 V(caller_string, "caller") \ | 213 V(caller_string, "caller") \ |
| 208 V(boolean_string, "boolean") \ | 214 V(boolean_string, "boolean") \ |
| 209 V(Boolean_string, "Boolean") \ | 215 V(Boolean_string, "Boolean") \ |
| 210 V(callee_string, "callee") \ | 216 V(callee_string, "callee") \ |
| 211 V(constructor_string, "constructor") \ | 217 V(constructor_string, "constructor") \ |
| 212 V(dot_result_string, ".result") \ | 218 V(dot_result_string, ".result") \ |
| 213 V(eval_string, "eval") \ | 219 V(eval_string, "eval") \ |
| 214 V(float32x4_string, "float32x4") \ | 220 V(float32x4_string, "float32x4") \ |
| 215 V(Float32x4_string, "Float32x4") \ | 221 V(Float32x4_string, "Float32x4") \ |
| 222 V(int32x4_string, "int32x4") \ |
| 223 V(Int32x4_string, "Int32x4") \ |
| 224 V(bool32x4_string, "bool32x4") \ |
| 225 V(Bool32x4_string, "Bool32x4") \ |
| 226 V(int16x8_string, "int16x8") \ |
| 227 V(Int16x8_string, "Int16x8") \ |
| 228 V(bool16x8_string, "bool16x8") \ |
| 229 V(Bool16x8_string, "Bool16x8") \ |
| 230 V(int8x16_string, "int8x16") \ |
| 231 V(Int8x16_string, "Int8x16") \ |
| 232 V(bool8x16_string, "bool8x16") \ |
| 233 V(Bool8x16_string, "Bool8x16") \ |
| 216 V(function_string, "function") \ | 234 V(function_string, "function") \ |
| 217 V(Function_string, "Function") \ | 235 V(Function_string, "Function") \ |
| 218 V(length_string, "length") \ | 236 V(length_string, "length") \ |
| 219 V(name_string, "name") \ | 237 V(name_string, "name") \ |
| 220 V(null_string, "null") \ | 238 V(null_string, "null") \ |
| 221 V(number_string, "number") \ | 239 V(number_string, "number") \ |
| 222 V(Number_string, "Number") \ | 240 V(Number_string, "Number") \ |
| 223 V(nan_string, "NaN") \ | 241 V(nan_string, "NaN") \ |
| 224 V(source_string, "source") \ | 242 V(source_string, "source") \ |
| 225 V(source_url_string, "source_url") \ | 243 V(source_url_string, "source_url") \ |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 V(TrueValue) \ | 349 V(TrueValue) \ |
| 332 V(FalseValue) \ | 350 V(FalseValue) \ |
| 333 V(UninitializedValue) \ | 351 V(UninitializedValue) \ |
| 334 V(CellMap) \ | 352 V(CellMap) \ |
| 335 V(GlobalPropertyCellMap) \ | 353 V(GlobalPropertyCellMap) \ |
| 336 V(SharedFunctionInfoMap) \ | 354 V(SharedFunctionInfoMap) \ |
| 337 V(MetaMap) \ | 355 V(MetaMap) \ |
| 338 V(HeapNumberMap) \ | 356 V(HeapNumberMap) \ |
| 339 V(MutableHeapNumberMap) \ | 357 V(MutableHeapNumberMap) \ |
| 340 V(Float32x4Map) \ | 358 V(Float32x4Map) \ |
| 359 V(Int32x4Map) \ |
| 360 V(Bool32x4Map) \ |
| 361 V(Int16x8Map) \ |
| 362 V(Bool16x8Map) \ |
| 363 V(Int8x16Map) \ |
| 364 V(Bool8x16Map) \ |
| 341 V(NativeContextMap) \ | 365 V(NativeContextMap) \ |
| 342 V(FixedArrayMap) \ | 366 V(FixedArrayMap) \ |
| 343 V(CodeMap) \ | 367 V(CodeMap) \ |
| 344 V(ScopeInfoMap) \ | 368 V(ScopeInfoMap) \ |
| 345 V(FixedCOWArrayMap) \ | 369 V(FixedCOWArrayMap) \ |
| 346 V(FixedDoubleArrayMap) \ | 370 V(FixedDoubleArrayMap) \ |
| 347 V(WeakCellMap) \ | 371 V(WeakCellMap) \ |
| 348 V(NoInterceptorResultSentinel) \ | 372 V(NoInterceptorResultSentinel) \ |
| 349 V(HashTableMap) \ | 373 V(HashTableMap) \ |
| 350 V(OrderedHashTableMap) \ | 374 V(OrderedHashTableMap) \ |
| (...skipping 1289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1640 // points to the site. | 1664 // points to the site. |
| 1641 MUST_USE_RESULT AllocationResult | 1665 MUST_USE_RESULT AllocationResult |
| 1642 AllocateJSObjectFromMap(Map* map, PretenureFlag pretenure = NOT_TENURED, | 1666 AllocateJSObjectFromMap(Map* map, PretenureFlag pretenure = NOT_TENURED, |
| 1643 AllocationSite* allocation_site = NULL); | 1667 AllocationSite* allocation_site = NULL); |
| 1644 | 1668 |
| 1645 // Allocates a HeapNumber from value. | 1669 // Allocates a HeapNumber from value. |
| 1646 MUST_USE_RESULT AllocationResult | 1670 MUST_USE_RESULT AllocationResult |
| 1647 AllocateHeapNumber(double value, MutableMode mode = IMMUTABLE, | 1671 AllocateHeapNumber(double value, MutableMode mode = IMMUTABLE, |
| 1648 PretenureFlag pretenure = NOT_TENURED); | 1672 PretenureFlag pretenure = NOT_TENURED); |
| 1649 | 1673 |
| 1650 // Allocates a Float32x4 from the given lane values. | 1674 // Allocates SIMD values from the given lane values. |
| 1651 MUST_USE_RESULT AllocationResult | 1675 #define SIMD_ALLOCATE_DECLARATION(type, type_name, lane_count, lane_type) \ |
| 1652 AllocateFloat32x4(float w, float x, float y, float z, | 1676 AllocationResult Allocate##type(lane_type lanes[lane_count], \ |
| 1653 PretenureFlag pretenure = NOT_TENURED); | 1677 PretenureFlag pretenure = NOT_TENURED); |
| 1678 |
| 1679 SIMD128_TYPES(SIMD_ALLOCATE_DECLARATION) |
| 1654 | 1680 |
| 1655 // Allocates a byte array of the specified length | 1681 // Allocates a byte array of the specified length |
| 1656 MUST_USE_RESULT AllocationResult | 1682 MUST_USE_RESULT AllocationResult |
| 1657 AllocateByteArray(int length, PretenureFlag pretenure = NOT_TENURED); | 1683 AllocateByteArray(int length, PretenureFlag pretenure = NOT_TENURED); |
| 1658 | 1684 |
| 1659 // Allocates a bytecode array with given contents. | 1685 // Allocates a bytecode array with given contents. |
| 1660 MUST_USE_RESULT AllocationResult | 1686 MUST_USE_RESULT AllocationResult |
| 1661 AllocateBytecodeArray(int length, const byte* raw_bytecodes, | 1687 AllocateBytecodeArray(int length, const byte* raw_bytecodes, |
| 1662 int frame_size); | 1688 int frame_size); |
| 1663 | 1689 |
| (...skipping 1197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2861 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. | 2887 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. |
| 2862 | 2888 |
| 2863 private: | 2889 private: |
| 2864 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 2890 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
| 2865 }; | 2891 }; |
| 2866 #endif // DEBUG | 2892 #endif // DEBUG |
| 2867 } | 2893 } |
| 2868 } // namespace v8::internal | 2894 } // namespace v8::internal |
| 2869 | 2895 |
| 2870 #endif // V8_HEAP_HEAP_H_ | 2896 #endif // V8_HEAP_HEAP_H_ |
| OLD | NEW |