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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 117 void SetJoinId(int id); | 117 void SetJoinId(int id); |
| 118 | 118 |
| 119 void Finish(HControlInstruction* last); | 119 void Finish(HControlInstruction* last); |
| 120 void FinishExit(HControlInstruction* instruction); | 120 void FinishExit(HControlInstruction* instruction); |
| 121 void Goto(HBasicBlock* block, bool include_stack_check = false); | 121 void Goto(HBasicBlock* block, bool include_stack_check = false); |
| 122 | 122 |
| 123 int PredecessorIndexOf(HBasicBlock* predecessor) const; | 123 int PredecessorIndexOf(HBasicBlock* predecessor) const; |
| 124 void AddSimulate(int id) { AddInstruction(CreateSimulate(id)); } | 124 void AddSimulate(int id) { AddInstruction(CreateSimulate(id)); } |
| 125 void AssignCommonDominator(HBasicBlock* other); | 125 void AssignCommonDominator(HBasicBlock* other); |
| 126 | 126 |
| 127 void FinishWithDeoptimization() { | |
| 128 Finish(CreateDeoptimize()); | |
|
Kevin Millikin (Chromium)
2011/03/17 05:31:02
I'd rather not have these helpers. It doesn't sav
| |
| 129 } | |
| 130 | |
| 131 void FinishExitWithDeoptimization() { | |
|
Kevin Millikin (Chromium)
2011/03/17 05:31:02
There's no reason to have both "Finish" and "Finis
| |
| 132 FinishExit(CreateDeoptimize()); | |
| 133 } | |
| 134 | |
| 127 // Add the inlined function exit sequence, adding an HLeaveInlined | 135 // Add the inlined function exit sequence, adding an HLeaveInlined |
| 128 // instruction and updating the bailout environment. | 136 // instruction and updating the bailout environment. |
| 129 void AddLeaveInlined(HValue* return_value, HBasicBlock* target); | 137 void AddLeaveInlined(HValue* return_value, HBasicBlock* target); |
| 130 | 138 |
| 131 // If a target block is tagged as an inline function return, all | 139 // If a target block is tagged as an inline function return, all |
| 132 // predecessors should contain the inlined exit sequence: | 140 // predecessors should contain the inlined exit sequence: |
| 133 // | 141 // |
| 134 // LeaveInlined | 142 // LeaveInlined |
| 135 // Simulate (caller's environment) | 143 // Simulate (caller's environment) |
| 136 // Goto (target block) | 144 // Goto (target block) |
| 137 bool IsInlineReturnTarget() const { return is_inline_return_target_; } | 145 bool IsInlineReturnTarget() const { return is_inline_return_target_; } |
| 138 void MarkAsInlineReturnTarget() { is_inline_return_target_ = true; } | 146 void MarkAsInlineReturnTarget() { is_inline_return_target_ = true; } |
| 139 | 147 |
| 140 #ifdef DEBUG | 148 #ifdef DEBUG |
| 141 void Verify(); | 149 void Verify(); |
| 142 #endif | 150 #endif |
| 143 | 151 |
| 144 private: | 152 private: |
| 145 void RegisterPredecessor(HBasicBlock* pred); | 153 void RegisterPredecessor(HBasicBlock* pred); |
| 146 void AddDominatedBlock(HBasicBlock* block); | 154 void AddDominatedBlock(HBasicBlock* block); |
| 147 | 155 |
| 148 HSimulate* CreateSimulate(int id); | 156 HSimulate* CreateSimulate(int id); |
| 157 HDeoptimize* CreateDeoptimize(); | |
| 149 | 158 |
| 150 int block_id_; | 159 int block_id_; |
| 151 HGraph* graph_; | 160 HGraph* graph_; |
| 152 ZoneList<HPhi*> phis_; | 161 ZoneList<HPhi*> phis_; |
| 153 HInstruction* first_; | 162 HInstruction* first_; |
| 154 HInstruction* last_; | 163 HInstruction* last_; |
| 155 HControlInstruction* end_; | 164 HControlInstruction* end_; |
| 156 HLoopInformation* loop_information_; | 165 HLoopInformation* loop_information_; |
| 157 ZoneList<HBasicBlock*> predecessors_; | 166 ZoneList<HBasicBlock*> predecessors_; |
| 158 HBasicBlock* dominator_; | 167 HBasicBlock* dominator_; |
| (...skipping 935 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1094 const char* filename_; | 1103 const char* filename_; |
| 1095 HeapStringAllocator string_allocator_; | 1104 HeapStringAllocator string_allocator_; |
| 1096 StringStream trace_; | 1105 StringStream trace_; |
| 1097 int indent_; | 1106 int indent_; |
| 1098 }; | 1107 }; |
| 1099 | 1108 |
| 1100 | 1109 |
| 1101 } } // namespace v8::internal | 1110 } } // namespace v8::internal |
| 1102 | 1111 |
| 1103 #endif // V8_HYDROGEN_H_ | 1112 #endif // V8_HYDROGEN_H_ |
| OLD | NEW |