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

Unified Diff: src/platform-win32.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-posix.cc ('k') | src/preparse-data.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/platform-win32.cc
diff --git a/src/platform-win32.cc b/src/platform-win32.cc
index df0ec2ebaf88447deef2e30fd5615629e680e050..d7ce71ee6d0a121e8581138f3a98ac925fb6190c 100644
--- a/src/platform-win32.cc
+++ b/src/platform-win32.cc
@@ -107,29 +107,6 @@ intptr_t OS::MaxVirtualMemory() {
}
-#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 to disjoint memory area.
-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);
-}
-
-#endif // V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_X87
-
-
class TimezoneCache {
public:
TimezoneCache() : initialized_(false) { }
@@ -452,16 +429,6 @@ char* Win32Time::LocalTimezone(TimezoneCache* cache) {
}
-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;
- }
-#endif
-}
-
-
// Returns the accumulated user time for thread.
int OS::GetUserTime(uint32_t* secs, uint32_t* usecs) {
FILETIME dummy;
@@ -913,7 +880,7 @@ OS::MemoryMappedFile* OS::MemoryMappedFile::create(const char* name, int size,
if (file_mapping == NULL) return NULL;
// Map a view of the file into memory
void* memory = MapViewOfFile(file_mapping, FILE_MAP_ALL_ACCESS, 0, 0, size);
- if (memory) OS::MemMove(memory, initial, size);
+ if (memory) MemMove(memory, initial, size);
return new Win32MemoryMappedFile(file, file_mapping, memory, size);
}
« no previous file with comments | « src/platform-posix.cc ('k') | src/preparse-data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698