| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 bool IsStartBlock() const { return block_id() == 0; } | 107 bool IsStartBlock() const { return block_id() == 0; } |
| 108 void PostProcessLoopHeader(IterationStatement* stmt); | 108 void PostProcessLoopHeader(IterationStatement* stmt); |
| 109 | 109 |
| 110 bool IsFinished() const { return end_ != NULL; } | 110 bool IsFinished() const { return end_ != NULL; } |
| 111 void AddPhi(HPhi* phi); | 111 void AddPhi(HPhi* phi); |
| 112 void RemovePhi(HPhi* phi); | 112 void RemovePhi(HPhi* phi); |
| 113 void AddInstruction(HInstruction* instr, int position); | 113 void AddInstruction(HInstruction* instr, int position); |
| 114 bool Dominates(HBasicBlock* other) const; | 114 bool Dominates(HBasicBlock* other) const; |
| 115 int LoopNestingDepth() const; | 115 int LoopNestingDepth() const; |
| 116 | 116 |
| 117 void ReplaceControlWithGotoSuccessor(int succ); | |
| 118 | |
| 119 void SetInitialEnvironment(HEnvironment* env); | 117 void SetInitialEnvironment(HEnvironment* env); |
| 120 void ClearEnvironment() { | 118 void ClearEnvironment() { |
| 121 ASSERT(IsFinished()); | 119 ASSERT(IsFinished()); |
| 122 ASSERT(end()->SuccessorCount() == 0); | 120 ASSERT(end()->SuccessorCount() == 0); |
| 123 last_environment_ = NULL; | 121 last_environment_ = NULL; |
| 124 } | 122 } |
| 125 bool HasEnvironment() const { return last_environment_ != NULL; } | 123 bool HasEnvironment() const { return last_environment_ != NULL; } |
| 126 void UpdateEnvironment(HEnvironment* env); | 124 void UpdateEnvironment(HEnvironment* env); |
| 127 HBasicBlock* parent_loop_header() const { return parent_loop_header_; } | 125 HBasicBlock* parent_loop_header() const { return parent_loop_header_; } |
| 128 | 126 |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 Goto(block, position, NULL, false); | 193 Goto(block, position, NULL, false); |
| 196 } | 194 } |
| 197 | 195 |
| 198 // Add the inlined function exit sequence, adding an HLeaveInlined | 196 // Add the inlined function exit sequence, adding an HLeaveInlined |
| 199 // instruction and updating the bailout environment. | 197 // instruction and updating the bailout environment. |
| 200 void AddLeaveInlined(HValue* return_value, | 198 void AddLeaveInlined(HValue* return_value, |
| 201 FunctionState* state, | 199 FunctionState* state, |
| 202 int position); | 200 int position); |
| 203 | 201 |
| 204 private: | 202 private: |
| 205 void MarkSuccEdgeUnreachable(int succ); | |
| 206 void RegisterPredecessor(HBasicBlock* pred); | 203 void RegisterPredecessor(HBasicBlock* pred); |
| 207 void AddDominatedBlock(HBasicBlock* block); | 204 void AddDominatedBlock(HBasicBlock* block); |
| 208 | 205 |
| 209 int block_id_; | 206 int block_id_; |
| 210 HGraph* graph_; | 207 HGraph* graph_; |
| 211 ZoneList<HPhi*> phis_; | 208 ZoneList<HPhi*> phis_; |
| 212 HInstruction* first_; | 209 HInstruction* first_; |
| 213 HInstruction* last_; | 210 HInstruction* last_; |
| 214 HControlInstruction* end_; | 211 HControlInstruction* end_; |
| 215 HLoopInformation* loop_information_; | 212 HLoopInformation* loop_information_; |
| (...skipping 2467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2683 } | 2680 } |
| 2684 | 2681 |
| 2685 private: | 2682 private: |
| 2686 HGraphBuilder* builder_; | 2683 HGraphBuilder* builder_; |
| 2687 }; | 2684 }; |
| 2688 | 2685 |
| 2689 | 2686 |
| 2690 } } // namespace v8::internal | 2687 } } // namespace v8::internal |
| 2691 | 2688 |
| 2692 #endif // V8_HYDROGEN_H_ | 2689 #endif // V8_HYDROGEN_H_ |
| OLD | NEW |