Index: src/heap.h |
diff --git a/src/heap.h b/src/heap.h |
index add42c01d6f499a2996ee1872bcb39c4a1f4e178..40a8ab4e9988d8af97c7bf41d97d296109528533 100644 |
--- a/src/heap.h |
+++ b/src/heap.h |
@@ -137,6 +137,20 @@ namespace internal { |
V(Map, external_unsigned_int_array_map, ExternalUnsignedIntArrayMap) \ |
V(Map, external_float_array_map, ExternalFloatArrayMap) \ |
V(Map, external_double_array_map, ExternalDoubleArrayMap) \ |
+ V(ExternalArray, empty_external_pixel_array, \ |
+ EmptyExternalPixelArray) \ |
Hannes Payer (out of office)
2013/05/15 14:14:17
Can we move empty_external_pixel_array after empty
|
+ V(ExternalArray, empty_external_byte_array, \ |
+ EmptyExternalByteArray) \ |
+ V(ExternalArray, empty_external_unsigned_byte_array, \ |
+ EmptyExternalUnsignedByteArray) \ |
+ V(ExternalArray, empty_external_short_array, EmptyExternalShortArray) \ |
+ V(ExternalArray, empty_external_unsigned_short_array, \ |
+ EmptyExternalUnsignedShortArray) \ |
+ V(ExternalArray, empty_external_int_array, EmptyExternalIntArray) \ |
+ V(ExternalArray, empty_external_unsigned_int_array, \ |
+ EmptyExternalUnsignedIntArray) \ |
+ V(ExternalArray, empty_external_float_array, EmptyExternalFloatArray) \ |
+ V(ExternalArray, empty_external_double_array, EmptyExternalDoubleArray) \ |
V(Map, non_strict_arguments_elements_map, NonStrictArgumentsElementsMap) \ |
V(Map, function_context_map, FunctionContextMap) \ |
V(Map, catch_context_map, CatchContextMap) \ |
@@ -1626,6 +1640,9 @@ class Heap { |
RootListIndex RootIndexForExternalArrayType( |
ExternalArrayType array_type); |
+ RootListIndex RootIndexForEmptyExternalArray(ElementsKind kind); |
+ ExternalArray* EmptyExternalArrayForMap(Map* map); |
+ |
void RecordStats(HeapStats* stats, bool take_snapshot = false); |
// Copy block of memory from src to dst. Size of block should be aligned |
@@ -2140,6 +2157,10 @@ class Heap { |
// Allocate empty fixed array. |
MUST_USE_RESULT MaybeObject* AllocateEmptyFixedArray(); |
+ // Allocate empty external array of given type. |
+ MUST_USE_RESULT MaybeObject* AllocateEmptyExternalArray( |
+ ExternalArrayType array_type); |
+ |
// Allocate empty fixed double array. |
MUST_USE_RESULT MaybeObject* AllocateEmptyFixedDoubleArray(); |