Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(344)

Side by Side Diff: src/deoptimizer.h

Issue 571903002: Reland "Remove V8_HOST_CAN_READ_UNALIGNED and its uses." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comment Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/base/build_config.h ('k') | src/objects.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifdef V8_HOST_CAN_READ_UNALIGNED
21 return Memory::double_at(p);
22 #else // V8_HOST_CAN_READ_UNALIGNED
23 // Prevent gcc from using load-double (mips ldc1) on (possibly) 20 // Prevent gcc from using load-double (mips ldc1) on (possibly)
24 // non-64-bit aligned address. 21 // non-64-bit aligned address.
22 // We assume that the address is 32-bit aligned.
23 DCHECK(IsAligned(reinterpret_cast<intptr_t>(p), kInt32Size));
25 union conversion { 24 union conversion {
26 double d; 25 double d;
27 uint32_t u[2]; 26 uint32_t u[2];
28 } c; 27 } c;
29 c.u[0] = *reinterpret_cast<uint32_t*>(p); 28 c.u[0] = Memory::uint32_at(p);
30 c.u[1] = *reinterpret_cast<uint32_t*>(p + 4); 29 c.u[1] = Memory::uint32_at(p + 4);
31 return c.d; 30 return c.d;
32 #endif // V8_HOST_CAN_READ_UNALIGNED
33 } 31 }
34 32
35 33
36 class FrameDescription; 34 class FrameDescription;
37 class TranslationIterator; 35 class TranslationIterator;
38 class DeoptimizedFrameInfo; 36 class DeoptimizedFrameInfo;
39 37
40 template<typename T> 38 template<typename T>
41 class HeapNumberMaterializationDescriptor BASE_EMBEDDED { 39 class HeapNumberMaterializationDescriptor BASE_EMBEDDED {
42 public: 40 public:
(...skipping 923 matching lines...) Expand 10 before | Expand all | Expand 10 after
966 Object** parameters_; 964 Object** parameters_;
967 Object** expression_stack_; 965 Object** expression_stack_;
968 int source_position_; 966 int source_position_;
969 967
970 friend class Deoptimizer; 968 friend class Deoptimizer;
971 }; 969 };
972 970
973 } } // namespace v8::internal 971 } } // namespace v8::internal
974 972
975 #endif // V8_DEOPTIMIZER_H_ 973 #endif // V8_DEOPTIMIZER_H_
OLDNEW
« no previous file with comments | « src/base/build_config.h ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698