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

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

Issue 178233003: Allocate instance closures similarly to regular closures, i.e. without a (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 9 months 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
« no previous file with comments | « runtime/vm/raw_object.h ('k') | runtime/vm/stub_code.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 static uword name##EntryPoint() { \ 149 static uword name##EntryPoint() { \
150 return name##_entry()->EntryPoint(); \ 150 return name##_entry()->EntryPoint(); \
151 } \ 151 } \
152 static intptr_t name##Size() { \ 152 static intptr_t name##Size() { \
153 return name##_entry()->Size(); \ 153 return name##_entry()->Size(); \
154 } 154 }
155 STUB_CODE_LIST(STUB_CODE_ACCESSOR); 155 STUB_CODE_LIST(STUB_CODE_ACCESSOR);
156 #undef STUB_CODE_ACCESSOR 156 #undef STUB_CODE_ACCESSOR
157 157
158 static RawCode* GetAllocationStubForClass(const Class& cls); 158 static RawCode* GetAllocationStubForClass(const Class& cls);
159 static RawCode* GetAllocationStubForClosure(const Function& func);
160 159
161 static const intptr_t kNoInstantiator = 0; 160 static const intptr_t kNoInstantiator = 0;
162 161
163 private: 162 private:
164 friend class MegamorphicCacheTable; 163 friend class MegamorphicCacheTable;
165 164
166 static const intptr_t kStubCodeSize = 4 * KB; 165 static const intptr_t kStubCodeSize = 4 * KB;
167 166
168 #define STUB_CODE_GENERATE(name) \ 167 #define STUB_CODE_GENERATE(name) \
169 static void Generate##name##Stub(Assembler* assembler); 168 static void Generate##name##Stub(Assembler* assembler);
(...skipping 15 matching lines...) Expand all
185 void* dummy_; 184 void* dummy_;
186 185
187 // Generate the stub and finalize the generated code into the stub 186 // Generate the stub and finalize the generated code into the stub
188 // code executable area. 187 // code executable area.
189 static RawCode* Generate(const char* name, 188 static RawCode* Generate(const char* name,
190 void (*GenerateStub)(Assembler* assembler)); 189 void (*GenerateStub)(Assembler* assembler));
191 190
192 static void GenerateMegamorphicMissStub(Assembler* assembler); 191 static void GenerateMegamorphicMissStub(Assembler* assembler);
193 static void GenerateAllocationStubForClass(Assembler* assembler, 192 static void GenerateAllocationStubForClass(Assembler* assembler,
194 const Class& cls); 193 const Class& cls);
195 static void GenerateAllocationStubForClosure(Assembler* assembler,
196 const Function& func);
197 static void GenerateNArgsCheckInlineCacheStub( 194 static void GenerateNArgsCheckInlineCacheStub(
198 Assembler* assembler, 195 Assembler* assembler,
199 intptr_t num_args, 196 intptr_t num_args,
200 const RuntimeEntry& handle_ic_miss); 197 const RuntimeEntry& handle_ic_miss);
201 static void GenerateUsageCounterIncrement(Assembler* assembler, 198 static void GenerateUsageCounterIncrement(Assembler* assembler,
202 Register temp_reg); 199 Register temp_reg);
203 static void GenerateOptimizedUsageCounterIncrement(Assembler* assembler); 200 static void GenerateOptimizedUsageCounterIncrement(Assembler* assembler);
204 201
205 static void GenerateIdenticalWithNumberCheckStub( 202 static void GenerateIdenticalWithNumberCheckStub(
206 Assembler* assembler, 203 Assembler* assembler,
207 const Register left, 204 const Register left,
208 const Register right, 205 const Register right,
209 const Register temp1 = kNoRegister, 206 const Register temp1 = kNoRegister,
210 const Register temp2 = kNoRegister); 207 const Register temp2 = kNoRegister);
211 }; 208 };
212 209
213 } // namespace dart 210 } // namespace dart
214 211
215 #endif // VM_STUB_CODE_H_ 212 #endif // VM_STUB_CODE_H_
OLDNEW
« no previous file with comments | « runtime/vm/raw_object.h ('k') | runtime/vm/stub_code.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698