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 #ifndef V8_DEOPTIMIZER_H_ | 5 #ifndef V8_DEOPTIMIZER_H_ |
6 #define V8_DEOPTIMIZER_H_ | 6 #define V8_DEOPTIMIZER_H_ |
7 | 7 |
8 #include "src/v8.h" | 8 #include "src/v8.h" |
9 | 9 |
10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
11 #include "src/macro-assembler.h" | 11 #include "src/macro-assembler.h" |
12 #include "src/zone-inl.h" | 12 #include "src/zone-inl.h" |
13 | 13 |
14 | 14 |
15 namespace v8 { | 15 namespace v8 { |
16 namespace internal { | 16 namespace internal { |
17 | 17 |
18 | 18 |
19 static inline double read_double_value(Address p) { | 19 static inline double read_double_value(Address p) { |
20 // Prevent gcc from using load-double (mips ldc1) on (possibly) | 20 double d; |
21 // non-64-bit aligned address. | 21 memcpy(&d, p, sizeof(d)); |
22 // We assume that the address is 32-bit aligned. | 22 return d; |
23 DCHECK(IsAligned(reinterpret_cast<intptr_t>(p), kInt32Size)); | |
24 union conversion { | |
25 double d; | |
26 uint32_t u[2]; | |
27 } c; | |
28 c.u[0] = Memory::uint32_at(p); | |
29 c.u[1] = Memory::uint32_at(p + 4); | |
30 return c.d; | |
31 } | 23 } |
32 | 24 |
33 | 25 |
34 class FrameDescription; | 26 class FrameDescription; |
35 class TranslationIterator; | 27 class TranslationIterator; |
36 class DeoptimizedFrameInfo; | 28 class DeoptimizedFrameInfo; |
37 | 29 |
38 template<typename T> | 30 template<typename T> |
39 class HeapNumberMaterializationDescriptor BASE_EMBEDDED { | 31 class HeapNumberMaterializationDescriptor BASE_EMBEDDED { |
40 public: | 32 public: |
(...skipping 925 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
966 Object** parameters_; | 958 Object** parameters_; |
967 Object** expression_stack_; | 959 Object** expression_stack_; |
968 int source_position_; | 960 int source_position_; |
969 | 961 |
970 friend class Deoptimizer; | 962 friend class Deoptimizer; |
971 }; | 963 }; |
972 | 964 |
973 } } // namespace v8::internal | 965 } } // namespace v8::internal |
974 | 966 |
975 #endif // V8_DEOPTIMIZER_H_ | 967 #endif // V8_DEOPTIMIZER_H_ |
OLD | NEW |