| 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/assembler_macros.h" | 10 #include "vm/assembler_macros.h" |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 FlowGraphCompiler* compiler_; | 54 FlowGraphCompiler* compiler_; |
| 55 | 55 |
| 56 // List of moves not yet resolved. | 56 // List of moves not yet resolved. |
| 57 GrowableArray<MoveOperands*> moves_; | 57 GrowableArray<MoveOperands*> moves_; |
| 58 }; | 58 }; |
| 59 | 59 |
| 60 | 60 |
| 61 class DeoptimizationStub : public ZoneAllocated { | 61 class DeoptimizationStub : public ZoneAllocated { |
| 62 public: | 62 public: |
| 63 DeoptimizationStub(intptr_t deopt_id, | 63 DeoptimizationStub(intptr_t deopt_id, |
| 64 intptr_t try_index, | |
| 65 DeoptReasonId reason) | 64 DeoptReasonId reason) |
| 66 : deopt_id_(deopt_id), | 65 : deopt_id_(deopt_id), |
| 67 try_index_(try_index), | |
| 68 reason_(reason), | 66 reason_(reason), |
| 69 deoptimization_env_(NULL), | 67 deoptimization_env_(NULL), |
| 70 entry_label_() {} | 68 entry_label_() {} |
| 71 | 69 |
| 72 Label* entry_label() { return &entry_label_; } | 70 Label* entry_label() { return &entry_label_; } |
| 73 | 71 |
| 74 // Implementation is in architecture specific file. | 72 // Implementation is in architecture specific file. |
| 75 void GenerateCode(FlowGraphCompiler* compiler, intptr_t stub_ix); | 73 void GenerateCode(FlowGraphCompiler* compiler, intptr_t stub_ix); |
| 76 | 74 |
| 77 void set_deoptimization_env(Environment* env) { | 75 void set_deoptimization_env(Environment* env) { |
| 78 deoptimization_env_ = env; | 76 deoptimization_env_ = env; |
| 79 } | 77 } |
| 80 | 78 |
| 81 RawDeoptInfo* CreateDeoptInfo(FlowGraphCompiler* compiler); | 79 RawDeoptInfo* CreateDeoptInfo(FlowGraphCompiler* compiler); |
| 82 | 80 |
| 83 private: | 81 private: |
| 84 const intptr_t deopt_id_; | 82 const intptr_t deopt_id_; |
| 85 const intptr_t try_index_; | |
| 86 const DeoptReasonId reason_; | 83 const DeoptReasonId reason_; |
| 87 const Environment* deoptimization_env_; | 84 const Environment* deoptimization_env_; |
| 88 Label entry_label_; | 85 Label entry_label_; |
| 89 | 86 |
| 90 DISALLOW_COPY_AND_ASSIGN(DeoptimizationStub); | 87 DISALLOW_COPY_AND_ASSIGN(DeoptimizationStub); |
| 91 }; | 88 }; |
| 92 | 89 |
| 93 | 90 |
| 94 class SlowPathCode : public ZoneAllocated { | 91 class SlowPathCode : public ZoneAllocated { |
| 95 public: | 92 public: |
| (...skipping 18 matching lines...) Expand all Loading... |
| 114 #include "vm/flow_graph_compiler_ia32.h" | 111 #include "vm/flow_graph_compiler_ia32.h" |
| 115 #elif defined(TARGET_ARCH_X64) | 112 #elif defined(TARGET_ARCH_X64) |
| 116 #include "vm/flow_graph_compiler_x64.h" | 113 #include "vm/flow_graph_compiler_x64.h" |
| 117 #elif defined(TARGET_ARCH_ARM) | 114 #elif defined(TARGET_ARCH_ARM) |
| 118 #include "vm/flow_graph_compiler_arm.h" | 115 #include "vm/flow_graph_compiler_arm.h" |
| 119 #else | 116 #else |
| 120 #error Unknown architecture. | 117 #error Unknown architecture. |
| 121 #endif | 118 #endif |
| 122 | 119 |
| 123 #endif // VM_FLOW_GRAPH_COMPILER_H_ | 120 #endif // VM_FLOW_GRAPH_COMPILER_H_ |
| OLD | NEW |