| 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 519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 530 *dest++ = static_cast<uint16_t>(*src++); | 530 *dest++ = static_cast<uint16_t>(*src++); |
| 531 } | 531 } |
| 532 } | 532 } |
| 533 | 533 |
| 534 | 534 |
| 535 OS::MemCopyUint8Function OS::memcopy_uint8_function = &OS::MemCopyUint8Wrapper; | 535 OS::MemCopyUint8Function OS::memcopy_uint8_function = &OS::MemCopyUint8Wrapper; |
| 536 OS::MemCopyUint16Uint8Function OS::memcopy_uint16_uint8_function = | 536 OS::MemCopyUint16Uint8Function OS::memcopy_uint16_uint8_function = |
| 537 &OS::MemCopyUint16Uint8Wrapper; | 537 &OS::MemCopyUint16Uint8Wrapper; |
| 538 // Defined in codegen-arm.cc. | 538 // Defined in codegen-arm.cc. |
| 539 OS::MemCopyUint8Function CreateMemCopyUint8Function( | 539 OS::MemCopyUint8Function CreateMemCopyUint8Function( |
| 540 bool serializer_enabled, |
| 540 OS::MemCopyUint8Function stub); | 541 OS::MemCopyUint8Function stub); |
| 541 OS::MemCopyUint16Uint8Function CreateMemCopyUint16Uint8Function( | 542 OS::MemCopyUint16Uint8Function CreateMemCopyUint16Uint8Function( |
| 542 OS::MemCopyUint16Uint8Function stub); | 543 OS::MemCopyUint16Uint8Function stub); |
| 543 | 544 |
| 544 #elif defined(V8_HOST_ARCH_MIPS) | 545 #elif defined(V8_HOST_ARCH_MIPS) |
| 545 OS::MemCopyUint8Function OS::memcopy_uint8_function = &OS::MemCopyUint8Wrapper; | 546 OS::MemCopyUint8Function OS::memcopy_uint8_function = &OS::MemCopyUint8Wrapper; |
| 546 // Defined in codegen-mips.cc. | 547 // Defined in codegen-mips.cc. |
| 547 OS::MemCopyUint8Function CreateMemCopyUint8Function( | 548 OS::MemCopyUint8Function CreateMemCopyUint8Function( |
| 549 bool serializer_enabled, |
| 548 OS::MemCopyUint8Function stub); | 550 OS::MemCopyUint8Function stub); |
| 549 #endif | 551 #endif |
| 550 | 552 |
| 551 | 553 |
| 552 void OS::PostSetUp() { | 554 void OS::PostSetUp(bool serializer_enabled) { |
| 553 #if V8_TARGET_ARCH_IA32 | 555 #if V8_TARGET_ARCH_IA32 |
| 554 OS::MemMoveFunction generated_memmove = CreateMemMoveFunction(); | 556 OS::MemMoveFunction generated_memmove = CreateMemMoveFunction(); |
| 555 if (generated_memmove != NULL) { | 557 if (generated_memmove != NULL) { |
| 556 memmove_function = generated_memmove; | 558 memmove_function = generated_memmove; |
| 557 } | 559 } |
| 558 #elif defined(V8_HOST_ARCH_ARM) | 560 #elif defined(V8_HOST_ARCH_ARM) |
| 559 OS::memcopy_uint8_function = | 561 OS::memcopy_uint8_function = |
| 560 CreateMemCopyUint8Function(&OS::MemCopyUint8Wrapper); | 562 CreateMemCopyUint8Function(serializer_enabled, &OS::MemCopyUint8Wrapper); |
| 561 OS::memcopy_uint16_uint8_function = | 563 OS::memcopy_uint16_uint8_function = |
| 562 CreateMemCopyUint16Uint8Function(&OS::MemCopyUint16Uint8Wrapper); | 564 CreateMemCopyUint16Uint8Function(&OS::MemCopyUint16Uint8Wrapper); |
| 563 #elif defined(V8_HOST_ARCH_MIPS) | 565 #elif defined(V8_HOST_ARCH_MIPS) |
| 564 OS::memcopy_uint8_function = | 566 OS::memcopy_uint8_function = |
| 565 CreateMemCopyUint8Function(&OS::MemCopyUint8Wrapper); | 567 CreateMemCopyUint8Function(serializer_enabled, &OS::MemCopyUint8Wrapper); |
| 566 #endif | 568 #endif |
| 567 // fast_exp is initialized lazily. | 569 // fast_exp is initialized lazily. |
| 568 init_fast_sqrt_function(); | 570 init_fast_sqrt_function(); |
| 569 } | 571 } |
| 570 | 572 |
| 571 | 573 |
| 572 // ---------------------------------------------------------------------------- | 574 // ---------------------------------------------------------------------------- |
| 573 // POSIX string support. | 575 // POSIX string support. |
| 574 // | 576 // |
| 575 | 577 |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 812 | 814 |
| 813 void Thread::SetThreadLocal(LocalStorageKey key, void* value) { | 815 void Thread::SetThreadLocal(LocalStorageKey key, void* value) { |
| 814 pthread_key_t pthread_key = LocalKeyToPthreadKey(key); | 816 pthread_key_t pthread_key = LocalKeyToPthreadKey(key); |
| 815 int result = pthread_setspecific(pthread_key, value); | 817 int result = pthread_setspecific(pthread_key, value); |
| 816 ASSERT_EQ(0, result); | 818 ASSERT_EQ(0, result); |
| 817 USE(result); | 819 USE(result); |
| 818 } | 820 } |
| 819 | 821 |
| 820 | 822 |
| 821 } } // namespace v8::internal | 823 } } // namespace v8::internal |
| OLD | NEW |