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 8840 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8851 MaybeObject* x; | 8851 MaybeObject* x; |
8852 MaybeObject* y; | 8852 MaybeObject* y; |
8853 }; | 8853 }; |
8854 | 8854 |
8855 static inline ObjectPair MakePair(MaybeObject* x, MaybeObject* y) { | 8855 static inline ObjectPair MakePair(MaybeObject* x, MaybeObject* y) { |
8856 ObjectPair result = {x, y}; | 8856 ObjectPair result = {x, y}; |
8857 // Pointers x and y returned in rax and rdx, in AMD-x64-abi. | 8857 // Pointers x and y returned in rax and rdx, in AMD-x64-abi. |
8858 // In Win64 they are assigned to a hidden first argument. | 8858 // In Win64 they are assigned to a hidden first argument. |
8859 return result; | 8859 return result; |
8860 } | 8860 } |
| 8861 #elif V8_TARGET_ARCH_X32 |
| 8862 // For x32 a 128-bit struct return is done as rax and rdx from the ObjectPair |
| 8863 // are used in the full codegen and Crankshaft compiler. An alternative is |
| 8864 // using uint64_t and modifying full codegen and Crankshaft compiler. |
| 8865 struct ObjectPair { |
| 8866 MaybeObject* x; |
| 8867 uint32_t x_upper; |
| 8868 MaybeObject* y; |
| 8869 uint32_t y_upper; |
| 8870 }; |
| 8871 |
| 8872 static inline ObjectPair MakePair(MaybeObject* x, MaybeObject* y) { |
| 8873 ObjectPair result = {x, 0, y, 0}; |
| 8874 // Pointers x and y returned in rax and rdx, in x32-abi. |
| 8875 return result; |
| 8876 } |
8861 #else | 8877 #else |
8862 typedef uint64_t ObjectPair; | 8878 typedef uint64_t ObjectPair; |
8863 static inline ObjectPair MakePair(MaybeObject* x, MaybeObject* y) { | 8879 static inline ObjectPair MakePair(MaybeObject* x, MaybeObject* y) { |
8864 return reinterpret_cast<uint32_t>(x) | | 8880 return reinterpret_cast<uint32_t>(x) | |
8865 (reinterpret_cast<ObjectPair>(y) << 32); | 8881 (reinterpret_cast<ObjectPair>(y) << 32); |
8866 } | 8882 } |
8867 #endif | 8883 #endif |
8868 | 8884 |
8869 | 8885 |
8870 static inline MaybeObject* Unhole(Heap* heap, | 8886 static inline MaybeObject* Unhole(Heap* heap, |
(...skipping 5075 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13946 // Handle last resort GC and make sure to allow future allocations | 13962 // Handle last resort GC and make sure to allow future allocations |
13947 // to grow the heap without causing GCs (if possible). | 13963 // to grow the heap without causing GCs (if possible). |
13948 isolate->counters()->gc_last_resort_from_js()->Increment(); | 13964 isolate->counters()->gc_last_resort_from_js()->Increment(); |
13949 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, | 13965 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, |
13950 "Runtime::PerformGC"); | 13966 "Runtime::PerformGC"); |
13951 } | 13967 } |
13952 } | 13968 } |
13953 | 13969 |
13954 | 13970 |
13955 } } // namespace v8::internal | 13971 } } // namespace v8::internal |
OLD | NEW |