| 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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 public: | 111 public: |
| 112 CompilerDeoptInfo(intptr_t deopt_id, | 112 CompilerDeoptInfo(intptr_t deopt_id, |
| 113 ICData::DeoptReasonId reason, | 113 ICData::DeoptReasonId reason, |
| 114 Environment* deopt_env) | 114 Environment* deopt_env) |
| 115 : pc_offset_(-1), | 115 : pc_offset_(-1), |
| 116 deopt_id_(deopt_id), | 116 deopt_id_(deopt_id), |
| 117 reason_(reason), | 117 reason_(reason), |
| 118 deopt_env_(deopt_env) { | 118 deopt_env_(deopt_env) { |
| 119 ASSERT(deopt_env != NULL); | 119 ASSERT(deopt_env != NULL); |
| 120 } | 120 } |
| 121 virtual ~CompilerDeoptInfo() { } |
| 121 | 122 |
| 122 RawDeoptInfo* CreateDeoptInfo(FlowGraphCompiler* compiler, | 123 RawDeoptInfo* CreateDeoptInfo(FlowGraphCompiler* compiler, |
| 123 DeoptInfoBuilder* builder, | 124 DeoptInfoBuilder* builder, |
| 124 const Array& deopt_table); | 125 const Array& deopt_table); |
| 125 | 126 |
| 126 | 127 |
| 127 // No code needs to be generated. | 128 // No code needs to be generated. |
| 128 virtual void GenerateCode(FlowGraphCompiler* compiler, intptr_t stub_ix) {} | 129 virtual void GenerateCode(FlowGraphCompiler* compiler, intptr_t stub_ix) {} |
| 129 | 130 |
| 130 intptr_t pc_offset() const { return pc_offset_; } | 131 intptr_t pc_offset() const { return pc_offset_; } |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 private: | 167 private: |
| 167 Label entry_label_; | 168 Label entry_label_; |
| 168 | 169 |
| 169 DISALLOW_COPY_AND_ASSIGN(CompilerDeoptInfoWithStub); | 170 DISALLOW_COPY_AND_ASSIGN(CompilerDeoptInfoWithStub); |
| 170 }; | 171 }; |
| 171 | 172 |
| 172 | 173 |
| 173 class SlowPathCode : public ZoneAllocated { | 174 class SlowPathCode : public ZoneAllocated { |
| 174 public: | 175 public: |
| 175 SlowPathCode() : entry_label_(), exit_label_() { } | 176 SlowPathCode() : entry_label_(), exit_label_() { } |
| 177 virtual ~SlowPathCode() { } |
| 176 | 178 |
| 177 Label* entry_label() { return &entry_label_; } | 179 Label* entry_label() { return &entry_label_; } |
| 178 Label* exit_label() { return &exit_label_; } | 180 Label* exit_label() { return &exit_label_; } |
| 179 | 181 |
| 180 virtual void EmitNativeCode(FlowGraphCompiler* compiler) = 0; | 182 virtual void EmitNativeCode(FlowGraphCompiler* compiler) = 0; |
| 181 | 183 |
| 182 private: | 184 private: |
| 183 Label entry_label_; | 185 Label entry_label_; |
| 184 Label exit_label_; | 186 Label exit_label_; |
| 185 | 187 |
| (...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 597 intptr_t entry_patch_pc_offset_; | 599 intptr_t entry_patch_pc_offset_; |
| 598 intptr_t patch_code_pc_offset_; | 600 intptr_t patch_code_pc_offset_; |
| 599 intptr_t lazy_deopt_pc_offset_; | 601 intptr_t lazy_deopt_pc_offset_; |
| 600 | 602 |
| 601 DISALLOW_COPY_AND_ASSIGN(FlowGraphCompiler); | 603 DISALLOW_COPY_AND_ASSIGN(FlowGraphCompiler); |
| 602 }; | 604 }; |
| 603 | 605 |
| 604 } // namespace dart | 606 } // namespace dart |
| 605 | 607 |
| 606 #endif // VM_FLOW_GRAPH_COMPILER_H_ | 608 #endif // VM_FLOW_GRAPH_COMPILER_H_ |
| OLD | NEW |