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

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 review Created 6 years, 9 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
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, non_strict_arguments_elements_map, NonStrictArgumentsElementsMap) \ 177 V(Map, non_strict_arguments_elements_map, NonStrictArgumentsElementsMap) \
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 1453 matching lines...) Expand 10 before | Expand all | Expand 10 after
1630 1640
1631 Map* MapForFixedTypedArray(ExternalArrayType array_type); 1641 Map* MapForFixedTypedArray(ExternalArrayType array_type);
1632 RootListIndex RootIndexForFixedTypedArray( 1642 RootListIndex RootIndexForFixedTypedArray(
1633 ExternalArrayType array_type); 1643 ExternalArrayType array_type);
1634 1644
1635 Map* MapForExternalArrayType(ExternalArrayType array_type); 1645 Map* MapForExternalArrayType(ExternalArrayType array_type);
1636 RootListIndex RootIndexForExternalArrayType( 1646 RootListIndex RootIndexForExternalArrayType(
1637 ExternalArrayType array_type); 1647 ExternalArrayType array_type);
1638 1648
1639 RootListIndex RootIndexForEmptyExternalArray(ElementsKind kind); 1649 RootListIndex RootIndexForEmptyExternalArray(ElementsKind kind);
1650 RootListIndex RootIndexForEmptyFixedTypedArray(ElementsKind kind);
1640 ExternalArray* EmptyExternalArrayForMap(Map* map); 1651 ExternalArray* EmptyExternalArrayForMap(Map* map);
1652 FixedTypedArrayBase* EmptyFixedTypedArrayForMap(Map* map);
1641 1653
1642 void RecordStats(HeapStats* stats, bool take_snapshot = false); 1654 void RecordStats(HeapStats* stats, bool take_snapshot = false);
1643 1655
1644 // Copy block of memory from src to dst. Size of block should be aligned 1656 // Copy block of memory from src to dst. Size of block should be aligned
1645 // by pointer size. 1657 // by pointer size.
1646 static inline void CopyBlock(Address dst, Address src, int byte_size); 1658 static inline void CopyBlock(Address dst, Address src, int byte_size);
1647 1659
1648 // Optimized version of memmove for blocks with pointer size aligned sizes and 1660 // Optimized version of memmove for blocks with pointer size aligned sizes and
1649 // pointer size aligned addresses. 1661 // pointer size aligned addresses.
1650 static inline void MoveBlock(Address dst, Address src, int byte_size); 1662 static inline void MoveBlock(Address dst, Address src, int byte_size);
(...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after
2204 ElementsKind elements_kind, 2216 ElementsKind elements_kind,
2205 PretenureFlag pretenure = NOT_TENURED); 2217 PretenureFlag pretenure = NOT_TENURED);
2206 2218
2207 // Allocate empty fixed array. 2219 // Allocate empty fixed array.
2208 MUST_USE_RESULT MaybeObject* AllocateEmptyFixedArray(); 2220 MUST_USE_RESULT MaybeObject* AllocateEmptyFixedArray();
2209 2221
2210 // Allocate empty external array of given type. 2222 // Allocate empty external array of given type.
2211 MUST_USE_RESULT MaybeObject* AllocateEmptyExternalArray( 2223 MUST_USE_RESULT MaybeObject* AllocateEmptyExternalArray(
2212 ExternalArrayType array_type); 2224 ExternalArrayType array_type);
2213 2225
2226 // Allocate empty fixed typed array of given type.
2227 MUST_USE_RESULT MaybeObject* AllocateEmptyFixedTypedArray(
2228 ExternalArrayType array_type);
2229
2214 // Allocate empty fixed double array. 2230 // Allocate empty fixed double array.
2215 MUST_USE_RESULT MaybeObject* AllocateEmptyFixedDoubleArray(); 2231 MUST_USE_RESULT MaybeObject* AllocateEmptyFixedDoubleArray();
2216 2232
2217 // Allocate empty constant pool array. 2233 // Allocate empty constant pool array.
2218 MUST_USE_RESULT MaybeObject* AllocateEmptyConstantPoolArray(); 2234 MUST_USE_RESULT MaybeObject* AllocateEmptyConstantPoolArray();
2219 2235
2220 // Allocate a tenured simple cell. 2236 // Allocate a tenured simple cell.
2221 MUST_USE_RESULT MaybeObject* AllocateCell(Object* value); 2237 MUST_USE_RESULT MaybeObject* AllocateCell(Object* value);
2222 2238
2223 // Allocate a tenured JS global property cell initialized with the hole. 2239 // Allocate a tenured JS global property cell initialized with the hole.
(...skipping 890 matching lines...) Expand 10 before | Expand all | Expand 10 after
3114 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. 3130 DisallowHeapAllocation no_allocation; // i.e. no gc allowed.
3115 3131
3116 private: 3132 private:
3117 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); 3133 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer);
3118 }; 3134 };
3119 #endif // DEBUG 3135 #endif // DEBUG
3120 3136
3121 } } // namespace v8::internal 3137 } } // namespace v8::internal
3122 3138
3123 #endif // V8_HEAP_H_ 3139 #endif // V8_HEAP_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698