| 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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 public: | 109 public: |
| 110 CompilerDeoptInfo(intptr_t deopt_id, DeoptReasonId reason) | 110 CompilerDeoptInfo(intptr_t deopt_id, DeoptReasonId reason) |
| 111 : pc_offset_(-1), | 111 : pc_offset_(-1), |
| 112 deopt_id_(deopt_id), | 112 deopt_id_(deopt_id), |
| 113 reason_(reason), | 113 reason_(reason), |
| 114 deoptimization_env_(NULL) {} | 114 deoptimization_env_(NULL) {} |
| 115 | 115 |
| 116 RawDeoptInfo* CreateDeoptInfo(FlowGraphCompiler* compiler, | 116 RawDeoptInfo* CreateDeoptInfo(FlowGraphCompiler* compiler, |
| 117 DeoptInfoBuilder* builder); | 117 DeoptInfoBuilder* builder); |
| 118 | 118 |
| 119 void AllocateIncomingParametersRecursive(Environment* env, | |
| 120 intptr_t* stack_height); | |
| 121 | 119 |
| 122 // No code needs to be generated. | 120 // No code needs to be generated. |
| 123 virtual void GenerateCode(FlowGraphCompiler* compiler, intptr_t stub_ix) {} | 121 virtual void GenerateCode(FlowGraphCompiler* compiler, intptr_t stub_ix) {} |
| 124 | 122 |
| 125 intptr_t pc_offset() const { return pc_offset_; } | 123 intptr_t pc_offset() const { return pc_offset_; } |
| 126 void set_pc_offset(intptr_t offset) { pc_offset_ = offset; } | 124 void set_pc_offset(intptr_t offset) { pc_offset_ = offset; } |
| 127 | 125 |
| 128 intptr_t deopt_id() const { return deopt_id_; } | 126 intptr_t deopt_id() const { return deopt_id_; } |
| 129 | 127 |
| 130 DeoptReasonId reason() const { return reason_; } | 128 DeoptReasonId reason() const { return reason_; } |
| 131 | 129 |
| 132 const Environment* deoptimization_env() const { return deoptimization_env_; } | 130 const Environment* deoptimization_env() const { return deoptimization_env_; } |
| 133 void set_deoptimization_env(Environment* env) { deoptimization_env_ = env; } | 131 void set_deoptimization_env(Environment* env) { deoptimization_env_ = env; } |
| 134 | 132 |
| 135 private: | 133 private: |
| 134 void EmitMaterializations(Environment* env, DeoptInfoBuilder* builder); |
| 135 |
| 136 void AllocateIncomingParametersRecursive(Environment* env, |
| 137 intptr_t* stack_height); |
| 138 |
| 136 intptr_t pc_offset_; | 139 intptr_t pc_offset_; |
| 137 const intptr_t deopt_id_; | 140 const intptr_t deopt_id_; |
| 138 const DeoptReasonId reason_; | 141 const DeoptReasonId reason_; |
| 139 Environment* deoptimization_env_; | 142 Environment* deoptimization_env_; |
| 140 | 143 |
| 141 DISALLOW_COPY_AND_ASSIGN(CompilerDeoptInfo); | 144 DISALLOW_COPY_AND_ASSIGN(CompilerDeoptInfo); |
| 142 }; | 145 }; |
| 143 | 146 |
| 144 | 147 |
| 145 class CompilerDeoptInfoWithStub : public CompilerDeoptInfo { | 148 class CompilerDeoptInfoWithStub : public CompilerDeoptInfo { |
| (...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 580 // that should be used when deoptimizing we store it in this variable. | 583 // that should be used when deoptimizing we store it in this variable. |
| 581 // In future AddDeoptStub should be moved out of the instruction template. | 584 // In future AddDeoptStub should be moved out of the instruction template. |
| 582 Environment* pending_deoptimization_env_; | 585 Environment* pending_deoptimization_env_; |
| 583 | 586 |
| 584 DISALLOW_COPY_AND_ASSIGN(FlowGraphCompiler); | 587 DISALLOW_COPY_AND_ASSIGN(FlowGraphCompiler); |
| 585 }; | 588 }; |
| 586 | 589 |
| 587 } // namespace dart | 590 } // namespace dart |
| 588 | 591 |
| 589 #endif // VM_FLOW_GRAPH_COMPILER_H_ | 592 #endif // VM_FLOW_GRAPH_COMPILER_H_ |
| OLD | NEW |