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

Side by Side Diff: src/platform-posix.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/ia32/codegen-ia32.cc ('k') | src/platform-win32.cc » ('j') | 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 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 } 327 }
328 328
329 // Initialize to library version so we can call this at any time during startup. 329 // Initialize to library version so we can call this at any time during startup.
330 static OS::MemMoveFunction memmove_function = &MemMoveWrapper; 330 static OS::MemMoveFunction memmove_function = &MemMoveWrapper;
331 331
332 // Defined in codegen-ia32.cc. 332 // Defined in codegen-ia32.cc.
333 OS::MemMoveFunction CreateMemMoveFunction(); 333 OS::MemMoveFunction CreateMemMoveFunction();
334 334
335 // Copy memory area. No restrictions. 335 // Copy memory area. No restrictions.
336 void OS::MemMove(void* dest, const void* src, size_t size) { 336 void OS::MemMove(void* dest, const void* src, size_t size) {
337 if (size == 0) return;
337 // Note: here we rely on dependent reads being ordered. This is true 338 // Note: here we rely on dependent reads being ordered. This is true
338 // on all architectures we currently support. 339 // on all architectures we currently support.
339 (*memmove_function)(dest, src, size); 340 (*memmove_function)(dest, src, size);
340 } 341 }
341 342
342 #endif // V8_TARGET_ARCH_IA32 343 #endif // V8_TARGET_ARCH_IA32
343 344
344 345
345 void POSIXPostSetUp() { 346 void POSIXPostSetUp() {
346 #if defined(V8_TARGET_ARCH_IA32) 347 #if defined(V8_TARGET_ARCH_IA32)
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
563 return ntohl(value); 564 return ntohl(value);
564 } 565 }
565 566
566 567
567 Socket* OS::CreateSocket() { 568 Socket* OS::CreateSocket() {
568 return new POSIXSocket(); 569 return new POSIXSocket();
569 } 570 }
570 571
571 572
572 } } // namespace v8::internal 573 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ia32/codegen-ia32.cc ('k') | src/platform-win32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698