Index: src/heap.h |
diff --git a/src/heap.h b/src/heap.h |
index fde95ce1f7984ea1f6fe683d4ab982eaa445d991..0f586e9284e5554a97911982c4c441dc2e44aaec 100644 |
--- a/src/heap.h |
+++ b/src/heap.h |
@@ -164,6 +164,16 @@ namespace internal { |
V(Map, fixed_float32_array_map, FixedFloat32ArrayMap) \ |
V(Map, fixed_float64_array_map, FixedFloat64ArrayMap) \ |
V(Map, fixed_uint8_clamped_array_map, FixedUint8ClampedArrayMap) \ |
+ V(FixedTypedArrayBase, empty_fixed_uint8_array, EmptyFixedUint8Array) \ |
+ V(FixedTypedArrayBase, empty_fixed_int8_array, EmptyFixedInt8Array) \ |
+ V(FixedTypedArrayBase, empty_fixed_uint16_array, EmptyFixedUint16Array) \ |
+ V(FixedTypedArrayBase, empty_fixed_int16_array, EmptyFixedInt16Array) \ |
+ V(FixedTypedArrayBase, empty_fixed_uint32_array, EmptyFixedUint32Array) \ |
+ V(FixedTypedArrayBase, empty_fixed_int32_array, EmptyFixedInt32Array) \ |
+ V(FixedTypedArrayBase, empty_fixed_float32_array, EmptyFixedFloat32Array) \ |
+ V(FixedTypedArrayBase, empty_fixed_float64_array, EmptyFixedFloat64Array) \ |
+ V(FixedTypedArrayBase, empty_fixed_uint8_clamped_array, \ |
+ EmptyFixedUint8ClampedArray) \ |
V(Map, sloppy_arguments_elements_map, SloppyArgumentsElementsMap) \ |
V(Map, function_context_map, FunctionContextMap) \ |
V(Map, catch_context_map, CatchContextMap) \ |
@@ -1655,7 +1665,9 @@ class Heap { |
ExternalArrayType array_type); |
RootListIndex RootIndexForEmptyExternalArray(ElementsKind kind); |
+ RootListIndex RootIndexForEmptyFixedTypedArray(ElementsKind kind); |
ExternalArray* EmptyExternalArrayForMap(Map* map); |
+ FixedTypedArrayBase* EmptyFixedTypedArrayForMap(Map* map); |
void RecordStats(HeapStats* stats, bool take_snapshot = false); |
@@ -2221,6 +2233,10 @@ class Heap { |
MUST_USE_RESULT MaybeObject* AllocateEmptyExternalArray( |
ExternalArrayType array_type); |
+ // Allocate empty fixed typed array of given type. |
+ MUST_USE_RESULT MaybeObject* AllocateEmptyFixedTypedArray( |
+ ExternalArrayType array_type); |
+ |
// Allocate empty fixed double array. |
MUST_USE_RESULT MaybeObject* AllocateEmptyFixedDoubleArray(); |