| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |