OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 RUNTIME_VM_SIMULATOR_DBC_H_ | 5 #ifndef RUNTIME_VM_SIMULATOR_DBC_H_ |
6 #define RUNTIME_VM_SIMULATOR_DBC_H_ | 6 #define RUNTIME_VM_SIMULATOR_DBC_H_ |
7 | 7 |
8 #ifndef RUNTIME_VM_SIMULATOR_H_ | 8 #ifndef RUNTIME_VM_SIMULATOR_H_ |
9 #error Do not include simulator_dbc.h directly; use simulator.h. | 9 #error Do not include simulator_dbc.h directly; use simulator.h. |
10 #endif | 10 #endif |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 uword fp, | 69 uword fp, |
70 RawObject* raw_exception, | 70 RawObject* raw_exception, |
71 RawObject* raw_stacktrace, | 71 RawObject* raw_stacktrace, |
72 Thread* thread); | 72 Thread* thread); |
73 | 73 |
74 uword get_sp() const { return reinterpret_cast<uword>(sp_); } | 74 uword get_sp() const { return reinterpret_cast<uword>(sp_); } |
75 uword get_fp() const { return reinterpret_cast<uword>(fp_); } | 75 uword get_fp() const { return reinterpret_cast<uword>(fp_); } |
76 uword get_pc() const { return reinterpret_cast<uword>(pc_); } | 76 uword get_pc() const { return reinterpret_cast<uword>(pc_); } |
77 | 77 |
78 enum IntrinsicId { | 78 enum IntrinsicId { |
79 #define V(test_class_name, test_function_name, enum_name, type, fp) \ | 79 #define V(test_class_name, test_function_name, enum_name, type, fp) \ |
80 k##enum_name##Intrinsic, | 80 k##enum_name##Intrinsic, |
81 ALL_INTRINSICS_LIST(V) | 81 ALL_INTRINSICS_LIST(V) GRAPH_INTRINSICS_LIST(V) |
82 GRAPH_INTRINSICS_LIST(V) | |
83 #undef V | 82 #undef V |
84 kIntrinsicCount, | 83 kIntrinsicCount, |
85 }; | 84 }; |
86 | 85 |
87 static bool IsSupportedIntrinsic(IntrinsicId id) { | 86 static bool IsSupportedIntrinsic(IntrinsicId id) { |
88 return intrinsics_[id] != NULL; | 87 return intrinsics_[id] != NULL; |
89 } | 88 } |
90 | 89 |
91 enum SpecialIndex { | 90 enum SpecialIndex { |
92 kExceptionSpecialIndex, | 91 kExceptionSpecialIndex, |
93 kStacktraceSpecialIndex, | 92 kStacktraceSpecialIndex, |
94 kSpecialIndexCount | 93 kSpecialIndexCount |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 uint32_t** pc, | 128 uint32_t** pc, |
130 RawObject*** FP, | 129 RawObject*** FP, |
131 RawObject*** SP); | 130 RawObject*** SP); |
132 | 131 |
133 void InlineCacheMiss(int checked_args, | 132 void InlineCacheMiss(int checked_args, |
134 Thread* thread, | 133 Thread* thread, |
135 RawICData* icdata, | 134 RawICData* icdata, |
136 RawObject** call_base, | 135 RawObject** call_base, |
137 RawObject** top, | 136 RawObject** top, |
138 uint32_t* pc, | 137 uint32_t* pc, |
139 RawObject** FP, RawObject** SP); | 138 RawObject** FP, |
| 139 RawObject** SP); |
140 | 140 |
141 void InstanceCall1(Thread* thread, | 141 void InstanceCall1(Thread* thread, |
142 RawICData* icdata, | 142 RawICData* icdata, |
143 RawObject** call_base, | 143 RawObject** call_base, |
144 RawObject** call_top, | 144 RawObject** call_top, |
145 RawArray** argdesc, | 145 RawArray** argdesc, |
146 RawObjectPool** pp, | 146 RawObjectPool** pp, |
147 uint32_t** pc, | 147 uint32_t** pc, |
148 RawObject*** FP, RawObject*** SP, | 148 RawObject*** FP, |
| 149 RawObject*** SP, |
149 bool optimized); | 150 bool optimized); |
150 | 151 |
151 void InstanceCall2(Thread* thread, | 152 void InstanceCall2(Thread* thread, |
152 RawICData* icdata, | 153 RawICData* icdata, |
153 RawObject** call_base, | 154 RawObject** call_base, |
154 RawObject** call_top, | 155 RawObject** call_top, |
155 RawArray** argdesc, | 156 RawArray** argdesc, |
156 RawObjectPool** pp, | 157 RawObjectPool** pp, |
157 uint32_t** pc, | 158 uint32_t** pc, |
158 RawObject*** FP, RawObject*** SP, | 159 RawObject*** FP, |
| 160 RawObject*** SP, |
159 bool optimized); | 161 bool optimized); |
160 | 162 |
161 // Longjmp support for exceptions. | 163 // Longjmp support for exceptions. |
162 SimulatorSetjmpBuffer* last_setjmp_buffer() { | 164 SimulatorSetjmpBuffer* last_setjmp_buffer() { return last_setjmp_buffer_; } |
163 return last_setjmp_buffer_; | |
164 } | |
165 void set_last_setjmp_buffer(SimulatorSetjmpBuffer* buffer) { | 165 void set_last_setjmp_buffer(SimulatorSetjmpBuffer* buffer) { |
166 last_setjmp_buffer_ = buffer; | 166 last_setjmp_buffer_ = buffer; |
167 } | 167 } |
168 | 168 |
169 friend class SimulatorSetjmpBuffer; | 169 friend class SimulatorSetjmpBuffer; |
170 DISALLOW_COPY_AND_ASSIGN(Simulator); | 170 DISALLOW_COPY_AND_ASSIGN(Simulator); |
171 }; | 171 }; |
172 | 172 |
173 } // namespace dart | 173 } // namespace dart |
174 | 174 |
175 #endif // RUNTIME_VM_SIMULATOR_DBC_H_ | 175 #endif // RUNTIME_VM_SIMULATOR_DBC_H_ |
OLD | NEW |