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

Side by Side Diff: src/platform.h

Issue 112863002: Merge bleeding_edge 18021:18297 (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/parser
Patch Set: Created 7 years 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/parser.cc ('k') | src/platform-freebsd.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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 return intgr; 86 return intgr;
87 } 87 }
88 88
89 #endif // _MSC_VER < 1800 89 #endif // _MSC_VER < 1800
90 90
91 #endif // V8_CC_MSVC 91 #endif // V8_CC_MSVC
92 92
93 namespace v8 { 93 namespace v8 {
94 namespace internal { 94 namespace internal {
95 95
96 double ceiling(double x);
97 double modulo(double x, double y); 96 double modulo(double x, double y);
98 97
99 // Custom implementation of math functions. 98 // Custom implementation of math functions.
100 double fast_sin(double input);
101 double fast_cos(double input);
102 double fast_tan(double input);
103 double fast_log(double input); 99 double fast_log(double input);
104 double fast_exp(double input); 100 double fast_exp(double input);
105 double fast_sqrt(double input); 101 double fast_sqrt(double input);
106 // The custom exp implementation needs 16KB of lookup data; initialize it 102 // The custom exp implementation needs 16KB of lookup data; initialize it
107 // on demand. 103 // on demand.
108 void lazily_initialize_fast_exp(); 104 void lazily_initialize_fast_exp();
109 105
110 // ---------------------------------------------------------------------------- 106 // ----------------------------------------------------------------------------
111 // Fast TLS support 107 // Fast TLS support
112 108
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 static void MemCopyUint16Uint8Wrapper(uint16_t* dest, 358 static void MemCopyUint16Uint8Wrapper(uint16_t* dest,
363 const uint8_t* src, 359 const uint8_t* src,
364 size_t chars); 360 size_t chars);
365 // For values < 12, the assembler function is slower than the inlined C code. 361 // For values < 12, the assembler function is slower than the inlined C code.
366 static const int kMinComplexConvertMemCopy = 12; 362 static const int kMinComplexConvertMemCopy = 12;
367 static void MemCopyUint16Uint8(uint16_t* dest, 363 static void MemCopyUint16Uint8(uint16_t* dest,
368 const uint8_t* src, 364 const uint8_t* src,
369 size_t size) { 365 size_t size) {
370 (*memcopy_uint16_uint8_function)(dest, src, size); 366 (*memcopy_uint16_uint8_function)(dest, src, size);
371 } 367 }
368 #elif defined(V8_HOST_ARCH_MIPS)
369 typedef void (*MemCopyUint8Function)(uint8_t* dest,
370 const uint8_t* src,
371 size_t size);
372 static MemCopyUint8Function memcopy_uint8_function;
373 static void MemCopyUint8Wrapper(uint8_t* dest,
374 const uint8_t* src,
375 size_t chars) {
376 memcpy(dest, src, chars);
377 }
378 // For values < 16, the assembler function is slower than the inlined C code.
379 static const int kMinComplexMemCopy = 16;
380 static void MemCopy(void* dest, const void* src, size_t size) {
381 (*memcopy_uint8_function)(reinterpret_cast<uint8_t*>(dest),
382 reinterpret_cast<const uint8_t*>(src),
383 size);
384 }
385 static void MemMove(void* dest, const void* src, size_t size) {
386 memmove(dest, src, size);
387 }
372 #else 388 #else
373 // Copy memory area to disjoint memory area. 389 // Copy memory area to disjoint memory area.
374 static void MemCopy(void* dest, const void* src, size_t size) { 390 static void MemCopy(void* dest, const void* src, size_t size) {
375 memcpy(dest, src, size); 391 memcpy(dest, src, size);
376 } 392 }
377 static void MemMove(void* dest, const void* src, size_t size) { 393 static void MemMove(void* dest, const void* src, size_t size) {
378 memmove(dest, src, size); 394 memmove(dest, src, size);
379 } 395 }
380 static const int kMinComplexMemCopy = 16 * kPointerSize; 396 static const int kMinComplexMemCopy = 16 * kPointerSize;
381 #endif // V8_TARGET_ARCH_IA32 397 #endif // V8_TARGET_ARCH_IA32
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
592 char name_[kMaxThreadNameLength]; 608 char name_[kMaxThreadNameLength];
593 int stack_size_; 609 int stack_size_;
594 Semaphore* start_semaphore_; 610 Semaphore* start_semaphore_;
595 611
596 DISALLOW_COPY_AND_ASSIGN(Thread); 612 DISALLOW_COPY_AND_ASSIGN(Thread);
597 }; 613 };
598 614
599 } } // namespace v8::internal 615 } } // namespace v8::internal
600 616
601 #endif // V8_PLATFORM_H_ 617 #endif // V8_PLATFORM_H_
OLDNEW
« no previous file with comments | « src/parser.cc ('k') | src/platform-freebsd.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698