OLD | NEW |
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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 | 192 |
193 class SlowPathCode : public ZoneAllocated { | 193 class SlowPathCode : public ZoneAllocated { |
194 public: | 194 public: |
195 SlowPathCode() : entry_label_(), exit_label_() { } | 195 SlowPathCode() : entry_label_(), exit_label_() { } |
196 virtual ~SlowPathCode() { } | 196 virtual ~SlowPathCode() { } |
197 | 197 |
198 Label* entry_label() { return &entry_label_; } | 198 Label* entry_label() { return &entry_label_; } |
199 Label* exit_label() { return &exit_label_; } | 199 Label* exit_label() { return &exit_label_; } |
200 | 200 |
201 void GenerateCode(FlowGraphCompiler* compiler) { | 201 void GenerateCode(FlowGraphCompiler* compiler) { |
202 ASSERT(exit_label_.IsBound()); | |
203 EmitNativeCode(compiler); | 202 EmitNativeCode(compiler); |
204 ASSERT(entry_label_.IsBound()); | 203 ASSERT(entry_label_.IsBound()); |
205 } | 204 } |
206 | 205 |
207 private: | 206 private: |
208 virtual void EmitNativeCode(FlowGraphCompiler* compiler) = 0; | 207 virtual void EmitNativeCode(FlowGraphCompiler* compiler) = 0; |
209 | 208 |
210 Label entry_label_; | 209 Label entry_label_; |
211 Label exit_label_; | 210 Label exit_label_; |
212 | 211 |
(...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
833 const GrowableArray<const Function*>& inline_id_to_function_; | 832 const GrowableArray<const Function*>& inline_id_to_function_; |
834 const GrowableArray<TokenPosition>& inline_id_to_token_pos_; | 833 const GrowableArray<TokenPosition>& inline_id_to_token_pos_; |
835 const GrowableArray<intptr_t>& caller_inline_id_; | 834 const GrowableArray<intptr_t>& caller_inline_id_; |
836 | 835 |
837 DISALLOW_COPY_AND_ASSIGN(FlowGraphCompiler); | 836 DISALLOW_COPY_AND_ASSIGN(FlowGraphCompiler); |
838 }; | 837 }; |
839 | 838 |
840 } // namespace dart | 839 } // namespace dart |
841 | 840 |
842 #endif // VM_FLOW_GRAPH_COMPILER_H_ | 841 #endif // VM_FLOW_GRAPH_COMPILER_H_ |
OLD | NEW |