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

Side by Side Diff: src/heap.h

Issue 132233012: Revert "Implement in-heap backing store for typed arrays." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « src/factory.cc ('k') | src/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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 V(ExternalArray, empty_external_short_array, EmptyExternalShortArray) \ 149 V(ExternalArray, empty_external_short_array, EmptyExternalShortArray) \
150 V(ExternalArray, empty_external_unsigned_short_array, \ 150 V(ExternalArray, empty_external_unsigned_short_array, \
151 EmptyExternalUnsignedShortArray) \ 151 EmptyExternalUnsignedShortArray) \
152 V(ExternalArray, empty_external_int_array, EmptyExternalIntArray) \ 152 V(ExternalArray, empty_external_int_array, EmptyExternalIntArray) \
153 V(ExternalArray, empty_external_unsigned_int_array, \ 153 V(ExternalArray, empty_external_unsigned_int_array, \
154 EmptyExternalUnsignedIntArray) \ 154 EmptyExternalUnsignedIntArray) \
155 V(ExternalArray, empty_external_float_array, EmptyExternalFloatArray) \ 155 V(ExternalArray, empty_external_float_array, EmptyExternalFloatArray) \
156 V(ExternalArray, empty_external_double_array, EmptyExternalDoubleArray) \ 156 V(ExternalArray, empty_external_double_array, EmptyExternalDoubleArray) \
157 V(ExternalArray, empty_external_pixel_array, \ 157 V(ExternalArray, empty_external_pixel_array, \
158 EmptyExternalPixelArray) \ 158 EmptyExternalPixelArray) \
159 V(Map, fixed_uint8_array_map, FixedUint8ArrayMap) \
160 V(Map, fixed_int8_array_map, FixedInt8ArrayMap) \
161 V(Map, fixed_uint16_array_map, FixedUint16ArrayMap) \
162 V(Map, fixed_int16_array_map, FixedInt16ArrayMap) \
163 V(Map, fixed_uint32_array_map, FixedUint32ArrayMap) \
164 V(Map, fixed_int32_array_map, FixedInt32ArrayMap) \
165 V(Map, fixed_float32_array_map, FixedFloat32ArrayMap) \
166 V(Map, fixed_float64_array_map, FixedFloat64ArrayMap) \
167 V(Map, fixed_uint8_clamped_array_map, FixedUint8ClampedArrayMap) \
168 V(Map, non_strict_arguments_elements_map, NonStrictArgumentsElementsMap) \ 159 V(Map, non_strict_arguments_elements_map, NonStrictArgumentsElementsMap) \
169 V(Map, function_context_map, FunctionContextMap) \ 160 V(Map, function_context_map, FunctionContextMap) \
170 V(Map, catch_context_map, CatchContextMap) \ 161 V(Map, catch_context_map, CatchContextMap) \
171 V(Map, with_context_map, WithContextMap) \ 162 V(Map, with_context_map, WithContextMap) \
172 V(Map, block_context_map, BlockContextMap) \ 163 V(Map, block_context_map, BlockContextMap) \
173 V(Map, module_context_map, ModuleContextMap) \ 164 V(Map, module_context_map, ModuleContextMap) \
174 V(Map, global_context_map, GlobalContextMap) \ 165 V(Map, global_context_map, GlobalContextMap) \
175 V(Map, oddball_map, OddballMap) \ 166 V(Map, oddball_map, OddballMap) \
176 V(Map, message_object_map, JSMessageObjectMap) \ 167 V(Map, message_object_map, JSMessageObjectMap) \
177 V(Map, foreign_map, ForeignMap) \ 168 V(Map, foreign_map, ForeignMap) \
(...skipping 699 matching lines...) Expand 10 before | Expand all | Expand 10 after
877 // Allocates an external array of the specified length and type. 868 // Allocates an external array of the specified length and type.
878 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation 869 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation
879 // failed. 870 // failed.
880 // Please note this does not perform a garbage collection. 871 // Please note this does not perform a garbage collection.
881 MUST_USE_RESULT MaybeObject* AllocateExternalArray( 872 MUST_USE_RESULT MaybeObject* AllocateExternalArray(
882 int length, 873 int length,
883 ExternalArrayType array_type, 874 ExternalArrayType array_type,
884 void* external_pointer, 875 void* external_pointer,
885 PretenureFlag pretenure); 876 PretenureFlag pretenure);
886 877
887 // Allocates a fixed typed array of the specified length and type.
888 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation
889 // failed.
890 // Please note this does not perform a garbage collection.
891 MUST_USE_RESULT MaybeObject* AllocateFixedTypedArray(
892 int length,
893 ExternalArrayType array_type,
894 PretenureFlag pretenure);
895
896 // Allocate a symbol in old space. 878 // Allocate a symbol in old space.
897 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation 879 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation
898 // failed. 880 // failed.
899 // Please note this does not perform a garbage collection. 881 // Please note this does not perform a garbage collection.
900 MUST_USE_RESULT MaybeObject* AllocateSymbol(); 882 MUST_USE_RESULT MaybeObject* AllocateSymbol();
901 MUST_USE_RESULT MaybeObject* AllocatePrivateSymbol(); 883 MUST_USE_RESULT MaybeObject* AllocatePrivateSymbol();
902 884
903 // Allocate a tenured AllocationSite. It's payload is null 885 // Allocate a tenured AllocationSite. It's payload is null
904 MUST_USE_RESULT MaybeObject* AllocateAllocationSite(); 886 MUST_USE_RESULT MaybeObject* AllocateAllocationSite();
905 887
(...skipping 666 matching lines...) Expand 10 before | Expand all | Expand 10 after
1572 static bool RootCanBeWrittenAfterInitialization(RootListIndex root_index); 1554 static bool RootCanBeWrittenAfterInitialization(RootListIndex root_index);
1573 // Generated code can treat direct references to this root as constant. 1555 // Generated code can treat direct references to this root as constant.
1574 bool RootCanBeTreatedAsConstant(RootListIndex root_index); 1556 bool RootCanBeTreatedAsConstant(RootListIndex root_index);
1575 1557
1576 MUST_USE_RESULT MaybeObject* NumberToString( 1558 MUST_USE_RESULT MaybeObject* NumberToString(
1577 Object* number, bool check_number_string_cache = true, 1559 Object* number, bool check_number_string_cache = true,
1578 PretenureFlag pretenure = NOT_TENURED); 1560 PretenureFlag pretenure = NOT_TENURED);
1579 MUST_USE_RESULT MaybeObject* Uint32ToString( 1561 MUST_USE_RESULT MaybeObject* Uint32ToString(
1580 uint32_t value, bool check_number_string_cache = true); 1562 uint32_t value, bool check_number_string_cache = true);
1581 1563
1582 Map* MapForFixedTypedArray(ExternalArrayType array_type);
1583 RootListIndex RootIndexForFixedTypedArray(
1584 ExternalArrayType array_type);
1585
1586 Map* MapForExternalArrayType(ExternalArrayType array_type); 1564 Map* MapForExternalArrayType(ExternalArrayType array_type);
1587 RootListIndex RootIndexForExternalArrayType( 1565 RootListIndex RootIndexForExternalArrayType(
1588 ExternalArrayType array_type); 1566 ExternalArrayType array_type);
1589 1567
1590 RootListIndex RootIndexForEmptyExternalArray(ElementsKind kind); 1568 RootListIndex RootIndexForEmptyExternalArray(ElementsKind kind);
1591 ExternalArray* EmptyExternalArrayForMap(Map* map); 1569 ExternalArray* EmptyExternalArrayForMap(Map* map);
1592 1570
1593 void RecordStats(HeapStats* stats, bool take_snapshot = false); 1571 void RecordStats(HeapStats* stats, bool take_snapshot = false);
1594 1572
1595 // Copy block of memory from src to dst. Size of block should be aligned 1573 // Copy block of memory from src to dst. Size of block should be aligned
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
1858 MaybeObject* AddWeakObjectToCodeDependency(Object* obj, DependentCode* dep); 1836 MaybeObject* AddWeakObjectToCodeDependency(Object* obj, DependentCode* dep);
1859 1837
1860 DependentCode* LookupWeakObjectToCodeDependency(Object* obj); 1838 DependentCode* LookupWeakObjectToCodeDependency(Object* obj);
1861 1839
1862 void InitializeWeakObjectToCodeTable() { 1840 void InitializeWeakObjectToCodeTable() {
1863 set_weak_object_to_code_table(undefined_value()); 1841 set_weak_object_to_code_table(undefined_value());
1864 } 1842 }
1865 1843
1866 void EnsureWeakObjectToCodeTable(); 1844 void EnsureWeakObjectToCodeTable();
1867 1845
1868 static void FatalProcessOutOfMemory(const char* location,
1869 bool take_snapshot = false);
1870
1871 private: 1846 private:
1872 Heap(); 1847 Heap();
1873 1848
1874 // This can be calculated directly from a pointer to the heap; however, it is 1849 // This can be calculated directly from a pointer to the heap; however, it is
1875 // more expedient to get at the isolate directly from within Heap methods. 1850 // more expedient to get at the isolate directly from within Heap methods.
1876 Isolate* isolate_; 1851 Isolate* isolate_;
1877 1852
1878 Object* roots_[kRootListLength]; 1853 Object* roots_[kRootListLength];
1879 1854
1880 intptr_t code_range_size_; 1855 intptr_t code_range_size_;
(...skipping 1162 matching lines...) Expand 10 before | Expand all | Expand 10 after
3043 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. 3018 DisallowHeapAllocation no_allocation; // i.e. no gc allowed.
3044 3019
3045 private: 3020 private:
3046 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); 3021 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer);
3047 }; 3022 };
3048 #endif // DEBUG 3023 #endif // DEBUG
3049 3024
3050 } } // namespace v8::internal 3025 } } // namespace v8::internal
3051 3026
3052 #endif // V8_HEAP_H_ 3027 #endif // V8_HEAP_H_
OLDNEW
« no previous file with comments | « src/factory.cc ('k') | src/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698