| 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_BUILDER_H_ | 5 #ifndef RUNTIME_VM_FLOW_GRAPH_BUILDER_H_ |
| 6 #define RUNTIME_VM_FLOW_GRAPH_BUILDER_H_ | 6 #define RUNTIME_VM_FLOW_GRAPH_BUILDER_H_ |
| 7 | 7 |
| 8 #include "platform/assert.h" | 8 #include "platform/assert.h" |
| 9 #include "platform/globals.h" | 9 #include "platform/globals.h" |
| 10 #include "vm/allocation.h" | 10 #include "vm/allocation.h" |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 const Function& function() const { return parsed_function_.function(); } | 107 const Function& function() const { return parsed_function_.function(); } |
| 108 const ZoneGrowableArray<const ICData*>& ic_data_array() const { | 108 const ZoneGrowableArray<const ICData*>& ic_data_array() const { |
| 109 return ic_data_array_; | 109 return ic_data_array_; |
| 110 } | 110 } |
| 111 | 111 |
| 112 void Bailout(const char* reason) const; | 112 void Bailout(const char* reason) const; |
| 113 | 113 |
| 114 intptr_t AllocateBlockId() { return ++last_used_block_id_; } | 114 intptr_t AllocateBlockId() { return ++last_used_block_id_; } |
| 115 void SetInitialBlockId(intptr_t id) { last_used_block_id_ = id; } | 115 void SetInitialBlockId(intptr_t id) { last_used_block_id_ = id; } |
| 116 | 116 |
| 117 intptr_t GetNextDeoptId() { |
| 118 // TODO(rmacnak): Record current scope / context level. |
| 119 return thread()->GetNextDeoptId(); |
| 120 } |
| 121 |
| 117 intptr_t context_level() const; | 122 intptr_t context_level() const; |
| 118 | 123 |
| 119 void IncrementLoopDepth() { ++loop_depth_; } | 124 void IncrementLoopDepth() { ++loop_depth_; } |
| 120 void DecrementLoopDepth() { --loop_depth_; } | 125 void DecrementLoopDepth() { --loop_depth_; } |
| 121 intptr_t loop_depth() const { return loop_depth_; } | 126 intptr_t loop_depth() const { return loop_depth_; } |
| 122 | 127 |
| 123 // Manage the currently active try index. | 128 // Manage the currently active try index. |
| 124 void set_try_index(intptr_t value) { try_index_ = value; } | 129 void set_try_index(intptr_t value) { try_index_ = value; } |
| 125 intptr_t try_index() const { return try_index_; } | 130 intptr_t try_index() const { return try_index_; } |
| 126 | 131 |
| (...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 566 // Output parameters. | 571 // Output parameters. |
| 567 GrowableArray<TargetEntryInstr**> true_successor_addresses_; | 572 GrowableArray<TargetEntryInstr**> true_successor_addresses_; |
| 568 GrowableArray<TargetEntryInstr**> false_successor_addresses_; | 573 GrowableArray<TargetEntryInstr**> false_successor_addresses_; |
| 569 | 574 |
| 570 TokenPosition condition_token_pos_; | 575 TokenPosition condition_token_pos_; |
| 571 }; | 576 }; |
| 572 | 577 |
| 573 } // namespace dart | 578 } // namespace dart |
| 574 | 579 |
| 575 #endif // RUNTIME_VM_FLOW_GRAPH_BUILDER_H_ | 580 #endif // RUNTIME_VM_FLOW_GRAPH_BUILDER_H_ |
| OLD | NEW |