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

Unified Diff: src/heap/heap.h

Issue 1257223002: Revert of Remove ExternalArray, derived types, and element kinds (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/heap-snapshot-generator.cc ('k') | src/heap/heap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/heap.h
diff --git a/src/heap/heap.h b/src/heap/heap.h
index 15577ee02390be901caa9e71bd30cfca41fe2889..edc3d2c8dfe9b9359070b12fd91410e8c7b4ebfd 100644
--- a/src/heap/heap.h
+++ b/src/heap/heap.h
@@ -105,6 +105,25 @@
V(Map, short_external_one_byte_internalized_string_map, \
ShortExternalOneByteInternalizedStringMap) \
V(Map, short_external_one_byte_string_map, ShortExternalOneByteStringMap) \
+ V(Map, external_int8_array_map, ExternalInt8ArrayMap) \
+ V(Map, external_uint8_array_map, ExternalUint8ArrayMap) \
+ V(Map, external_int16_array_map, ExternalInt16ArrayMap) \
+ V(Map, external_uint16_array_map, ExternalUint16ArrayMap) \
+ V(Map, external_int32_array_map, ExternalInt32ArrayMap) \
+ V(Map, external_uint32_array_map, ExternalUint32ArrayMap) \
+ V(Map, external_float32_array_map, ExternalFloat32ArrayMap) \
+ V(Map, external_float64_array_map, ExternalFloat64ArrayMap) \
+ V(Map, external_uint8_clamped_array_map, ExternalUint8ClampedArrayMap) \
+ V(ExternalArray, empty_external_int8_array, EmptyExternalInt8Array) \
+ V(ExternalArray, empty_external_uint8_array, EmptyExternalUint8Array) \
+ V(ExternalArray, empty_external_int16_array, EmptyExternalInt16Array) \
+ V(ExternalArray, empty_external_uint16_array, EmptyExternalUint16Array) \
+ V(ExternalArray, empty_external_int32_array, EmptyExternalInt32Array) \
+ V(ExternalArray, empty_external_uint32_array, EmptyExternalUint32Array) \
+ V(ExternalArray, empty_external_float32_array, EmptyExternalFloat32Array) \
+ V(ExternalArray, empty_external_float64_array, EmptyExternalFloat64Array) \
+ V(ExternalArray, empty_external_uint8_clamped_array, \
+ EmptyExternalUint8ClampedArray) \
V(Map, fixed_uint8_array_map, FixedUint8ArrayMap) \
V(Map, fixed_int8_array_map, FixedInt8ArrayMap) \
V(Map, fixed_uint16_array_map, FixedUint16ArrayMap) \
@@ -1250,7 +1269,12 @@
Map* MapForFixedTypedArray(ExternalArrayType array_type);
RootListIndex RootIndexForFixedTypedArray(ExternalArrayType array_type);
+ Map* MapForExternalArrayType(ExternalArrayType array_type);
+ RootListIndex RootIndexForExternalArrayType(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);
@@ -2022,9 +2046,9 @@
MUST_USE_RESULT AllocationResult AllocateSymbol();
// Allocates an external array of the specified length and type.
- MUST_USE_RESULT AllocationResult AllocateFixedTypedArrayWithExternalPointer(
- int length, ExternalArrayType array_type, void* external_pointer,
- PretenureFlag pretenure);
+ MUST_USE_RESULT AllocationResult
+ AllocateExternalArray(int length, ExternalArrayType array_type,
+ void* external_pointer, PretenureFlag pretenure);
// Allocates a fixed typed array of the specified length and type.
MUST_USE_RESULT AllocationResult
@@ -2051,6 +2075,10 @@
// Allocate empty fixed array.
MUST_USE_RESULT AllocationResult AllocateEmptyFixedArray();
+
+ // Allocate empty external array of given type.
+ MUST_USE_RESULT AllocationResult
+ AllocateEmptyExternalArray(ExternalArrayType array_type);
// Allocate empty fixed typed array of given type.
MUST_USE_RESULT AllocationResult
« no previous file with comments | « src/heap-snapshot-generator.cc ('k') | src/heap/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698