OLD | NEW |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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_STUB_CODE_H_ | 5 #ifndef VM_STUB_CODE_H_ |
6 #define VM_STUB_CODE_H_ | 6 #define VM_STUB_CODE_H_ |
7 | 7 |
8 #include "vm/allocation.h" | 8 #include "vm/allocation.h" |
9 #include "vm/assembler.h" | 9 #include "vm/assembler.h" |
10 | 10 |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 #define STUB_CODE_GENERATE(name) \ | 163 #define STUB_CODE_GENERATE(name) \ |
164 static void Generate##name##Stub(Assembler* assembler); | 164 static void Generate##name##Stub(Assembler* assembler); |
165 VM_STUB_CODE_LIST(STUB_CODE_GENERATE); | 165 VM_STUB_CODE_LIST(STUB_CODE_GENERATE); |
166 #undef STUB_CODE_GENERATE | 166 #undef STUB_CODE_GENERATE |
167 | 167 |
168 #define STUB_CODE_ENTRY(name) \ | 168 #define STUB_CODE_ENTRY(name) \ |
169 static StubEntry* name##_entry_; | 169 static StubEntry* name##_entry_; |
170 VM_STUB_CODE_LIST(STUB_CODE_ENTRY); | 170 VM_STUB_CODE_LIST(STUB_CODE_ENTRY); |
171 #undef STUB_CODE_ENTRY | 171 #undef STUB_CODE_ENTRY |
172 | 172 |
173 enum RangeCollectionMode { | |
174 kCollectRanges, | |
175 kIgnoreRanges | |
176 }; | |
177 | |
178 // Generate the stub and finalize the generated code into the stub | 173 // Generate the stub and finalize the generated code into the stub |
179 // code executable area. | 174 // code executable area. |
180 static RawCode* Generate(const char* name, | 175 static RawCode* Generate(const char* name, |
181 void (*GenerateStub)(Assembler* assembler)); | 176 void (*GenerateStub)(Assembler* assembler)); |
182 | 177 |
183 static void GenerateMegamorphicMissStub(Assembler* assembler); | 178 static void GenerateMegamorphicMissStub(Assembler* assembler); |
184 static void GenerateAllocationStubForClass(Assembler* assembler, | 179 static void GenerateAllocationStubForClass(Assembler* assembler, |
185 const Class& cls); | 180 const Class& cls); |
186 static void GenerateNArgsCheckInlineCacheStub( | 181 static void GenerateNArgsCheckInlineCacheStub( |
187 Assembler* assembler, | 182 Assembler* assembler, |
188 intptr_t num_args, | 183 intptr_t num_args, |
189 const RuntimeEntry& handle_ic_miss, | 184 const RuntimeEntry& handle_ic_miss, |
190 Token::Kind kind, | 185 Token::Kind kind, |
191 RangeCollectionMode range_collection_mode, | |
192 bool optimized = false); | 186 bool optimized = false); |
193 static void GenerateUsageCounterIncrement(Assembler* assembler, | 187 static void GenerateUsageCounterIncrement(Assembler* assembler, |
194 Register temp_reg); | 188 Register temp_reg); |
195 static void GenerateOptimizedUsageCounterIncrement(Assembler* assembler); | 189 static void GenerateOptimizedUsageCounterIncrement(Assembler* assembler); |
196 }; | 190 }; |
197 | 191 |
198 | 192 |
199 enum DeoptStubKind { | 193 enum DeoptStubKind { |
200 kLazyDeopt, | 194 kLazyDeopt, |
201 kEagerDeopt | 195 kEagerDeopt |
202 }; | 196 }; |
203 | 197 |
204 } // namespace dart | 198 } // namespace dart |
205 | 199 |
206 #endif // VM_STUB_CODE_H_ | 200 #endif // VM_STUB_CODE_H_ |
OLD | NEW |