| 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 V(FixAllocateArrayStubTarget) \ | 47 V(FixAllocateArrayStubTarget) \ |
| 48 V(CallClosureNoSuchMethod) \ | 48 V(CallClosureNoSuchMethod) \ |
| 49 V(AllocateContext) \ | 49 V(AllocateContext) \ |
| 50 V(UpdateStoreBuffer) \ | 50 V(UpdateStoreBuffer) \ |
| 51 V(OneArgCheckInlineCache) \ | 51 V(OneArgCheckInlineCache) \ |
| 52 V(TwoArgsCheckInlineCache) \ | 52 V(TwoArgsCheckInlineCache) \ |
| 53 V(ThreeArgsCheckInlineCache) \ | 53 V(ThreeArgsCheckInlineCache) \ |
| 54 V(SmiAddInlineCache) \ | 54 V(SmiAddInlineCache) \ |
| 55 V(SmiSubInlineCache) \ | 55 V(SmiSubInlineCache) \ |
| 56 V(SmiEqualInlineCache) \ | 56 V(SmiEqualInlineCache) \ |
| 57 V(UnaryRangeCollectingInlineCache) \ |
| 58 V(BinaryRangeCollectingInlineCache) \ |
| 57 V(OneArgOptimizedCheckInlineCache) \ | 59 V(OneArgOptimizedCheckInlineCache) \ |
| 58 V(TwoArgsOptimizedCheckInlineCache) \ | 60 V(TwoArgsOptimizedCheckInlineCache) \ |
| 59 V(ThreeArgsOptimizedCheckInlineCache) \ | 61 V(ThreeArgsOptimizedCheckInlineCache) \ |
| 60 V(ZeroArgsUnoptimizedStaticCall) \ | 62 V(ZeroArgsUnoptimizedStaticCall) \ |
| 61 V(OneArgUnoptimizedStaticCall) \ | 63 V(OneArgUnoptimizedStaticCall) \ |
| 62 V(TwoArgsUnoptimizedStaticCall) \ | 64 V(TwoArgsUnoptimizedStaticCall) \ |
| 63 V(OptimizeFunction) \ | 65 V(OptimizeFunction) \ |
| 64 V(InvokeDartCode) \ | 66 V(InvokeDartCode) \ |
| 65 V(Subtype1TestCache) \ | 67 V(Subtype1TestCache) \ |
| 66 V(Subtype2TestCache) \ | 68 V(Subtype2TestCache) \ |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 static StubEntry* name##_entry_; | 201 static StubEntry* name##_entry_; |
| 200 VM_STUB_CODE_LIST(STUB_CODE_ENTRY); | 202 VM_STUB_CODE_LIST(STUB_CODE_ENTRY); |
| 201 #undef STUB_CODE_ENTRY | 203 #undef STUB_CODE_ENTRY |
| 202 | 204 |
| 203 #define STUB_CODE_ENTRY(name) \ | 205 #define STUB_CODE_ENTRY(name) \ |
| 204 StubEntry* name##_entry_; | 206 StubEntry* name##_entry_; |
| 205 STUB_CODE_LIST(STUB_CODE_ENTRY); | 207 STUB_CODE_LIST(STUB_CODE_ENTRY); |
| 206 #undef STUB_CODE_ENTRY | 208 #undef STUB_CODE_ENTRY |
| 207 Isolate* isolate_; | 209 Isolate* isolate_; |
| 208 | 210 |
| 211 enum RangeCollectionMode { |
| 212 kCollectRanges, |
| 213 kIgnoreRanges |
| 214 }; |
| 215 |
| 209 // Generate the stub and finalize the generated code into the stub | 216 // Generate the stub and finalize the generated code into the stub |
| 210 // code executable area. | 217 // code executable area. |
| 211 static RawCode* Generate(const char* name, | 218 static RawCode* Generate(const char* name, |
| 212 void (*GenerateStub)(Assembler* assembler)); | 219 void (*GenerateStub)(Assembler* assembler)); |
| 213 | 220 |
| 214 static void GenerateMegamorphicMissStub(Assembler* assembler); | 221 static void GenerateMegamorphicMissStub(Assembler* assembler); |
| 215 static void GenerateAllocationStubForClass( | 222 static void GenerateAllocationStubForClass( |
| 216 Assembler* assembler, const Class& cls, | 223 Assembler* assembler, const Class& cls, |
| 217 uword* entry_patch_offset, uword* patch_code_pc_offset); | 224 uword* entry_patch_offset, uword* patch_code_pc_offset); |
| 218 static void GeneratePatchableAllocateArrayStub(Assembler* assembler, | 225 static void GeneratePatchableAllocateArrayStub(Assembler* assembler, |
| 219 uword* entry_patch_offset, uword* patch_code_pc_offset); | 226 uword* entry_patch_offset, uword* patch_code_pc_offset); |
| 220 static void GenerateNArgsCheckInlineCacheStub( | 227 static void GenerateNArgsCheckInlineCacheStub( |
| 221 Assembler* assembler, | 228 Assembler* assembler, |
| 222 intptr_t num_args, | 229 intptr_t num_args, |
| 223 const RuntimeEntry& handle_ic_miss, | 230 const RuntimeEntry& handle_ic_miss, |
| 224 Token::Kind kind); | 231 Token::Kind kind, |
| 232 RangeCollectionMode range_collection_mode); |
| 225 static void GenerateUsageCounterIncrement(Assembler* assembler, | 233 static void GenerateUsageCounterIncrement(Assembler* assembler, |
| 226 Register temp_reg); | 234 Register temp_reg); |
| 227 static void GenerateOptimizedUsageCounterIncrement(Assembler* assembler); | 235 static void GenerateOptimizedUsageCounterIncrement(Assembler* assembler); |
| 228 | 236 |
| 229 static void GenerateIdenticalWithNumberCheckStub( | 237 static void GenerateIdenticalWithNumberCheckStub( |
| 230 Assembler* assembler, | 238 Assembler* assembler, |
| 231 const Register left, | 239 const Register left, |
| 232 const Register right, | 240 const Register right, |
| 233 const Register temp1 = kNoRegister, | 241 const Register temp1 = kNoRegister, |
| 234 const Register temp2 = kNoRegister); | 242 const Register temp2 = kNoRegister); |
| 235 }; | 243 }; |
| 236 | 244 |
| 237 } // namespace dart | 245 } // namespace dart |
| 238 | 246 |
| 239 #endif // VM_STUB_CODE_H_ | 247 #endif // VM_STUB_CODE_H_ |
| OLD | NEW |