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

Side by Side Diff: src/platform-win32.cc

Issue 14365011: OS::MemMove/OS::MemCopy: Don't call through to generated code when size == 0 to avoid prefetching i… (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/platform-posix.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 } 153 }
154 154
155 // Initialize to library version so we can call this at any time during startup. 155 // Initialize to library version so we can call this at any time during startup.
156 static OS::MemMoveFunction memmove_function = &MemMoveWrapper; 156 static OS::MemMoveFunction memmove_function = &MemMoveWrapper;
157 157
158 // Defined in codegen-ia32.cc. 158 // Defined in codegen-ia32.cc.
159 OS::MemMoveFunction CreateMemMoveFunction(); 159 OS::MemMoveFunction CreateMemMoveFunction();
160 160
161 // Copy memory area to disjoint memory area. 161 // Copy memory area to disjoint memory area.
162 void OS::MemMove(void* dest, const void* src, size_t size) { 162 void OS::MemMove(void* dest, const void* src, size_t size) {
163 if (size == 0) return;
163 // Note: here we rely on dependent reads being ordered. This is true 164 // Note: here we rely on dependent reads being ordered. This is true
164 // on all architectures we currently support. 165 // on all architectures we currently support.
165 (*memmove_function)(dest, src, size); 166 (*memmove_function)(dest, src, size);
166 } 167 }
167 168
168 #endif // V8_TARGET_ARCH_IA32 169 #endif // V8_TARGET_ARCH_IA32
169 170
170 #ifdef _WIN64 171 #ifdef _WIN64
171 typedef double (*ModuloFunction)(double, double); 172 typedef double (*ModuloFunction)(double, double);
172 static ModuloFunction modulo_function = NULL; 173 static ModuloFunction modulo_function = NULL;
(...skipping 1813 matching lines...) Expand 10 before | Expand all | Expand 10 after
1986 limit_mutex = CreateMutex(); 1987 limit_mutex = CreateMutex();
1987 } 1988 }
1988 1989
1989 1990
1990 void OS::TearDown() { 1991 void OS::TearDown() {
1991 delete limit_mutex; 1992 delete limit_mutex;
1992 } 1993 }
1993 1994
1994 1995
1995 } } // namespace v8::internal 1996 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/platform-posix.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698