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

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

Issue 10317026: Inline type checks for complex uninstantiated types, e.g., List<T>. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 7 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/code_generator.cc ('k') | runtime/vm/code_generator_ia32.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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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_CODE_GENERATOR_IA32_H_ 5 #ifndef VM_CODE_GENERATOR_IA32_H_
6 #define VM_CODE_GENERATOR_IA32_H_ 6 #define VM_CODE_GENERATOR_IA32_H_
7 7
8 #ifndef VM_CODE_GENERATOR_H_ 8 #ifndef VM_CODE_GENERATOR_H_
9 #error Do not include code_generator_ia32.h directly; use code_generator.h. 9 #error Do not include code_generator_ia32.h directly; use code_generator.h.
10 #endif 10 #endif
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 const AbstractType& type, 173 const AbstractType& type,
174 bool negate_result); 174 bool negate_result);
175 void GenerateAssertAssignable(intptr_t node_id, 175 void GenerateAssertAssignable(intptr_t node_id,
176 intptr_t token_index, 176 intptr_t token_index,
177 AstNode* value, 177 AstNode* value,
178 const AbstractType& dst_type, 178 const AbstractType& dst_type,
179 const String& dst_name); 179 const String& dst_name);
180 void GenerateArgumentTypeChecks(); 180 void GenerateArgumentTypeChecks();
181 void GenerateConditionTypeCheck(intptr_t node_id, intptr_t token_index); 181 void GenerateConditionTypeCheck(intptr_t node_id, intptr_t token_index);
182 182
183 void GenerateInstantiatorTypeArguments(intptr_t token_index); 183 void GenerateInstantiatorTypeArguments(intptr_t token_index,
184 bool push_instantiator);
184 void GenerateTypeArguments(intptr_t node_id, 185 void GenerateTypeArguments(intptr_t node_id,
185 intptr_t token_index, 186 intptr_t token_index,
186 const AbstractTypeArguments& type_arguments, 187 const AbstractTypeArguments& type_arguments,
187 bool instantiate_type_arguments); 188 bool instantiate_type_arguments);
188 189
189 intptr_t locals_space_size() const { return locals_space_size_; } 190 intptr_t locals_space_size() const { return locals_space_size_; }
190 void set_locals_space_size(intptr_t value) { locals_space_size_ = value; } 191 void set_locals_space_size(intptr_t value) { locals_space_size_ = value; }
191 192
192 bool IsResultNeeded(AstNode* node) const; 193 bool IsResultNeeded(AstNode* node) const;
193 194
194 void GenerateCall(intptr_t token_index, 195 void GenerateCall(intptr_t token_index,
195 const ExternalLabel* ext_label, 196 const ExternalLabel* ext_label,
196 PcDescriptors::Kind desc_kind); 197 PcDescriptors::Kind desc_kind);
197 void GenerateCallRuntime(intptr_t node_id, 198 void GenerateCallRuntime(intptr_t node_id,
198 intptr_t token_index, 199 intptr_t token_index,
199 const RuntimeEntry& entry); 200 const RuntimeEntry& entry);
200 201
201 void GenerateInlinedFinallyBlocks(SourceLabel* label); 202 void GenerateInlinedFinallyBlocks(SourceLabel* label);
202 203
203 RawSubtypeTestCache* GenerateInlineInstanceof(intptr_t node_id, 204 RawSubtypeTestCache* GenerateInlineInstanceof(intptr_t node_id,
204 intptr_t token_index, 205 intptr_t token_index,
205 const AbstractType& type, 206 const AbstractType& type,
206 Label* is_instance_lbl, 207 Label* is_instance_lbl,
207 Label* is_not_instance_lbl); 208 Label* is_not_instance_lbl);
208 209
209 RawSubtypeTestCache* GenerateInstantiatedTypeWithArgumentsTest( 210 RawSubtypeTestCache* GenerateInstantiatedTypeWithArgumentsTest(
210 intptr_t node_id, 211 intptr_t node_id,
211 intptr_t token_index, 212 intptr_t token_index,
212 const AbstractType& dst_type, 213 const AbstractType& dst_type,
213 Label* is_instance_lbl, 214 Label* is_instance_lbl,
214 Label* is_not_instance_lbl); 215 Label* is_not_instance_lbl);
215 void GenerateInstantiatedTypeNoArgumentsTest(intptr_t node_id, 216 void GenerateInstantiatedTypeNoArgumentsTest(intptr_t node_id,
216 intptr_t token_index, 217 intptr_t token_index,
217 const AbstractType& dst_type, 218 const AbstractType& dst_type,
218 Label* is_instance_lbl, 219 Label* is_instance_lbl,
219 Label* is_not_instance_lbl); 220 Label* is_not_instance_lbl);
220 void GenerateUninstantiatedTypeTest(const AbstractType& dst_type, 221 RawSubtypeTestCache* GenerateUninstantiatedTypeTest(
221 intptr_t token_index, 222 const AbstractType& dst_type,
222 Label* is_instance_lbl); 223 intptr_t node_id,
224 intptr_t token_index,
225 Label* is_instance_lbl,
226 Label* is_not_instance_label);
223 RawSubtypeTestCache* GenerateSubtype1TestCacheLookup( 227 RawSubtypeTestCache* GenerateSubtype1TestCacheLookup(
224 intptr_t node_id, 228 intptr_t node_id,
225 intptr_t token_index, 229 intptr_t token_index,
226 const Class& type_class, 230 const Class& type_class,
227 Label* is_instance_lbl, 231 Label* is_instance_lbl,
228 Label* is_not_instance_lbl); 232 Label* is_not_instance_lbl);
229 233
230 void HandleBackwardBranch(intptr_t loop_id, intptr_t token_index); 234 void HandleBackwardBranch(intptr_t loop_id, intptr_t token_index);
231 235
232 void ErrorMsg(intptr_t token_index, const char* format, ...); 236 void ErrorMsg(intptr_t token_index, const char* format, ...);
(...skipping 19 matching lines...) Expand all
252 // The runtime context level is only incremented when a new context is 256 // The runtime context level is only incremented when a new context is
253 // allocated and chained to the list of contexts. 257 // allocated and chained to the list of contexts.
254 intptr_t context_level_; 258 intptr_t context_level_;
255 259
256 DISALLOW_IMPLICIT_CONSTRUCTORS(CodeGenerator); 260 DISALLOW_IMPLICIT_CONSTRUCTORS(CodeGenerator);
257 }; 261 };
258 262
259 } // namespace dart 263 } // namespace dart
260 264
261 #endif // VM_CODE_GENERATOR_IA32_H_ 265 #endif // VM_CODE_GENERATOR_IA32_H_
OLDNEW
« no previous file with comments | « runtime/vm/code_generator.cc ('k') | runtime/vm/code_generator_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698