Index: src/lithium.cc |
diff --git a/src/lithium.cc b/src/lithium.cc |
index aeac2db562ab01296b2c63680cf05a1ba49d8fb2..62b263be114698796fd2ec314404d35471aa490e 100644 |
--- a/src/lithium.cc |
+++ b/src/lithium.cc |
@@ -166,4 +166,25 @@ void LPointerMap::PrintTo(StringStream* stream) { |
} |
+int ExternalArrayTypeToShiftSize(ExternalArrayType type) { |
+ switch (type) { |
+ case kExternalByteArray: |
+ case kExternalUnsignedByteArray: |
+ case kExternalPixelArray: |
+ return 0; |
+ case kExternalShortArray: |
+ case kExternalUnsignedShortArray: |
+ return 1; |
+ case kExternalIntArray: |
+ case kExternalUnsignedIntArray: |
+ case kExternalFloatArray: |
+ return 2; |
+ case kExternalDoubleArray: |
+ return 3; |
+ } |
+ UNREACHABLE(); |
+ return 0; |
+} |
+ |
+ |
} } // namespace v8::internal |