Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/globals.h" | 5 #include "vm/globals.h" |
| 6 #if defined(TARGET_OS_MACOS) | 6 #if defined(TARGET_OS_MACOS) |
| 7 | 7 |
| 8 #include "vm/os.h" | 8 #include "vm/os.h" |
| 9 | 9 |
| 10 #include <errno.h> // NOLINT | 10 #include <errno.h> // NOLINT |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 142 | 142 |
| 143 | 143 |
| 144 intptr_t OS::ActivationFrameAlignment() { | 144 intptr_t OS::ActivationFrameAlignment() { |
| 145 #if TARGET_OS_IOS | 145 #if TARGET_OS_IOS |
| 146 #if TARGET_ARCH_ARM | 146 #if TARGET_ARCH_ARM |
| 147 // Even if we generate code that maintains a stronger alignment, we cannot | 147 // Even if we generate code that maintains a stronger alignment, we cannot |
| 148 // assert the stronger stack alignment because C++ code will not maintain it. | 148 // assert the stronger stack alignment because C++ code will not maintain it. |
| 149 return 8; | 149 return 8; |
| 150 #elif TARGET_ARCH_ARM64 | 150 #elif TARGET_ARCH_ARM64 |
| 151 return 16; | 151 return 16; |
| 152 #else | |
|
rmacnak
2015/11/03 21:13:00
Let's avoid fall through.
#elif TARGET_ARCH_IA32
| |
| 153 // If the target is iOS but arch not one of ARM or ARM64, this is a simulator | |
| 154 // build | |
| 155 return 16; | |
| 152 #endif | 156 #endif |
| 153 #else // TARGET_OS_IOS | 157 #else // TARGET_OS_IOS |
| 154 // OS X activation frames must be 16 byte-aligned; see "Mac OS X ABI | 158 // OS X activation frames must be 16 byte-aligned; see "Mac OS X ABI |
| 155 // Function Call Guide". | 159 // Function Call Guide". |
| 156 return 16; | 160 return 16; |
| 157 #endif // TARGET_OS_IOS | 161 #endif // TARGET_OS_IOS |
| 158 } | 162 } |
| 159 | 163 |
| 160 | 164 |
| 161 intptr_t OS::PreferredCodeAlignment() { | 165 intptr_t OS::PreferredCodeAlignment() { |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 363 } | 367 } |
| 364 | 368 |
| 365 | 369 |
| 366 void OS::Exit(int code) { | 370 void OS::Exit(int code) { |
| 367 exit(code); | 371 exit(code); |
| 368 } | 372 } |
| 369 | 373 |
| 370 } // namespace dart | 374 } // namespace dart |
| 371 | 375 |
| 372 #endif // defined(TARGET_OS_MACOS) | 376 #endif // defined(TARGET_OS_MACOS) |
| OLD | NEW |