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

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

Issue 2376893003: Emit switchable instance calls when we don't know the complete set of receiver classes for a call s… (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « no previous file | runtime/vm/flow_graph_compiler.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_H_ 5 #ifndef VM_FLOW_GRAPH_COMPILER_H_
6 #define VM_FLOW_GRAPH_COMPILER_H_ 6 #define VM_FLOW_GRAPH_COMPILER_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 #include "vm/assembler.h" 9 #include "vm/assembler.h"
10 #include "vm/code_descriptors.h" 10 #include "vm/code_descriptors.h"
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 private: 206 private:
207 virtual void EmitNativeCode(FlowGraphCompiler* compiler) = 0; 207 virtual void EmitNativeCode(FlowGraphCompiler* compiler) = 0;
208 208
209 Label entry_label_; 209 Label entry_label_;
210 Label exit_label_; 210 Label exit_label_;
211 211
212 DISALLOW_COPY_AND_ASSIGN(SlowPathCode); 212 DISALLOW_COPY_AND_ASSIGN(SlowPathCode);
213 }; 213 };
214 214
215 215
216 class MegamorphicSlowPath : public SlowPathCode {
217 public:
218 MegamorphicSlowPath(const ICData& ic_data,
219 intptr_t argument_count,
220 intptr_t deopt_id,
221 TokenPosition token_pos,
222 LocationSummary* locs,
223 intptr_t try_index)
224 : SlowPathCode(),
225 ic_data_(ic_data),
226 argument_count_(argument_count),
227 deopt_id_(deopt_id),
228 token_pos_(token_pos),
229 locs_(locs),
230 try_index_(try_index) {}
231 virtual ~MegamorphicSlowPath() {}
232
233 private:
234 virtual void EmitNativeCode(FlowGraphCompiler* comp);
235
236 const ICData& ic_data_;
237 intptr_t argument_count_;
238 intptr_t deopt_id_;
239 TokenPosition token_pos_;
240 LocationSummary* locs_;
241 const intptr_t try_index_; // For try/catch ranges.
242
243 DISALLOW_COPY_AND_ASSIGN(MegamorphicSlowPath);
244 };
245
246
247 struct CidTarget { 216 struct CidTarget {
248 intptr_t cid; 217 intptr_t cid;
249 Function* target; 218 Function* target;
250 intptr_t count; 219 intptr_t count;
251 CidTarget(intptr_t cid_arg, 220 CidTarget(intptr_t cid_arg,
252 Function* target_arg, 221 Function* target_arg,
253 intptr_t count_arg) 222 intptr_t count_arg)
254 : cid(cid_arg), target(target_arg), count(count_arg) {} 223 : cid(cid_arg), target(target_arg), count(count_arg) {}
255 }; 224 };
256 225
(...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after
829 const GrowableArray<const Function*>& inline_id_to_function_; 798 const GrowableArray<const Function*>& inline_id_to_function_;
830 const GrowableArray<TokenPosition>& inline_id_to_token_pos_; 799 const GrowableArray<TokenPosition>& inline_id_to_token_pos_;
831 const GrowableArray<intptr_t>& caller_inline_id_; 800 const GrowableArray<intptr_t>& caller_inline_id_;
832 801
833 DISALLOW_COPY_AND_ASSIGN(FlowGraphCompiler); 802 DISALLOW_COPY_AND_ASSIGN(FlowGraphCompiler);
834 }; 803 };
835 804
836 } // namespace dart 805 } // namespace dart
837 806
838 #endif // VM_FLOW_GRAPH_COMPILER_H_ 807 #endif // VM_FLOW_GRAPH_COMPILER_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/flow_graph_compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698