Index: src/runtime.cc |
diff --git a/src/runtime.cc b/src/runtime.cc |
index c11a00528d02e37bce4826d5cf180bf85c795b78..e6a1fed53105f24c8fd11ffd86a6a93afc7f3491 100644 |
--- a/src/runtime.cc |
+++ b/src/runtime.cc |
@@ -831,20 +831,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_ArrayBufferIsView) { |
} |
-enum TypedArrayId { |
- // arrayIds below should be synchromized with typedarray.js natives. |
- ARRAY_ID_UINT8 = 1, |
- ARRAY_ID_INT8 = 2, |
- ARRAY_ID_UINT16 = 3, |
- ARRAY_ID_INT16 = 4, |
- ARRAY_ID_UINT32 = 5, |
- ARRAY_ID_INT32 = 6, |
- ARRAY_ID_FLOAT32 = 7, |
- ARRAY_ID_FLOAT64 = 8, |
- ARRAY_ID_UINT8C = 9 |
-}; |
- |
-static void ArrayIdToTypeAndSize( |
+void Runtime::ArrayIdToTypeAndSize( |
int arrayId, ExternalArrayType* array_type, size_t* element_size) { |
switch (arrayId) { |
case ARRAY_ID_UINT8: |
@@ -906,7 +893,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_TypedArrayInitialize) { |
ExternalArrayType array_type = kExternalByteArray; // Bogus initialization. |
size_t element_size = 1; // Bogus initialization. |
- ArrayIdToTypeAndSize(arrayId, &array_type, &element_size); |
+ Runtime::ArrayIdToTypeAndSize(arrayId, &array_type, &element_size); |
holder->set_buffer(*buffer); |
holder->set_byte_offset(*byte_offset_object); |
@@ -958,7 +945,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_TypedArrayInitializeFromArrayLike) { |
ExternalArrayType array_type = kExternalByteArray; // Bogus initialization. |
size_t element_size = 1; // Bogus initialization. |
- ArrayIdToTypeAndSize(arrayId, &array_type, &element_size); |
+ Runtime::ArrayIdToTypeAndSize(arrayId, &array_type, &element_size); |
Handle<JSArrayBuffer> buffer = isolate->factory()->NewJSArrayBuffer(); |
size_t length = NumberToSize(isolate, *length_obj); |