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 28 matching lines...) Expand all Loading... |
39 V(Oddball, true_value, TrueValue) \ | 39 V(Oddball, true_value, TrueValue) \ |
40 V(Oddball, false_value, FalseValue) \ | 40 V(Oddball, false_value, FalseValue) \ |
41 V(String, empty_string, empty_string) \ | 41 V(String, empty_string, empty_string) \ |
42 V(Oddball, uninitialized_value, UninitializedValue) \ | 42 V(Oddball, uninitialized_value, UninitializedValue) \ |
43 V(Map, cell_map, CellMap) \ | 43 V(Map, cell_map, CellMap) \ |
44 V(Map, global_property_cell_map, GlobalPropertyCellMap) \ | 44 V(Map, global_property_cell_map, GlobalPropertyCellMap) \ |
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, float32x4_map, Float32x4Map) \ |
49 V(Map, native_context_map, NativeContextMap) \ | 50 V(Map, native_context_map, NativeContextMap) \ |
50 V(Map, fixed_array_map, FixedArrayMap) \ | 51 V(Map, fixed_array_map, FixedArrayMap) \ |
51 V(Map, code_map, CodeMap) \ | 52 V(Map, code_map, CodeMap) \ |
52 V(Map, scope_info_map, ScopeInfoMap) \ | 53 V(Map, scope_info_map, ScopeInfoMap) \ |
53 V(Map, fixed_cow_array_map, FixedCOWArrayMap) \ | 54 V(Map, fixed_cow_array_map, FixedCOWArrayMap) \ |
54 V(Map, fixed_double_array_map, FixedDoubleArrayMap) \ | 55 V(Map, fixed_double_array_map, FixedDoubleArrayMap) \ |
55 V(Map, constant_pool_array_map, ConstantPoolArrayMap) \ | 56 V(Map, constant_pool_array_map, ConstantPoolArrayMap) \ |
56 V(Map, weak_cell_map, WeakCellMap) \ | 57 V(Map, weak_cell_map, WeakCellMap) \ |
57 V(Map, one_byte_string_map, OneByteStringMap) \ | 58 V(Map, one_byte_string_map, OneByteStringMap) \ |
58 V(Map, one_byte_internalized_string_map, OneByteInternalizedStringMap) \ | 59 V(Map, one_byte_internalized_string_map, OneByteInternalizedStringMap) \ |
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
337 V(NullValue) \ | 338 V(NullValue) \ |
338 V(TrueValue) \ | 339 V(TrueValue) \ |
339 V(FalseValue) \ | 340 V(FalseValue) \ |
340 V(UninitializedValue) \ | 341 V(UninitializedValue) \ |
341 V(CellMap) \ | 342 V(CellMap) \ |
342 V(GlobalPropertyCellMap) \ | 343 V(GlobalPropertyCellMap) \ |
343 V(SharedFunctionInfoMap) \ | 344 V(SharedFunctionInfoMap) \ |
344 V(MetaMap) \ | 345 V(MetaMap) \ |
345 V(HeapNumberMap) \ | 346 V(HeapNumberMap) \ |
346 V(MutableHeapNumberMap) \ | 347 V(MutableHeapNumberMap) \ |
| 348 V(Float32x4Map) \ |
347 V(NativeContextMap) \ | 349 V(NativeContextMap) \ |
348 V(FixedArrayMap) \ | 350 V(FixedArrayMap) \ |
349 V(CodeMap) \ | 351 V(CodeMap) \ |
350 V(ScopeInfoMap) \ | 352 V(ScopeInfoMap) \ |
351 V(FixedCOWArrayMap) \ | 353 V(FixedCOWArrayMap) \ |
352 V(FixedDoubleArrayMap) \ | 354 V(FixedDoubleArrayMap) \ |
353 V(ConstantPoolArrayMap) \ | 355 V(ConstantPoolArrayMap) \ |
354 V(WeakCellMap) \ | 356 V(WeakCellMap) \ |
355 V(NoInterceptorResultSentinel) \ | 357 V(NoInterceptorResultSentinel) \ |
356 V(HashTableMap) \ | 358 V(HashTableMap) \ |
(...skipping 1238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1595 AllocationSite* allocation_site = NULL); | 1597 AllocationSite* allocation_site = NULL); |
1596 | 1598 |
1597 // Allocates and initializes a new JavaScript object based on a map. | 1599 // Allocates and initializes a new JavaScript object based on a map. |
1598 // Passing an allocation site means that a memento will be created that | 1600 // Passing an allocation site means that a memento will be created that |
1599 // points to the site. | 1601 // points to the site. |
1600 MUST_USE_RESULT AllocationResult | 1602 MUST_USE_RESULT AllocationResult |
1601 AllocateJSObjectFromMap(Map* map, PretenureFlag pretenure = NOT_TENURED, | 1603 AllocateJSObjectFromMap(Map* map, PretenureFlag pretenure = NOT_TENURED, |
1602 bool alloc_props = true, | 1604 bool alloc_props = true, |
1603 AllocationSite* allocation_site = NULL); | 1605 AllocationSite* allocation_site = NULL); |
1604 | 1606 |
1605 // Allocated a HeapNumber from value. | 1607 // Allocates a HeapNumber from value. |
1606 MUST_USE_RESULT AllocationResult | 1608 MUST_USE_RESULT AllocationResult |
1607 AllocateHeapNumber(double value, MutableMode mode = IMMUTABLE, | 1609 AllocateHeapNumber(double value, MutableMode mode = IMMUTABLE, |
1608 PretenureFlag pretenure = NOT_TENURED); | 1610 PretenureFlag pretenure = NOT_TENURED); |
1609 | 1611 |
1610 // Allocate a byte array of the specified length | 1612 // Allocates a Float32x4 from the given lane values. |
| 1613 MUST_USE_RESULT AllocationResult |
| 1614 AllocateFloat32x4(float w, float x, float y, float z, |
| 1615 PretenureFlag pretenure = NOT_TENURED); |
| 1616 |
| 1617 // Allocates a byte array of the specified length |
1611 MUST_USE_RESULT AllocationResult | 1618 MUST_USE_RESULT AllocationResult |
1612 AllocateByteArray(int length, PretenureFlag pretenure = NOT_TENURED); | 1619 AllocateByteArray(int length, PretenureFlag pretenure = NOT_TENURED); |
1613 | 1620 |
1614 // Copy the code and scope info part of the code object, but insert | 1621 // Copy the code and scope info part of the code object, but insert |
1615 // the provided data as the relocation information. | 1622 // the provided data as the relocation information. |
1616 MUST_USE_RESULT AllocationResult | 1623 MUST_USE_RESULT AllocationResult |
1617 CopyCode(Code* code, Vector<byte> reloc_info); | 1624 CopyCode(Code* code, Vector<byte> reloc_info); |
1618 | 1625 |
1619 MUST_USE_RESULT AllocationResult CopyCode(Code* code); | 1626 MUST_USE_RESULT AllocationResult CopyCode(Code* code); |
1620 | 1627 |
(...skipping 1125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2746 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. | 2753 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. |
2747 | 2754 |
2748 private: | 2755 private: |
2749 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 2756 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
2750 }; | 2757 }; |
2751 #endif // DEBUG | 2758 #endif // DEBUG |
2752 } | 2759 } |
2753 } // namespace v8::internal | 2760 } // namespace v8::internal |
2754 | 2761 |
2755 #endif // V8_HEAP_HEAP_H_ | 2762 #endif // V8_HEAP_HEAP_H_ |
OLD | NEW |