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

Side by Side Diff: src/heap.h

Issue 150813004: In-heap small typed arrays (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Patch for landing Created 6 years, 8 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/flag-definitions.h ('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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 EmptyExternalUint8ClampedArray) \ 157 EmptyExternalUint8ClampedArray) \
158 V(Map, fixed_uint8_array_map, FixedUint8ArrayMap) \ 158 V(Map, fixed_uint8_array_map, FixedUint8ArrayMap) \
159 V(Map, fixed_int8_array_map, FixedInt8ArrayMap) \ 159 V(Map, fixed_int8_array_map, FixedInt8ArrayMap) \
160 V(Map, fixed_uint16_array_map, FixedUint16ArrayMap) \ 160 V(Map, fixed_uint16_array_map, FixedUint16ArrayMap) \
161 V(Map, fixed_int16_array_map, FixedInt16ArrayMap) \ 161 V(Map, fixed_int16_array_map, FixedInt16ArrayMap) \
162 V(Map, fixed_uint32_array_map, FixedUint32ArrayMap) \ 162 V(Map, fixed_uint32_array_map, FixedUint32ArrayMap) \
163 V(Map, fixed_int32_array_map, FixedInt32ArrayMap) \ 163 V(Map, fixed_int32_array_map, FixedInt32ArrayMap) \
164 V(Map, fixed_float32_array_map, FixedFloat32ArrayMap) \ 164 V(Map, fixed_float32_array_map, FixedFloat32ArrayMap) \
165 V(Map, fixed_float64_array_map, FixedFloat64ArrayMap) \ 165 V(Map, fixed_float64_array_map, FixedFloat64ArrayMap) \
166 V(Map, fixed_uint8_clamped_array_map, FixedUint8ClampedArrayMap) \ 166 V(Map, fixed_uint8_clamped_array_map, FixedUint8ClampedArrayMap) \
167 V(FixedTypedArrayBase, empty_fixed_uint8_array, EmptyFixedUint8Array) \
168 V(FixedTypedArrayBase, empty_fixed_int8_array, EmptyFixedInt8Array) \
169 V(FixedTypedArrayBase, empty_fixed_uint16_array, EmptyFixedUint16Array) \
170 V(FixedTypedArrayBase, empty_fixed_int16_array, EmptyFixedInt16Array) \
171 V(FixedTypedArrayBase, empty_fixed_uint32_array, EmptyFixedUint32Array) \
172 V(FixedTypedArrayBase, empty_fixed_int32_array, EmptyFixedInt32Array) \
173 V(FixedTypedArrayBase, empty_fixed_float32_array, EmptyFixedFloat32Array) \
174 V(FixedTypedArrayBase, empty_fixed_float64_array, EmptyFixedFloat64Array) \
175 V(FixedTypedArrayBase, empty_fixed_uint8_clamped_array, \
176 EmptyFixedUint8ClampedArray) \
167 V(Map, sloppy_arguments_elements_map, SloppyArgumentsElementsMap) \ 177 V(Map, sloppy_arguments_elements_map, SloppyArgumentsElementsMap) \
168 V(Map, function_context_map, FunctionContextMap) \ 178 V(Map, function_context_map, FunctionContextMap) \
169 V(Map, catch_context_map, CatchContextMap) \ 179 V(Map, catch_context_map, CatchContextMap) \
170 V(Map, with_context_map, WithContextMap) \ 180 V(Map, with_context_map, WithContextMap) \
171 V(Map, block_context_map, BlockContextMap) \ 181 V(Map, block_context_map, BlockContextMap) \
172 V(Map, module_context_map, ModuleContextMap) \ 182 V(Map, module_context_map, ModuleContextMap) \
173 V(Map, global_context_map, GlobalContextMap) \ 183 V(Map, global_context_map, GlobalContextMap) \
174 V(Map, oddball_map, OddballMap) \ 184 V(Map, oddball_map, OddballMap) \
175 V(Map, message_object_map, JSMessageObjectMap) \ 185 V(Map, message_object_map, JSMessageObjectMap) \
176 V(Map, foreign_map, ForeignMap) \ 186 V(Map, foreign_map, ForeignMap) \
(...skipping 1471 matching lines...) Expand 10 before | Expand all | Expand 10 after
1648 1658
1649 Map* MapForFixedTypedArray(ExternalArrayType array_type); 1659 Map* MapForFixedTypedArray(ExternalArrayType array_type);
1650 RootListIndex RootIndexForFixedTypedArray( 1660 RootListIndex RootIndexForFixedTypedArray(
1651 ExternalArrayType array_type); 1661 ExternalArrayType array_type);
1652 1662
1653 Map* MapForExternalArrayType(ExternalArrayType array_type); 1663 Map* MapForExternalArrayType(ExternalArrayType array_type);
1654 RootListIndex RootIndexForExternalArrayType( 1664 RootListIndex RootIndexForExternalArrayType(
1655 ExternalArrayType array_type); 1665 ExternalArrayType array_type);
1656 1666
1657 RootListIndex RootIndexForEmptyExternalArray(ElementsKind kind); 1667 RootListIndex RootIndexForEmptyExternalArray(ElementsKind kind);
1668 RootListIndex RootIndexForEmptyFixedTypedArray(ElementsKind kind);
1658 ExternalArray* EmptyExternalArrayForMap(Map* map); 1669 ExternalArray* EmptyExternalArrayForMap(Map* map);
1670 FixedTypedArrayBase* EmptyFixedTypedArrayForMap(Map* map);
1659 1671
1660 void RecordStats(HeapStats* stats, bool take_snapshot = false); 1672 void RecordStats(HeapStats* stats, bool take_snapshot = false);
1661 1673
1662 // Copy block of memory from src to dst. Size of block should be aligned 1674 // Copy block of memory from src to dst. Size of block should be aligned
1663 // by pointer size. 1675 // by pointer size.
1664 static inline void CopyBlock(Address dst, Address src, int byte_size); 1676 static inline void CopyBlock(Address dst, Address src, int byte_size);
1665 1677
1666 // Optimized version of memmove for blocks with pointer size aligned sizes and 1678 // Optimized version of memmove for blocks with pointer size aligned sizes and
1667 // pointer size aligned addresses. 1679 // pointer size aligned addresses.
1668 static inline void MoveBlock(Address dst, Address src, int byte_size); 1680 static inline void MoveBlock(Address dst, Address src, int byte_size);
(...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after
2214 ElementsKind elements_kind, 2226 ElementsKind elements_kind,
2215 PretenureFlag pretenure = NOT_TENURED); 2227 PretenureFlag pretenure = NOT_TENURED);
2216 2228
2217 // Allocate empty fixed array. 2229 // Allocate empty fixed array.
2218 MUST_USE_RESULT MaybeObject* AllocateEmptyFixedArray(); 2230 MUST_USE_RESULT MaybeObject* AllocateEmptyFixedArray();
2219 2231
2220 // Allocate empty external array of given type. 2232 // Allocate empty external array of given type.
2221 MUST_USE_RESULT MaybeObject* AllocateEmptyExternalArray( 2233 MUST_USE_RESULT MaybeObject* AllocateEmptyExternalArray(
2222 ExternalArrayType array_type); 2234 ExternalArrayType array_type);
2223 2235
2236 // Allocate empty fixed typed array of given type.
2237 MUST_USE_RESULT MaybeObject* AllocateEmptyFixedTypedArray(
2238 ExternalArrayType array_type);
2239
2224 // Allocate empty fixed double array. 2240 // Allocate empty fixed double array.
2225 MUST_USE_RESULT MaybeObject* AllocateEmptyFixedDoubleArray(); 2241 MUST_USE_RESULT MaybeObject* AllocateEmptyFixedDoubleArray();
2226 2242
2227 // Allocate empty constant pool array. 2243 // Allocate empty constant pool array.
2228 MUST_USE_RESULT MaybeObject* AllocateEmptyConstantPoolArray(); 2244 MUST_USE_RESULT MaybeObject* AllocateEmptyConstantPoolArray();
2229 2245
2230 // Allocate a tenured simple cell. 2246 // Allocate a tenured simple cell.
2231 MUST_USE_RESULT MaybeObject* AllocateCell(Object* value); 2247 MUST_USE_RESULT MaybeObject* AllocateCell(Object* value);
2232 2248
2233 // Allocate a tenured JS global property cell initialized with the hole. 2249 // Allocate a tenured JS global property cell initialized with the hole.
(...skipping 892 matching lines...) Expand 10 before | Expand all | Expand 10 after
3126 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. 3142 DisallowHeapAllocation no_allocation; // i.e. no gc allowed.
3127 3143
3128 private: 3144 private:
3129 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); 3145 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer);
3130 }; 3146 };
3131 #endif // DEBUG 3147 #endif // DEBUG
3132 3148
3133 } } // namespace v8::internal 3149 } } // namespace v8::internal
3134 3150
3135 #endif // V8_HEAP_H_ 3151 #endif // V8_HEAP_H_
OLDNEW
« no previous file with comments | « src/flag-definitions.h ('k') | src/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698