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

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

Issue 10453098: Move Throw and ReThrow to the location based code generation. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Move Branch as well, introduce base class for instruction with inputs Created 8 years, 6 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
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_X64_H_ 5 #ifndef VM_FLOW_GRAPH_COMPILER_X64_H_
6 #define VM_FLOW_GRAPH_COMPILER_X64_H_ 6 #define VM_FLOW_GRAPH_COMPILER_X64_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_x64.h. 9 #error Include flow_graph_compiler.h instead of flow_graph_compiler_x64.h.
10 #endif 10 #endif
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 Assembler* assembler() const { return assembler_; } 44 Assembler* assembler() const { return assembler_; }
45 45
46 Label* AddDeoptStub(intptr_t deopt_id, 46 Label* AddDeoptStub(intptr_t deopt_id,
47 intptr_t deopt_token_index, 47 intptr_t deopt_token_index,
48 intptr_t try_index_, 48 intptr_t try_index_,
49 DeoptReasonId reason, 49 DeoptReasonId reason,
50 Register reg1, 50 Register reg1,
51 Register reg2); 51 Register reg2);
52 52
53
54 void GenerateCallRuntime(intptr_t cid,
55 intptr_t token_index,
56 intptr_t try_index,
57 const RuntimeEntry& entry);
58
59 // Returns true if the next block after current in the current block order
60 // is the given block.
61 bool IsNextBlock(TargetEntryInstr* block_entry) const {
62 intptr_t current_index = reverse_index(current_block()->postorder_number());
63 return block_order_[current_index + 1] == block_entry;
64 }
srdjan 2012/05/31 16:00:53 I think we can move both of these implementations
65
66 // Returns assembler label associated with the given block entry.
67 Label* GetBlockLabel(TargetEntryInstr* block_entry) const {
68 intptr_t block_index = block_entry->postorder_number();
69 return &block_info_[block_index]->label;
70 }
71
53 private: 72 private:
54 friend class DeoptimizationStub; 73 friend class DeoptimizationStub;
55 74
56 // TODO(fschneider): Clean up friend-class declarations once all code 75 // TODO(fschneider): Clean up friend-class declarations once all code
57 // generator templates have been moved to intermediate_language_x64.cc. 76 // generator templates have been moved to intermediate_language_x64.cc.
58 #define DECLARE_FRIEND(ShortName, ClassName) friend class ClassName; 77 #define DECLARE_FRIEND(ShortName, ClassName) friend class ClassName;
59 FOR_EACH_COMPUTATION(DECLARE_FRIEND) 78 FOR_EACH_COMPUTATION(DECLARE_FRIEND)
60 #undef DECLARE_FRIEND 79 #undef DECLARE_FRIEND
61 80
62 static const int kLocalsOffsetFromFP = (-1 * kWordSize); 81 static const int kLocalsOffsetFromFP = (-1 * kWordSize);
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 intptr_t try_index, 135 intptr_t try_index,
117 const Function& function, 136 const Function& function,
118 intptr_t argument_count, 137 intptr_t argument_count,
119 const Array& argument_names); 138 const Array& argument_names);
120 139
121 // Infrastructure copied from class CodeGenerator. 140 // Infrastructure copied from class CodeGenerator.
122 void GenerateCall(intptr_t token_index, 141 void GenerateCall(intptr_t token_index,
123 intptr_t try_index, 142 intptr_t try_index,
124 const ExternalLabel* label, 143 const ExternalLabel* label,
125 PcDescriptors::Kind kind); 144 PcDescriptors::Kind kind);
126 void GenerateCallRuntime(intptr_t cid,
127 intptr_t token_index,
128 intptr_t try_index,
129 const RuntimeEntry& entry);
130 void AddCurrentDescriptor(PcDescriptors::Kind kind, 145 void AddCurrentDescriptor(PcDescriptors::Kind kind,
131 intptr_t cid, 146 intptr_t cid,
132 intptr_t token_index, 147 intptr_t token_index,
133 intptr_t try_index); 148 intptr_t try_index);
134 149
135 // Type checking helper methods. 150 // Type checking helper methods.
136 void CheckClasses(const GrowableArray<const Class*>& classes, 151 void CheckClasses(const GrowableArray<const Class*>& classes,
137 Label* is_instance_lbl, 152 Label* is_instance_lbl,
138 Label* is_not_instance_lbl); 153 Label* is_not_instance_lbl);
139 RawSubtypeTestCache* GenerateInlineInstanceof(intptr_t cid, 154 RawSubtypeTestCache* GenerateInlineInstanceof(intptr_t cid,
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 ExceptionHandlerList* exception_handlers_list_; 219 ExceptionHandlerList* exception_handlers_list_;
205 GrowableArray<DeoptimizationStub*> deopt_stubs_; 220 GrowableArray<DeoptimizationStub*> deopt_stubs_;
206 const bool is_optimizing_; 221 const bool is_optimizing_;
207 222
208 DISALLOW_COPY_AND_ASSIGN(FlowGraphCompiler); 223 DISALLOW_COPY_AND_ASSIGN(FlowGraphCompiler);
209 }; 224 };
210 225
211 } // namespace dart 226 } // namespace dart
212 227
213 #endif // VM_FLOW_GRAPH_COMPILER_X64_H_ 228 #endif // VM_FLOW_GRAPH_COMPILER_X64_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/flow_graph_compiler_x64.cc » ('j') | runtime/vm/intermediate_language.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698