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

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

Issue 260003006: Added a Isolate* parameter to Serializer::enabled(). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased. Feedback. 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/platform.h ('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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Platform-specific code for POSIX goes here. This is not a platform on its 5 // Platform-specific code for POSIX goes here. This is not a platform on its
6 // own, but contains the parts which are the same across the POSIX platforms 6 // own, but contains the parts which are the same across the POSIX platforms
7 // Linux, MacOS, FreeBSD, OpenBSD, NetBSD and QNX. 7 // Linux, MacOS, FreeBSD, OpenBSD, NetBSD and QNX.
8 8
9 #include <dlfcn.h> 9 #include <dlfcn.h>
10 #include <pthread.h> 10 #include <pthread.h>
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 *dest++ = static_cast<uint16_t>(*src++); 507 *dest++ = static_cast<uint16_t>(*src++);
508 } 508 }
509 } 509 }
510 510
511 511
512 OS::MemCopyUint8Function OS::memcopy_uint8_function = &OS::MemCopyUint8Wrapper; 512 OS::MemCopyUint8Function OS::memcopy_uint8_function = &OS::MemCopyUint8Wrapper;
513 OS::MemCopyUint16Uint8Function OS::memcopy_uint16_uint8_function = 513 OS::MemCopyUint16Uint8Function OS::memcopy_uint16_uint8_function =
514 &OS::MemCopyUint16Uint8Wrapper; 514 &OS::MemCopyUint16Uint8Wrapper;
515 // Defined in codegen-arm.cc. 515 // Defined in codegen-arm.cc.
516 OS::MemCopyUint8Function CreateMemCopyUint8Function( 516 OS::MemCopyUint8Function CreateMemCopyUint8Function(
517 bool serializer_enabled,
517 OS::MemCopyUint8Function stub); 518 OS::MemCopyUint8Function stub);
518 OS::MemCopyUint16Uint8Function CreateMemCopyUint16Uint8Function( 519 OS::MemCopyUint16Uint8Function CreateMemCopyUint16Uint8Function(
519 OS::MemCopyUint16Uint8Function stub); 520 OS::MemCopyUint16Uint8Function stub);
520 521
521 #elif defined(V8_HOST_ARCH_MIPS) 522 #elif defined(V8_HOST_ARCH_MIPS)
522 OS::MemCopyUint8Function OS::memcopy_uint8_function = &OS::MemCopyUint8Wrapper; 523 OS::MemCopyUint8Function OS::memcopy_uint8_function = &OS::MemCopyUint8Wrapper;
523 // Defined in codegen-mips.cc. 524 // Defined in codegen-mips.cc.
524 OS::MemCopyUint8Function CreateMemCopyUint8Function( 525 OS::MemCopyUint8Function CreateMemCopyUint8Function(
526 bool serializer_enabled,
525 OS::MemCopyUint8Function stub); 527 OS::MemCopyUint8Function stub);
526 #endif 528 #endif
527 529
528 530
529 void OS::PostSetUp() { 531 void OS::PostSetUp(bool serializer_enabled) {
530 #if V8_TARGET_ARCH_IA32 532 #if V8_TARGET_ARCH_IA32
531 OS::MemMoveFunction generated_memmove = CreateMemMoveFunction(); 533 OS::MemMoveFunction generated_memmove = CreateMemMoveFunction();
532 if (generated_memmove != NULL) { 534 if (generated_memmove != NULL) {
533 memmove_function = generated_memmove; 535 memmove_function = generated_memmove;
534 } 536 }
535 #elif defined(V8_HOST_ARCH_ARM) 537 #elif defined(V8_HOST_ARCH_ARM)
536 OS::memcopy_uint8_function = 538 OS::memcopy_uint8_function =
537 CreateMemCopyUint8Function(&OS::MemCopyUint8Wrapper); 539 CreateMemCopyUint8Function(serializer_enabled, &OS::MemCopyUint8Wrapper);
538 OS::memcopy_uint16_uint8_function = 540 OS::memcopy_uint16_uint8_function =
539 CreateMemCopyUint16Uint8Function(&OS::MemCopyUint16Uint8Wrapper); 541 CreateMemCopyUint16Uint8Function(&OS::MemCopyUint16Uint8Wrapper);
540 #elif defined(V8_HOST_ARCH_MIPS) 542 #elif defined(V8_HOST_ARCH_MIPS)
541 OS::memcopy_uint8_function = 543 OS::memcopy_uint8_function =
542 CreateMemCopyUint8Function(&OS::MemCopyUint8Wrapper); 544 CreateMemCopyUint8Function(serializer_enabled, &OS::MemCopyUint8Wrapper);
543 #endif 545 #endif
544 // fast_exp is initialized lazily. 546 // fast_exp is initialized lazily.
545 init_fast_sqrt_function(); 547 init_fast_sqrt_function();
546 } 548 }
547 549
548 550
549 // ---------------------------------------------------------------------------- 551 // ----------------------------------------------------------------------------
550 // POSIX string support. 552 // POSIX string support.
551 // 553 //
552 554
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
789 791
790 void Thread::SetThreadLocal(LocalStorageKey key, void* value) { 792 void Thread::SetThreadLocal(LocalStorageKey key, void* value) {
791 pthread_key_t pthread_key = LocalKeyToPthreadKey(key); 793 pthread_key_t pthread_key = LocalKeyToPthreadKey(key);
792 int result = pthread_setspecific(pthread_key, value); 794 int result = pthread_setspecific(pthread_key, value);
793 ASSERT_EQ(0, result); 795 ASSERT_EQ(0, result);
794 USE(result); 796 USE(result);
795 } 797 }
796 798
797 799
798 } } // namespace v8::internal 800 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/platform.h ('k') | src/platform-win32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698