| 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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 Environment* deopt_env) | 158 Environment* deopt_env) |
| 159 : CompilerDeoptInfo(deopt_id, reason, deopt_env), entry_label_() { | 159 : CompilerDeoptInfo(deopt_id, reason, deopt_env), entry_label_() { |
| 160 ASSERT(reason != ICData::kDeoptAtCall); | 160 ASSERT(reason != ICData::kDeoptAtCall); |
| 161 } | 161 } |
| 162 | 162 |
| 163 Label* entry_label() { return &entry_label_; } | 163 Label* entry_label() { return &entry_label_; } |
| 164 | 164 |
| 165 // Implementation is in architecture specific file. | 165 // Implementation is in architecture specific file. |
| 166 virtual void GenerateCode(FlowGraphCompiler* compiler, intptr_t stub_ix); | 166 virtual void GenerateCode(FlowGraphCompiler* compiler, intptr_t stub_ix); |
| 167 | 167 |
| 168 const char* Name() const { |
| 169 const char* kFormat = "Deopt stub for id %d, reason: %s"; |
| 170 const intptr_t len = OS::SNPrint(NULL, 0, kFormat, |
| 171 deopt_id(), DeoptReasonToCString(reason())) + 1; |
| 172 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len); |
| 173 OS::SNPrint(chars, len, kFormat, |
| 174 deopt_id(), DeoptReasonToCString(reason())); |
| 175 return chars; |
| 176 } |
| 177 |
| 168 private: | 178 private: |
| 169 Label entry_label_; | 179 Label entry_label_; |
| 170 | 180 |
| 171 DISALLOW_COPY_AND_ASSIGN(CompilerDeoptInfoWithStub); | 181 DISALLOW_COPY_AND_ASSIGN(CompilerDeoptInfoWithStub); |
| 172 }; | 182 }; |
| 173 | 183 |
| 174 | 184 |
| 175 class SlowPathCode : public ZoneAllocated { | 185 class SlowPathCode : public ZoneAllocated { |
| 176 public: | 186 public: |
| 177 SlowPathCode() : entry_label_(), exit_label_() { } | 187 SlowPathCode() : entry_label_(), exit_label_() { } |
| (...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 619 intptr_t lazy_deopt_pc_offset_; | 629 intptr_t lazy_deopt_pc_offset_; |
| 620 | 630 |
| 621 ZoneGrowableArray<const ICData*>* deopt_id_to_ic_data_; | 631 ZoneGrowableArray<const ICData*>* deopt_id_to_ic_data_; |
| 622 | 632 |
| 623 DISALLOW_COPY_AND_ASSIGN(FlowGraphCompiler); | 633 DISALLOW_COPY_AND_ASSIGN(FlowGraphCompiler); |
| 624 }; | 634 }; |
| 625 | 635 |
| 626 } // namespace dart | 636 } // namespace dart |
| 627 | 637 |
| 628 #endif // VM_FLOW_GRAPH_COMPILER_H_ | 638 #endif // VM_FLOW_GRAPH_COMPILER_H_ |
| OLD | NEW |