| OLD | NEW |
| 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 MacOS goes here. For the POSIX-compatible | 5 // Platform-specific code for MacOS goes here. For the POSIX-compatible |
| 6 // parts, the implementation is in platform-posix.cc. | 6 // parts, the implementation is in platform-posix.cc. |
| 7 | 7 |
| 8 #include <dlfcn.h> | 8 #include <dlfcn.h> |
| 9 #include <mach/mach_init.h> | 9 #include <mach/mach_init.h> |
| 10 #include <mach-o/dyld.h> | 10 #include <mach-o/dyld.h> |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 char* code_ptr = getsectdatafromheader_64( | 79 char* code_ptr = getsectdatafromheader_64( |
| 80 reinterpret_cast<const mach_header_64*>(header), | 80 reinterpret_cast<const mach_header_64*>(header), |
| 81 SEG_TEXT, | 81 SEG_TEXT, |
| 82 SECT_TEXT, | 82 SECT_TEXT, |
| 83 &size); | 83 &size); |
| 84 #else | 84 #else |
| 85 unsigned int size; | 85 unsigned int size; |
| 86 char* code_ptr = getsectdatafromheader(header, SEG_TEXT, SECT_TEXT, &size); | 86 char* code_ptr = getsectdatafromheader(header, SEG_TEXT, SECT_TEXT, &size); |
| 87 #endif | 87 #endif |
| 88 if (code_ptr == NULL) continue; | 88 if (code_ptr == NULL) continue; |
| 89 const uintptr_t slide = _dyld_get_image_vmaddr_slide(i); | 89 const intptr_t slide = _dyld_get_image_vmaddr_slide(i); |
| 90 const uintptr_t start = reinterpret_cast<uintptr_t>(code_ptr) + slide; | 90 const uintptr_t start = reinterpret_cast<uintptr_t>(code_ptr) + slide; |
| 91 result.push_back( | 91 result.push_back(SharedLibraryAddress(_dyld_get_image_name(i), start, |
| 92 SharedLibraryAddress(_dyld_get_image_name(i), start, start + size)); | 92 start + size, slide)); |
| 93 } | 93 } |
| 94 return result; | 94 return result; |
| 95 } | 95 } |
| 96 | 96 |
| 97 | 97 |
| 98 void OS::SignalCodeMovingGC() { | 98 void OS::SignalCodeMovingGC() { |
| 99 } | 99 } |
| 100 | 100 |
| 101 | 101 |
| 102 const char* OS::LocalTimezone(double time, TimezoneCache* cache) { | 102 const char* OS::LocalTimezone(double time, TimezoneCache* cache) { |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 return munmap(address, size) == 0; | 244 return munmap(address, size) == 0; |
| 245 } | 245 } |
| 246 | 246 |
| 247 | 247 |
| 248 bool VirtualMemory::HasLazyCommits() { | 248 bool VirtualMemory::HasLazyCommits() { |
| 249 return false; | 249 return false; |
| 250 } | 250 } |
| 251 | 251 |
| 252 } // namespace base | 252 } // namespace base |
| 253 } // namespace v8 | 253 } // namespace v8 |
| OLD | NEW |