OLD | NEW |
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 9166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9177 | 9177 |
9178 static inline ObjectPair MakePair(MaybeObject* x, MaybeObject* y) { | 9178 static inline ObjectPair MakePair(MaybeObject* x, MaybeObject* y) { |
9179 ObjectPair result = {x, y}; | 9179 ObjectPair result = {x, y}; |
9180 // Pointers x and y returned in rax and rdx, in AMD-x64-abi. | 9180 // Pointers x and y returned in rax and rdx, in AMD-x64-abi. |
9181 // In Win64 they are assigned to a hidden first argument. | 9181 // In Win64 they are assigned to a hidden first argument. |
9182 return result; | 9182 return result; |
9183 } | 9183 } |
9184 #else | 9184 #else |
9185 typedef uint64_t ObjectPair; | 9185 typedef uint64_t ObjectPair; |
9186 static inline ObjectPair MakePair(MaybeObject* x, MaybeObject* y) { | 9186 static inline ObjectPair MakePair(MaybeObject* x, MaybeObject* y) { |
| 9187 #if defined(V8_TARGET_LITTLE_ENDIAN) |
9187 return reinterpret_cast<uint32_t>(x) | | 9188 return reinterpret_cast<uint32_t>(x) | |
9188 (reinterpret_cast<ObjectPair>(y) << 32); | 9189 (reinterpret_cast<ObjectPair>(y) << 32); |
| 9190 #elif defined(V8_TARGET_BIG_ENDIAN) |
| 9191 return reinterpret_cast<uint32_t>(y) | |
| 9192 (reinterpret_cast<ObjectPair>(x) << 32); |
| 9193 #else |
| 9194 #error Unknown endianness |
| 9195 #endif |
9189 } | 9196 } |
9190 #endif | 9197 #endif |
9191 | 9198 |
9192 | 9199 |
9193 static inline MaybeObject* Unhole(Heap* heap, | 9200 static inline MaybeObject* Unhole(Heap* heap, |
9194 MaybeObject* x, | 9201 MaybeObject* x, |
9195 PropertyAttributes attributes) { | 9202 PropertyAttributes attributes) { |
9196 ASSERT(!x->IsTheHole() || (attributes & READ_ONLY) != 0); | 9203 ASSERT(!x->IsTheHole() || (attributes & READ_ONLY) != 0); |
9197 USE(attributes); | 9204 USE(attributes); |
9198 return x->IsTheHole() ? heap->undefined_value() : x; | 9205 return x->IsTheHole() ? heap->undefined_value() : x; |
(...skipping 5953 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
15152 } | 15159 } |
15153 } | 15160 } |
15154 | 15161 |
15155 | 15162 |
15156 void Runtime::OutOfMemory() { | 15163 void Runtime::OutOfMemory() { |
15157 Heap::FatalProcessOutOfMemory("CALL_AND_RETRY_LAST", true); | 15164 Heap::FatalProcessOutOfMemory("CALL_AND_RETRY_LAST", true); |
15158 UNREACHABLE(); | 15165 UNREACHABLE(); |
15159 } | 15166 } |
15160 | 15167 |
15161 } } // namespace v8::internal | 15168 } } // namespace v8::internal |
OLD | NEW |