Index: src/platform.h |
diff --git a/src/platform.h b/src/platform.h |
index 1c655da3005c0c0b8ee562d42cced578572be662..a2517d954df21983f8f13c291e44cc6867648354 100644 |
--- a/src/platform.h |
+++ b/src/platform.h |
@@ -337,17 +337,27 @@ class OS { |
static void ReleaseStore(volatile AtomicWord* ptr, AtomicWord value); |
#if defined(V8_TARGET_ARCH_IA32) |
- // Copy memory area to disjoint memory area. |
- static void MemCopy(void* dest, const void* src, size_t size); |
// Limit below which the extra overhead of the MemCopy function is likely |
// to outweigh the benefits of faster copying. |
static const int kMinComplexMemCopy = 64; |
- typedef void (*MemCopyFunction)(void* dest, const void* src, size_t size); |
+ // Copy memory area. No restrictions. |
+ static void MemMove(void* dest, const void* src, size_t size); |
+ typedef void (*MemMoveFunction)(void* dest, const void* src, size_t size); |
+ |
+ // Keep the distinction of "move" vs. "copy" for the benefit of other |
+ // architectures. |
+ static void MemCopy(void* dest, const void* src, size_t size) { |
+ MemMove(dest, src, size); |
+ } |
#else // V8_TARGET_ARCH_IA32 |
+ // Copy memory area to disjoint memory area. |
static void MemCopy(void* dest, const void* src, size_t size) { |
memcpy(dest, src, size); |
} |
+ static void MemMove(void* dest, const void* src, size_t size) { |
+ memmove(dest, src, size); |
+ } |
static const int kMinComplexMemCopy = 16 * kPointerSize; |
#endif // V8_TARGET_ARCH_IA32 |