OLD | NEW |
---|---|
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
51 #include "../include/v8.h" | 51 #include "../include/v8.h" |
52 #include "globals.h" | 52 #include "globals.h" |
53 | 53 |
54 namespace v8 { | 54 namespace v8 { |
55 namespace internal { | 55 namespace internal { |
56 | 56 |
57 typedef int32_t Atomic32; | 57 typedef int32_t Atomic32; |
58 #ifdef V8_HOST_ARCH_64_BIT | 58 #ifdef V8_HOST_ARCH_64_BIT |
59 // We need to be able to go between Atomic64 and AtomicWord implicitly. This | 59 // We need to be able to go between Atomic64 and AtomicWord implicitly. This |
60 // means Atomic64 and AtomicWord should be the same type on 64-bit. | 60 // means Atomic64 and AtomicWord should be the same type on 64-bit. |
61 #if defined(__APPLE__) | 61 #if defined(__ILP32__) || defined(__APPLE__) |
Brad Chen (chromium)
2013/03/04 23:27:32
So, actually trying this in my own build, I'm not
| |
62 // MacOS is an exception to the implicit conversion rule above, | 62 // MacOS is an exception to the implicit conversion rule above, |
63 // because it uses long for intptr_t. | 63 // because it uses long for intptr_t. |
64 typedef int64_t Atomic64; | 64 typedef int64_t Atomic64; |
65 #else | 65 #else |
66 typedef intptr_t Atomic64; | 66 typedef intptr_t Atomic64; |
67 #endif | 67 #endif |
68 #endif | 68 #endif |
69 | 69 |
70 // Use AtomicWord for a machine-sized pointer. It will use the Atomic32 or | 70 // Use AtomicWord for a machine-sized pointer. It will use the Atomic32 or |
71 // Atomic64 routines below, depending on your architecture. | 71 // Atomic64 routines below, depending on your architecture. |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
164 #include "atomicops_internals_x86_gcc.h" | 164 #include "atomicops_internals_x86_gcc.h" |
165 #elif defined(__GNUC__) && defined(V8_HOST_ARCH_ARM) | 165 #elif defined(__GNUC__) && defined(V8_HOST_ARCH_ARM) |
166 #include "atomicops_internals_arm_gcc.h" | 166 #include "atomicops_internals_arm_gcc.h" |
167 #elif defined(__GNUC__) && defined(V8_HOST_ARCH_MIPS) | 167 #elif defined(__GNUC__) && defined(V8_HOST_ARCH_MIPS) |
168 #include "atomicops_internals_mips_gcc.h" | 168 #include "atomicops_internals_mips_gcc.h" |
169 #else | 169 #else |
170 #error "Atomic operations are not supported on your platform" | 170 #error "Atomic operations are not supported on your platform" |
171 #endif | 171 #endif |
172 | 172 |
173 #endif // V8_ATOMICOPS_H_ | 173 #endif // V8_ATOMICOPS_H_ |
OLD | NEW |