| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 V(AllocateContext) \ | 55 V(AllocateContext) \ |
| 56 V(UpdateStoreBuffer) \ | 56 V(UpdateStoreBuffer) \ |
| 57 V(OneArgCheckInlineCache) \ | 57 V(OneArgCheckInlineCache) \ |
| 58 V(TwoArgsCheckInlineCache) \ | 58 V(TwoArgsCheckInlineCache) \ |
| 59 V(ThreeArgsCheckInlineCache) \ | 59 V(ThreeArgsCheckInlineCache) \ |
| 60 V(OneArgOptimizedCheckInlineCache) \ | 60 V(OneArgOptimizedCheckInlineCache) \ |
| 61 V(TwoArgsOptimizedCheckInlineCache) \ | 61 V(TwoArgsOptimizedCheckInlineCache) \ |
| 62 V(ThreeArgsOptimizedCheckInlineCache) \ | 62 V(ThreeArgsOptimizedCheckInlineCache) \ |
| 63 V(ClosureCallInlineCache) \ | 63 V(ClosureCallInlineCache) \ |
| 64 V(ZeroArgsUnoptimizedStaticCall) \ | 64 V(ZeroArgsUnoptimizedStaticCall) \ |
| 65 V(OneArgUnoptimizedStaticCall) \ |
| 65 V(TwoArgsUnoptimizedStaticCall) \ | 66 V(TwoArgsUnoptimizedStaticCall) \ |
| 66 V(OptimizeFunction) \ | 67 V(OptimizeFunction) \ |
| 67 V(InvokeDartCode) \ | 68 V(InvokeDartCode) \ |
| 68 | 69 |
| 69 // class StubEntry is used to describe stub methods generated in dart to | 70 // class StubEntry is used to describe stub methods generated in dart to |
| 70 // abstract out common code executed from generated dart code. | 71 // abstract out common code executed from generated dart code. |
| 71 class StubEntry { | 72 class StubEntry { |
| 72 public: | 73 public: |
| 73 explicit StubEntry(const Code& code); | 74 explicit StubEntry(const Code& code); |
| 74 ~StubEntry() {} | 75 ~StubEntry() {} |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 return name##_entry()->EntryPoint(); \ | 156 return name##_entry()->EntryPoint(); \ |
| 156 } \ | 157 } \ |
| 157 intptr_t name##Size() { \ | 158 intptr_t name##Size() { \ |
| 158 return name##_entry()->Size(); \ | 159 return name##_entry()->Size(); \ |
| 159 } | 160 } |
| 160 STUB_CODE_LIST(STUB_CODE_ACCESSOR); | 161 STUB_CODE_LIST(STUB_CODE_ACCESSOR); |
| 161 #undef STUB_CODE_ACCESSOR | 162 #undef STUB_CODE_ACCESSOR |
| 162 | 163 |
| 163 static RawCode* GetAllocationStubForClass(const Class& cls); | 164 static RawCode* GetAllocationStubForClass(const Class& cls); |
| 164 | 165 |
| 166 uword UnoptimizedStaticCallEntryPoint(intptr_t num_args_tested); |
| 167 |
| 165 static const intptr_t kNoInstantiator = 0; | 168 static const intptr_t kNoInstantiator = 0; |
| 166 | 169 |
| 167 private: | 170 private: |
| 168 friend class MegamorphicCacheTable; | 171 friend class MegamorphicCacheTable; |
| 169 | 172 |
| 170 static const intptr_t kStubCodeSize = 4 * KB; | 173 static const intptr_t kStubCodeSize = 4 * KB; |
| 171 | 174 |
| 172 #define STUB_CODE_GENERATE(name) \ | 175 #define STUB_CODE_GENERATE(name) \ |
| 173 static void Generate##name##Stub(Assembler* assembler); | 176 static void Generate##name##Stub(Assembler* assembler); |
| 174 VM_STUB_CODE_LIST(STUB_CODE_GENERATE); | 177 VM_STUB_CODE_LIST(STUB_CODE_GENERATE); |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 Assembler* assembler, | 211 Assembler* assembler, |
| 209 const Register left, | 212 const Register left, |
| 210 const Register right, | 213 const Register right, |
| 211 const Register temp1 = kNoRegister, | 214 const Register temp1 = kNoRegister, |
| 212 const Register temp2 = kNoRegister); | 215 const Register temp2 = kNoRegister); |
| 213 }; | 216 }; |
| 214 | 217 |
| 215 } // namespace dart | 218 } // namespace dart |
| 216 | 219 |
| 217 #endif // VM_STUB_CODE_H_ | 220 #endif // VM_STUB_CODE_H_ |
| OLD | NEW |