OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_COMPILER_BYTECODE_GRAPH_BUILDER_H_ | 5 #ifndef V8_COMPILER_BYTECODE_GRAPH_BUILDER_H_ |
6 #define V8_COMPILER_BYTECODE_GRAPH_BUILDER_H_ | 6 #define V8_COMPILER_BYTECODE_GRAPH_BUILDER_H_ |
7 | 7 |
8 #include "src/compiler/bytecode-branch-analysis.h" | 8 #include "src/compiler/bytecode-branch-analysis.h" |
9 #include "src/compiler/bytecode-loop-analysis.h" | 9 #include "src/compiler/bytecode-loop-analysis.h" |
10 #include "src/compiler/js-graph.h" | 10 #include "src/compiler/js-graph.h" |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 // Helper function to create binary operation hint from the recorded | 140 // Helper function to create binary operation hint from the recorded |
141 // type feedback. | 141 // type feedback. |
142 BinaryOperationHint GetBinaryOperationHint(int operand_index); | 142 BinaryOperationHint GetBinaryOperationHint(int operand_index); |
143 | 143 |
144 // Helper function to create compare operation hint from the recorded | 144 // Helper function to create compare operation hint from the recorded |
145 // type feedback. | 145 // type feedback. |
146 CompareOperationHint GetCompareOperationHint(); | 146 CompareOperationHint GetCompareOperationHint(); |
147 | 147 |
148 // Control flow plumbing. | 148 // Control flow plumbing. |
149 void BuildJump(); | 149 void BuildJump(); |
150 void BuildConditionalJump(Node* condition); | 150 void BuildJumpIf(Node* condition); |
| 151 void BuildJumpIfNot(Node* condition); |
151 void BuildJumpIfEqual(Node* comperand); | 152 void BuildJumpIfEqual(Node* comperand); |
152 void BuildJumpIfToBooleanEqual(Node* boolean_comperand); | 153 void BuildJumpIfTrue(); |
| 154 void BuildJumpIfFalse(); |
| 155 void BuildJumpIfToBooleanTrue(); |
| 156 void BuildJumpIfToBooleanFalse(); |
153 void BuildJumpIfNotHole(); | 157 void BuildJumpIfNotHole(); |
154 | 158 |
155 // Simulates control flow by forward-propagating environments. | 159 // Simulates control flow by forward-propagating environments. |
156 void MergeIntoSuccessorEnvironment(int target_offset); | 160 void MergeIntoSuccessorEnvironment(int target_offset); |
157 void BuildLoopHeaderEnvironment(int current_offset); | 161 void BuildLoopHeaderEnvironment(int current_offset); |
158 void SwitchToMergeEnvironment(int current_offset); | 162 void SwitchToMergeEnvironment(int current_offset); |
159 | 163 |
160 // Simulates control flow that exits the function body. | 164 // Simulates control flow that exits the function body. |
161 void MergeControlToLeaveFunction(Node* exit); | 165 void MergeControlToLeaveFunction(Node* exit); |
162 | 166 |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 static int const kBinaryOperationSmiHintIndex = 2; | 273 static int const kBinaryOperationSmiHintIndex = 2; |
270 | 274 |
271 DISALLOW_COPY_AND_ASSIGN(BytecodeGraphBuilder); | 275 DISALLOW_COPY_AND_ASSIGN(BytecodeGraphBuilder); |
272 }; | 276 }; |
273 | 277 |
274 } // namespace compiler | 278 } // namespace compiler |
275 } // namespace internal | 279 } // namespace internal |
276 } // namespace v8 | 280 } // namespace v8 |
277 | 281 |
278 #endif // V8_COMPILER_BYTECODE_GRAPH_BUILDER_H_ | 282 #endif // V8_COMPILER_BYTECODE_GRAPH_BUILDER_H_ |
OLD | NEW |