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

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

Issue 11361225: In optimized code use IC calls for instance calls that have no IC data instead of deoptimizing. The… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 1 month 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/flow_graph_compiler.cc ('k') | runtime/vm/flow_graph_compiler_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_FLOW_GRAPH_COMPILER_IA32_H_ 5 #ifndef VM_FLOW_GRAPH_COMPILER_IA32_H_
6 #define VM_FLOW_GRAPH_COMPILER_IA32_H_ 6 #define VM_FLOW_GRAPH_COMPILER_IA32_H_
7 7
8 #ifndef VM_FLOW_GRAPH_COMPILER_H_ 8 #ifndef VM_FLOW_GRAPH_COMPILER_H_
9 #error Include flow_graph_compiler.h instead of flow_graph_compiler_ia32.h. 9 #error Include flow_graph_compiler.h instead of flow_graph_compiler_ia32.h.
10 #endif 10 #endif
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 Label* is_instance_lbl, 118 Label* is_instance_lbl,
119 Label* is_not_instance_lbl); 119 Label* is_not_instance_lbl);
120 void GenerateStringTypeCheck(Register kClassIdReg, 120 void GenerateStringTypeCheck(Register kClassIdReg,
121 Label* is_instance_lbl, 121 Label* is_instance_lbl,
122 Label* is_not_instance_lbl); 122 Label* is_not_instance_lbl);
123 void GenerateListTypeCheck(Register kClassIdReg, 123 void GenerateListTypeCheck(Register kClassIdReg,
124 Label* is_instance_lbl); 124 Label* is_instance_lbl);
125 125
126 void EmitComment(Instruction* instr); 126 void EmitComment(Instruction* instr);
127 127
128 void EmitOptimizedInstanceCall(ExternalLabel* target_label,
129 const ICData& ic_data,
130 const Array& arguments_descriptor,
131 intptr_t argument_count,
132 intptr_t deopt_id,
133 intptr_t token_pos,
134 LocationSummary* locs);
135
128 void EmitInstanceCall(ExternalLabel* target_label, 136 void EmitInstanceCall(ExternalLabel* target_label,
129 const ICData& ic_data, 137 const ICData& ic_data,
130 const Array& arguments_descriptor, 138 const Array& arguments_descriptor,
131 intptr_t argument_count, 139 intptr_t argument_count,
132 intptr_t deopt_id, 140 intptr_t deopt_id,
133 intptr_t token_pos, 141 intptr_t token_pos,
134 LocationSummary* locs); 142 LocationSummary* locs);
135 143
136 void EmitTestAndCall(const ICData& ic_data, 144 void EmitTestAndCall(const ICData& ic_data,
137 Register class_id_reg, 145 Register class_id_reg,
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 // Returns true if the compiled function has a finally clause. 203 // Returns true if the compiled function has a finally clause.
196 bool HasFinally() const; 204 bool HasFinally() const;
197 205
198 intptr_t CurrentTryIndex() const { 206 intptr_t CurrentTryIndex() const {
199 if (current_block_ == NULL) { 207 if (current_block_ == NULL) {
200 return CatchClauseNode::kInvalidTryIndex; 208 return CatchClauseNode::kInvalidTryIndex;
201 } 209 }
202 return current_block_->try_index(); 210 return current_block_->try_index();
203 } 211 }
204 212
213 bool may_reoptimize() const { return may_reoptimize_; }
214
205 static const int kLocalsOffsetFromFP = (-1 * kWordSize); 215 static const int kLocalsOffsetFromFP = (-1 * kWordSize);
206 216
207 static Condition FlipCondition(Condition condition); 217 static Condition FlipCondition(Condition condition);
208 218
209 static bool EvaluateCondition(Condition condition, intptr_t l, intptr_t r); 219 static bool EvaluateCondition(Condition condition, intptr_t l, intptr_t r);
210 220
211 // Array/list element address computations. 221 // Array/list element address computations.
212 static FieldAddress ElementAddressForIntIndex(intptr_t cid, 222 static FieldAddress ElementAddressForIntIndex(intptr_t cid,
213 Register array, 223 Register array,
214 intptr_t offset); 224 intptr_t offset);
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 // for convenience. This is not the block's index in the block order, 314 // for convenience. This is not the block's index in the block order,
305 // which is reverse postorder. 315 // which is reverse postorder.
306 BlockEntryInstr* current_block_; 316 BlockEntryInstr* current_block_;
307 ExceptionHandlerList* exception_handlers_list_; 317 ExceptionHandlerList* exception_handlers_list_;
308 DescriptorList* pc_descriptors_list_; 318 DescriptorList* pc_descriptors_list_;
309 StackmapTableBuilder* stackmap_table_builder_; 319 StackmapTableBuilder* stackmap_table_builder_;
310 GrowableArray<BlockInfo*> block_info_; 320 GrowableArray<BlockInfo*> block_info_;
311 GrowableArray<CompilerDeoptInfo*> deopt_infos_; 321 GrowableArray<CompilerDeoptInfo*> deopt_infos_;
312 GrowableArray<SlowPathCode*> slow_path_code_; 322 GrowableArray<SlowPathCode*> slow_path_code_;
313 const bool is_optimizing_; 323 const bool is_optimizing_;
324 // Set to true if optimized code has IC calls.
325 bool may_reoptimize_;
314 326
315 const Bool& bool_true_; 327 const Bool& bool_true_;
316 const Bool& bool_false_; 328 const Bool& bool_false_;
317 const Class& double_class_; 329 const Class& double_class_;
318 330
319 ParallelMoveResolver parallel_move_resolver_; 331 ParallelMoveResolver parallel_move_resolver_;
320 332
321 // Currently instructions generate deopt stubs internally by 333 // Currently instructions generate deopt stubs internally by
322 // calling AddDeoptStub. To communicate deoptimization environment 334 // calling AddDeoptStub. To communicate deoptimization environment
323 // that should be used when deoptimizing we store it in this variable. 335 // that should be used when deoptimizing we store it in this variable.
324 // In future AddDeoptStub should be moved out of the instruction template. 336 // In future AddDeoptStub should be moved out of the instruction template.
325 Environment* pending_deoptimization_env_; 337 Environment* pending_deoptimization_env_;
326 338
327 DISALLOW_COPY_AND_ASSIGN(FlowGraphCompiler); 339 DISALLOW_COPY_AND_ASSIGN(FlowGraphCompiler);
328 }; 340 };
329 341
330 } // namespace dart 342 } // namespace dart
331 343
332 #endif // VM_FLOW_GRAPH_COMPILER_IA32_H_ 344 #endif // VM_FLOW_GRAPH_COMPILER_IA32_H_
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler.cc ('k') | runtime/vm/flow_graph_compiler_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698