Index: src/v8utils.h |
diff --git a/src/v8utils.h b/src/v8utils.h |
index 0aa53cac596cb24b72b6152753dc1227a4796491..87c5e7f42938f6896ede17114d2fc2d85234e976 100644 |
--- a/src/v8utils.h |
+++ b/src/v8utils.h |
@@ -254,51 +254,14 @@ class StringBuilder { |
}; |
-// Custom memcpy implementation for platforms where the standard version |
-// may not be good enough. |
-#if defined(V8_TARGET_ARCH_IA32) |
- |
-// The default memcpy on ia32 architectures is generally not as efficient |
-// as possible. (If any further ia32 platforms are introduced where the |
-// memcpy function is efficient, exclude them from this branch). |
- |
-typedef void (*MemCopyFunction)(void* dest, const void* src, size_t size); |
- |
-// Implemented in codegen-<arch>.cc. |
-MemCopyFunction CreateMemCopyFunction(); |
- |
-// Copy memory area to disjoint memory area. |
-static inline void MemCopy(void* dest, const void* src, size_t size) { |
- static MemCopyFunction memcopy = CreateMemCopyFunction(); |
- (*memcopy)(dest, src, size); |
-#ifdef DEBUG |
- CHECK_EQ(0, memcmp(dest, src, size)); |
-#endif |
-} |
- |
-// Limit below which the extra overhead of the MemCopy function is likely |
-// to outweigh the benefits of faster copying. |
-static const int kMinComplexMemCopy = 64; |
- |
-#else // V8_TARGET_ARCH_IA32 |
- |
-static inline void MemCopy(void* dest, const void* src, size_t size) { |
- memcpy(dest, src, size); |
-} |
- |
-static const int kMinComplexMemCopy = 256; |
- |
-#endif // V8_TARGET_ARCH_IA32 |
- |
- |
// Copy from ASCII/16bit chars to ASCII/16bit chars. |
template <typename sourcechar, typename sinkchar> |
static inline void CopyChars(sinkchar* dest, const sourcechar* src, int chars) { |
sinkchar* limit = dest + chars; |
#ifdef V8_HOST_CAN_READ_UNALIGNED |
if (sizeof(*dest) == sizeof(*src)) { |
- if (chars >= static_cast<int>(kMinComplexMemCopy / sizeof(*dest))) { |
- MemCopy(dest, src, chars * sizeof(*dest)); |
+ if (chars >= static_cast<int>(OS::kMinComplexMemCopy / sizeof(*dest))) { |
+ OS::MemCopy(dest, src, chars * sizeof(*dest)); |
return; |
} |
// Number of characters in a uintptr_t. |