OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #ifndef VM_DEOPT_INSTRUCTIONS_H_ | 5 #ifndef VM_DEOPT_INSTRUCTIONS_H_ |
6 #define VM_DEOPT_INSTRUCTIONS_H_ | 6 #define VM_DEOPT_INSTRUCTIONS_H_ |
7 | 7 |
8 #include "vm/allocation.h" | 8 #include "vm/allocation.h" |
9 #include "vm/assembler.h" | 9 #include "vm/assembler.h" |
10 #include "vm/code_generator.h" | 10 #include "vm/code_generator.h" |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 // deoptimization will fill in. | 108 // deoptimization will fill in. |
109 intptr_t* FrameBase(const StackFrame* frame) { | 109 intptr_t* FrameBase(const StackFrame* frame) { |
110 #if !defined(TARGET_ARCH_DBC) | 110 #if !defined(TARGET_ARCH_DBC) |
111 // SP of the deoptimization frame is the lowest slot because | 111 // SP of the deoptimization frame is the lowest slot because |
112 // stack is growing downwards. | 112 // stack is growing downwards. |
113 return reinterpret_cast<intptr_t*>( | 113 return reinterpret_cast<intptr_t*>( |
114 frame->sp() - (kDartFrameFixedSize * kWordSize)); | 114 frame->sp() - (kDartFrameFixedSize * kWordSize)); |
115 #else | 115 #else |
116 // First argument is the lowest slot because stack is growing upwards. | 116 // First argument is the lowest slot because stack is growing upwards. |
117 return reinterpret_cast<intptr_t*>( | 117 return reinterpret_cast<intptr_t*>( |
118 frame->fp() - (kDartFrameFixedSize + num_args_) * kWordSize); | 118 frame->fp() - (kDartFrameFixedSize + num_args_) * kWordSize); |
119 #endif // !defined(TARGET_ARCH_DBC) | 119 #endif // !defined(TARGET_ARCH_DBC) |
120 } | 120 } |
121 | 121 |
122 void set_dest_frame(const StackFrame* frame) { | 122 void set_dest_frame(const StackFrame* frame) { |
123 ASSERT(frame != NULL && dest_frame_ == NULL); | 123 ASSERT(frame != NULL && dest_frame_ == NULL); |
124 dest_frame_ = FrameBase(frame); | 124 dest_frame_ = FrameBase(frame); |
125 } | 125 } |
126 | 126 |
127 Thread* thread() const { return thread_; } | 127 Thread* thread() const { return thread_; } |
128 Zone* zone() const { return thread_->zone(); } | 128 Zone* zone() const { return thread_->zone(); } |
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
593 public BitField<intptr_t, ICData::DeoptReasonId, 0, 8> { }; | 593 public BitField<intptr_t, ICData::DeoptReasonId, 0, 8> { }; |
594 class FlagsField : public BitField<intptr_t, uint32_t, 8, 8> { }; | 594 class FlagsField : public BitField<intptr_t, uint32_t, 8, 8> { }; |
595 | 595 |
596 private: | 596 private: |
597 static const intptr_t kEntrySize = 3; | 597 static const intptr_t kEntrySize = 3; |
598 }; | 598 }; |
599 | 599 |
600 } // namespace dart | 600 } // namespace dart |
601 | 601 |
602 #endif // VM_DEOPT_INSTRUCTIONS_H_ | 602 #endif // VM_DEOPT_INSTRUCTIONS_H_ |
OLD | NEW |