Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 118 void SetJoinId(int id); | 118 void SetJoinId(int id); |
| 119 | 119 |
| 120 void Finish(HControlInstruction* last); | 120 void Finish(HControlInstruction* last); |
| 121 void FinishExit(HControlInstruction* instruction); | 121 void FinishExit(HControlInstruction* instruction); |
| 122 void Goto(HBasicBlock* block, bool include_stack_check = false); | 122 void Goto(HBasicBlock* block, bool include_stack_check = false); |
| 123 | 123 |
| 124 int PredecessorIndexOf(HBasicBlock* predecessor) const; | 124 int PredecessorIndexOf(HBasicBlock* predecessor) const; |
| 125 void AddSimulate(int id) { AddInstruction(CreateSimulate(id)); } | 125 void AddSimulate(int id) { AddInstruction(CreateSimulate(id)); } |
| 126 void AssignCommonDominator(HBasicBlock* other); | 126 void AssignCommonDominator(HBasicBlock* other); |
| 127 | 127 |
| 128 void FinishExitWithDeoptimization() { | 128 void FinishExitWithDeoptimization(bool use_environment) { |
|
Vyacheslav Egorov (Chromium)
2011/05/12 14:32:59
Can you use enum instead of boolean?
| |
| 129 FinishExit(CreateDeoptimize()); | 129 FinishExit(CreateDeoptimize(use_environment)); |
| 130 } | 130 } |
| 131 | 131 |
| 132 // Add the inlined function exit sequence, adding an HLeaveInlined | 132 // Add the inlined function exit sequence, adding an HLeaveInlined |
| 133 // instruction and updating the bailout environment. | 133 // instruction and updating the bailout environment. |
| 134 void AddLeaveInlined(HValue* return_value, HBasicBlock* target); | 134 void AddLeaveInlined(HValue* return_value, HBasicBlock* target); |
| 135 | 135 |
| 136 // If a target block is tagged as an inline function return, all | 136 // If a target block is tagged as an inline function return, all |
| 137 // predecessors should contain the inlined exit sequence: | 137 // predecessors should contain the inlined exit sequence: |
| 138 // | 138 // |
| 139 // LeaveInlined | 139 // LeaveInlined |
| 140 // Simulate (caller's environment) | 140 // Simulate (caller's environment) |
| 141 // Goto (target block) | 141 // Goto (target block) |
| 142 bool IsInlineReturnTarget() const { return is_inline_return_target_; } | 142 bool IsInlineReturnTarget() const { return is_inline_return_target_; } |
| 143 void MarkAsInlineReturnTarget() { is_inline_return_target_ = true; } | 143 void MarkAsInlineReturnTarget() { is_inline_return_target_ = true; } |
| 144 | 144 |
| 145 inline Zone* zone(); | 145 inline Zone* zone(); |
| 146 | 146 |
| 147 #ifdef DEBUG | 147 #ifdef DEBUG |
| 148 void Verify(); | 148 void Verify(); |
| 149 #endif | 149 #endif |
| 150 | 150 |
| 151 private: | 151 private: |
| 152 void RegisterPredecessor(HBasicBlock* pred); | 152 void RegisterPredecessor(HBasicBlock* pred); |
| 153 void AddDominatedBlock(HBasicBlock* block); | 153 void AddDominatedBlock(HBasicBlock* block); |
| 154 | 154 |
| 155 HSimulate* CreateSimulate(int id); | 155 HSimulate* CreateSimulate(int id); |
| 156 HDeoptimize* CreateDeoptimize(); | 156 HDeoptimize* CreateDeoptimize(bool use_environment); |
| 157 | 157 |
| 158 int block_id_; | 158 int block_id_; |
| 159 HGraph* graph_; | 159 HGraph* graph_; |
| 160 ZoneList<HPhi*> phis_; | 160 ZoneList<HPhi*> phis_; |
| 161 HInstruction* first_; | 161 HInstruction* first_; |
| 162 HInstruction* last_; | 162 HInstruction* last_; |
| 163 HControlInstruction* end_; | 163 HControlInstruction* end_; |
| 164 HLoopInformation* loop_information_; | 164 HLoopInformation* loop_information_; |
| 165 ZoneList<HBasicBlock*> predecessors_; | 165 ZoneList<HBasicBlock*> predecessors_; |
| 166 HBasicBlock* dominator_; | 166 HBasicBlock* dominator_; |
| (...skipping 1026 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1193 const char* filename_; | 1193 const char* filename_; |
| 1194 HeapStringAllocator string_allocator_; | 1194 HeapStringAllocator string_allocator_; |
| 1195 StringStream trace_; | 1195 StringStream trace_; |
| 1196 int indent_; | 1196 int indent_; |
| 1197 }; | 1197 }; |
| 1198 | 1198 |
| 1199 | 1199 |
| 1200 } } // namespace v8::internal | 1200 } } // namespace v8::internal |
| 1201 | 1201 |
| 1202 #endif // V8_HYDROGEN_H_ | 1202 #endif // V8_HYDROGEN_H_ |
| OLD | NEW |