Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(66)

Unified Diff: src/platform-posix.cc

Issue 302563004: Move OS::MemCopy and OS::MemMove out of platform to utils (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/platform.h ('k') | src/platform-win32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/platform-posix.cc
diff --git a/src/platform-posix.cc b/src/platform-posix.cc
index be1ace1d628000512082718bcc3c368efc76c3c9..538dd148a269f48b59dfeec2d12bf7d0aedeaf7a 100644
--- a/src/platform-posix.cc
+++ b/src/platform-posix.cc
@@ -442,72 +442,6 @@ int OS::VSNPrintF(Vector<char> str,
}
-#if V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_X87
-static void MemMoveWrapper(void* dest, const void* src, size_t size) {
- memmove(dest, src, size);
-}
-
-
-// Initialize to library version so we can call this at any time during startup.
-static OS::MemMoveFunction memmove_function = &MemMoveWrapper;
-
-// Defined in codegen-ia32.cc.
-OS::MemMoveFunction CreateMemMoveFunction();
-
-// Copy memory area. No restrictions.
-void OS::MemMove(void* dest, const void* src, size_t size) {
- if (size == 0) return;
- // Note: here we rely on dependent reads being ordered. This is true
- // on all architectures we currently support.
- (*memmove_function)(dest, src, size);
-}
-
-#elif defined(V8_HOST_ARCH_ARM)
-void OS::MemCopyUint16Uint8Wrapper(uint16_t* dest,
- const uint8_t* src,
- size_t chars) {
- uint16_t *limit = dest + chars;
- while (dest < limit) {
- *dest++ = static_cast<uint16_t>(*src++);
- }
-}
-
-
-OS::MemCopyUint8Function OS::memcopy_uint8_function = &OS::MemCopyUint8Wrapper;
-OS::MemCopyUint16Uint8Function OS::memcopy_uint16_uint8_function =
- &OS::MemCopyUint16Uint8Wrapper;
-// Defined in codegen-arm.cc.
-OS::MemCopyUint8Function CreateMemCopyUint8Function(
- OS::MemCopyUint8Function stub);
-OS::MemCopyUint16Uint8Function CreateMemCopyUint16Uint8Function(
- OS::MemCopyUint16Uint8Function stub);
-
-#elif defined(V8_HOST_ARCH_MIPS)
-OS::MemCopyUint8Function OS::memcopy_uint8_function = &OS::MemCopyUint8Wrapper;
-// Defined in codegen-mips.cc.
-OS::MemCopyUint8Function CreateMemCopyUint8Function(
- OS::MemCopyUint8Function stub);
-#endif
-
-
-void OS::PostSetUp() {
-#if V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_X87
- OS::MemMoveFunction generated_memmove = CreateMemMoveFunction();
- if (generated_memmove != NULL) {
- memmove_function = generated_memmove;
- }
-#elif defined(V8_HOST_ARCH_ARM)
- OS::memcopy_uint8_function =
- CreateMemCopyUint8Function(&OS::MemCopyUint8Wrapper);
- OS::memcopy_uint16_uint8_function =
- CreateMemCopyUint16Uint8Function(&OS::MemCopyUint16Uint8Wrapper);
-#elif defined(V8_HOST_ARCH_MIPS)
- OS::memcopy_uint8_function =
- CreateMemCopyUint8Function(&OS::MemCopyUint8Wrapper);
-#endif
-}
-
-
// ----------------------------------------------------------------------------
// POSIX string support.
//
« no previous file with comments | « src/platform.h ('k') | src/platform-win32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698