| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 | 245 |
| 246 | 246 |
| 247 uint64_t OS::CpuFeaturesImpliedByPlatform() { | 247 uint64_t OS::CpuFeaturesImpliedByPlatform() { |
| 248 // MacOSX requires all these to install so we can assume they are present. | 248 // MacOSX requires all these to install so we can assume they are present. |
| 249 // These constants are defined by the CPUid instructions. | 249 // These constants are defined by the CPUid instructions. |
| 250 const uint64_t one = 1; | 250 const uint64_t one = 1; |
| 251 return (one << SSE2) | (one << CMOV) | (one << RDTSC) | (one << CPUID); | 251 return (one << SSE2) | (one << CMOV) | (one << RDTSC) | (one << CPUID); |
| 252 } | 252 } |
| 253 | 253 |
| 254 | 254 |
| 255 double OS::nan_value() { | |
| 256 return NAN; | |
| 257 } | |
| 258 | |
| 259 | |
| 260 int OS::ActivationFrameAlignment() { | 255 int OS::ActivationFrameAlignment() { |
| 261 // OS X activation frames must be 16 byte-aligned; see "Mac OS X ABI | 256 // OS X activation frames must be 16 byte-aligned; see "Mac OS X ABI |
| 262 // Function Call Guide". | 257 // Function Call Guide". |
| 263 return 16; | 258 return 16; |
| 264 } | 259 } |
| 265 | 260 |
| 266 | 261 |
| 267 int OS::StackWalk(Vector<StackFrame> frames) { | 262 int OS::StackWalk(Vector<StackFrame> frames) { |
| 268 // If weak link to execinfo lib has failed, ie because we are on 10.4, abort. | 263 // If weak link to execinfo lib has failed, ie because we are on 10.4, abort. |
| 269 if (backtrace == NULL) | 264 if (backtrace == NULL) |
| (...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 639 | 634 |
| 640 // Deallocate Mach port for thread. | 635 // Deallocate Mach port for thread. |
| 641 if (IsProfiling()) { | 636 if (IsProfiling()) { |
| 642 mach_port_deallocate(data_->task_self_, data_->profiled_thread_); | 637 mach_port_deallocate(data_->task_self_, data_->profiled_thread_); |
| 643 } | 638 } |
| 644 } | 639 } |
| 645 | 640 |
| 646 #endif // ENABLE_LOGGING_AND_PROFILING | 641 #endif // ENABLE_LOGGING_AND_PROFILING |
| 647 | 642 |
| 648 } } // namespace v8::internal | 643 } } // namespace v8::internal |
| OLD | NEW |