Index: src/heap.h |
=================================================================== |
--- src/heap.h (revision 3095) |
+++ src/heap.h (working copy) |
@@ -111,6 +111,13 @@ |
V(Map, undetectable_long_ascii_string_map, UndetectableLongAsciiStringMap) \ |
V(Map, byte_array_map, ByteArrayMap) \ |
V(Map, pixel_array_map, PixelArrayMap) \ |
+ V(Map, external_byte_array_map, ExternalByteArrayMap) \ |
+ V(Map, external_unsigned_byte_array_map, ExternalUnsignedByteArrayMap) \ |
+ V(Map, external_short_array_map, ExternalShortArrayMap) \ |
+ V(Map, external_unsigned_short_array_map, ExternalUnsignedShortArrayMap) \ |
+ V(Map, external_int_array_map, ExternalIntArrayMap) \ |
+ V(Map, external_unsigned_int_array_map, ExternalUnsignedIntArrayMap) \ |
+ V(Map, external_float_array_map, ExternalFloatArrayMap) \ |
V(Map, context_map, ContextMap) \ |
V(Map, catch_context_map, CatchContextMap) \ |
V(Map, code_map, CodeMap) \ |
@@ -452,6 +459,15 @@ |
uint8_t* external_pointer, |
PretenureFlag pretenure); |
+ // Allocates an external array of the specified length and type. |
+ // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation |
+ // failed. |
+ // Please note this does not perform a garbage collection. |
+ static Object* AllocateExternalArray(int length, |
+ ExternalArrayType array_type, |
+ void* external_pointer, |
+ PretenureFlag pretenure); |
+ |
// Allocate a tenured JS global property cell. |
// Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation |
// failed. |
@@ -884,6 +900,10 @@ |
static Object* NumberToString(Object* number); |
+ static Map* MapForExternalArrayType(ExternalArrayType array_type); |
+ static RootListIndex RootIndexForExternalArrayType( |
+ ExternalArrayType array_type); |
+ |
private: |
static int semispace_size_; |
static int initial_semispace_size_; |