Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(692)

Side by Side Diff: runtime/vm/stub_code.h

Issue 11642003: Create and cache method extraction stub in the ICData. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: ready for review. Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 } \ 149 } \
150 static intptr_t name##Size() { \ 150 static intptr_t name##Size() { \
151 return name##_entry()->Size(); \ 151 return name##_entry()->Size(); \
152 } 152 }
153 STUB_CODE_LIST(STUB_CODE_ACCESSOR); 153 STUB_CODE_LIST(STUB_CODE_ACCESSOR);
154 #undef STUB_CODE_ACCESSOR 154 #undef STUB_CODE_ACCESSOR
155 155
156 static RawCode* GetAllocationStubForClass(const Class& cls); 156 static RawCode* GetAllocationStubForClass(const Class& cls);
157 static RawCode* GetAllocationStubForClosure(const Function& func); 157 static RawCode* GetAllocationStubForClosure(const Function& func);
158 158
159 static RawFunction* GetMethodExtractor(const Function& closure_function);
160
159 static const intptr_t kNoInstantiator = 0; 161 static const intptr_t kNoInstantiator = 0;
160 162
161 private: 163 private:
162 friend class MegamorphicCacheTable; 164 friend class MegamorphicCacheTable;
163 165
164 static const intptr_t kStubCodeSize = 4 * KB; 166 static const intptr_t kStubCodeSize = 4 * KB;
165 167
166 #define STUB_CODE_GENERATE(name) \ 168 #define STUB_CODE_GENERATE(name) \
167 static void Generate##name##Stub(Assembler* assembler); 169 static void Generate##name##Stub(Assembler* assembler);
168 VM_STUB_CODE_LIST(STUB_CODE_GENERATE); 170 VM_STUB_CODE_LIST(STUB_CODE_GENERATE);
(...skipping 20 matching lines...) Expand all
189 static void GenerateMegamorphicMissStub(Assembler* assembler); 191 static void GenerateMegamorphicMissStub(Assembler* assembler);
190 static void GenerateAllocationStubForClass(Assembler* assembler, 192 static void GenerateAllocationStubForClass(Assembler* assembler,
191 const Class& cls); 193 const Class& cls);
192 static void GenerateAllocationStubForClosure(Assembler* assembler, 194 static void GenerateAllocationStubForClosure(Assembler* assembler,
193 const Function& func); 195 const Function& func);
194 static void GenerateNArgsCheckInlineCacheStub(Assembler* assembler, 196 static void GenerateNArgsCheckInlineCacheStub(Assembler* assembler,
195 intptr_t num_args); 197 intptr_t num_args);
196 static void GenerateUsageCounterIncrement(Assembler* assembler, 198 static void GenerateUsageCounterIncrement(Assembler* assembler,
197 Register temp_reg); 199 Register temp_reg);
198 static void GenerateOptimizedUsageCounterIncrement(Assembler* assembler); 200 static void GenerateOptimizedUsageCounterIncrement(Assembler* assembler);
201 static void GenerateMethodExtractor(Assembler* assembler,
202 const Function& closure_function);
199 }; 203 };
200 204
201 } // namespace dart 205 } // namespace dart
202 206
203 #endif // VM_STUB_CODE_H_ 207 #endif // VM_STUB_CODE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698