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 RUNTIME_VM_FLOW_GRAPH_COMPILER_H_ | 5 #ifndef RUNTIME_VM_FLOW_GRAPH_COMPILER_H_ |
6 #define RUNTIME_VM_FLOW_GRAPH_COMPILER_H_ | 6 #define RUNTIME_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 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 | 300 |
301 // Accessors. | 301 // Accessors. |
302 Assembler* assembler() const { return assembler_; } | 302 Assembler* assembler() const { return assembler_; } |
303 const ParsedFunction& parsed_function() const { return parsed_function_; } | 303 const ParsedFunction& parsed_function() const { return parsed_function_; } |
304 const GrowableArray<BlockEntryInstr*>& block_order() const { | 304 const GrowableArray<BlockEntryInstr*>& block_order() const { |
305 return block_order_; | 305 return block_order_; |
306 } | 306 } |
307 | 307 |
308 const FlowGraph& flow_graph() const { return flow_graph_; } | 308 const FlowGraph& flow_graph() const { return flow_graph_; } |
309 | 309 |
310 DescriptorList* pc_descriptors_list() const { return pc_descriptors_list_; } | |
311 BlockEntryInstr* current_block() const { return current_block_; } | 310 BlockEntryInstr* current_block() const { return current_block_; } |
312 void set_current_block(BlockEntryInstr* value) { current_block_ = value; } | 311 void set_current_block(BlockEntryInstr* value) { current_block_ = value; } |
313 static bool CanOptimize(); | 312 static bool CanOptimize(); |
314 bool CanOptimizeFunction() const; | 313 bool CanOptimizeFunction() const; |
315 bool CanOSRFunction() const; | 314 bool CanOSRFunction() const; |
316 bool is_optimizing() const { return is_optimizing_; } | 315 bool is_optimizing() const { return is_optimizing_; } |
317 | 316 |
318 void EnterIntrinsicMode(); | 317 void EnterIntrinsicMode(); |
319 void ExitIntrinsicMode(); | 318 void ExitIntrinsicMode(); |
320 bool intrinsic_mode() const { return intrinsic_mode_; } | 319 bool intrinsic_mode() const { return intrinsic_mode_; } |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
491 | 490 |
492 void AddExceptionHandler(intptr_t try_index, | 491 void AddExceptionHandler(intptr_t try_index, |
493 intptr_t outer_try_index, | 492 intptr_t outer_try_index, |
494 intptr_t pc_offset, | 493 intptr_t pc_offset, |
495 const Array& handler_types, | 494 const Array& handler_types, |
496 bool needs_stacktrace); | 495 bool needs_stacktrace); |
497 void SetNeedsStackTrace(intptr_t try_index); | 496 void SetNeedsStackTrace(intptr_t try_index); |
498 void AddCurrentDescriptor(RawPcDescriptors::Kind kind, | 497 void AddCurrentDescriptor(RawPcDescriptors::Kind kind, |
499 intptr_t deopt_id, | 498 intptr_t deopt_id, |
500 TokenPosition token_pos); | 499 TokenPosition token_pos); |
| 500 void AddDescriptor(RawPcDescriptors::Kind kind, |
| 501 intptr_t pc_offset, |
| 502 intptr_t deopt_id, |
| 503 TokenPosition token_pos, |
| 504 intptr_t try_index); |
501 | 505 |
502 void RecordSafepoint(LocationSummary* locs, | 506 void RecordSafepoint(LocationSummary* locs, |
503 intptr_t slow_path_argument_count = 0); | 507 intptr_t slow_path_argument_count = 0); |
504 | 508 |
505 Label* AddDeoptStub(intptr_t deopt_id, | 509 Label* AddDeoptStub(intptr_t deopt_id, |
506 ICData::DeoptReasonId reason, | 510 ICData::DeoptReasonId reason, |
507 uint32_t flags = 0); | 511 uint32_t flags = 0); |
508 | 512 |
509 #if defined(TARGET_ARCH_DBC) | 513 #if defined(TARGET_ARCH_DBC) |
510 void EmitDeopt(intptr_t deopt_id, | 514 void EmitDeopt(intptr_t deopt_id, |
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
794 ZoneGrowableArray<const ICData*>* deopt_id_to_ic_data_; | 798 ZoneGrowableArray<const ICData*>* deopt_id_to_ic_data_; |
795 | 799 |
796 Array& edge_counters_array_; | 800 Array& edge_counters_array_; |
797 | 801 |
798 DISALLOW_COPY_AND_ASSIGN(FlowGraphCompiler); | 802 DISALLOW_COPY_AND_ASSIGN(FlowGraphCompiler); |
799 }; | 803 }; |
800 | 804 |
801 } // namespace dart | 805 } // namespace dart |
802 | 806 |
803 #endif // RUNTIME_VM_FLOW_GRAPH_COMPILER_H_ | 807 #endif // RUNTIME_VM_FLOW_GRAPH_COMPILER_H_ |
OLD | NEW |