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-analysis.h" | 8 #include "src/compiler/bytecode-analysis.h" |
9 #include "src/compiler/js-graph.h" | 9 #include "src/compiler/js-graph.h" |
10 #include "src/compiler/liveness-analyzer.h" | 10 #include "src/compiler/liveness-analyzer.h" |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 // Control flow plumbing. | 175 // Control flow plumbing. |
176 void BuildJump(); | 176 void BuildJump(); |
177 void BuildJumpIf(Node* condition); | 177 void BuildJumpIf(Node* condition); |
178 void BuildJumpIfNot(Node* condition); | 178 void BuildJumpIfNot(Node* condition); |
179 void BuildJumpIfEqual(Node* comperand); | 179 void BuildJumpIfEqual(Node* comperand); |
180 void BuildJumpIfTrue(); | 180 void BuildJumpIfTrue(); |
181 void BuildJumpIfFalse(); | 181 void BuildJumpIfFalse(); |
182 void BuildJumpIfToBooleanTrue(); | 182 void BuildJumpIfToBooleanTrue(); |
183 void BuildJumpIfToBooleanFalse(); | 183 void BuildJumpIfToBooleanFalse(); |
184 void BuildJumpIfNotHole(); | 184 void BuildJumpIfNotHole(); |
| 185 void BuildJumpIfJSReceiver(); |
185 | 186 |
186 // Simulates control flow by forward-propagating environments. | 187 // Simulates control flow by forward-propagating environments. |
187 void MergeIntoSuccessorEnvironment(int target_offset); | 188 void MergeIntoSuccessorEnvironment(int target_offset); |
188 void BuildLoopHeaderEnvironment(int current_offset); | 189 void BuildLoopHeaderEnvironment(int current_offset); |
189 void SwitchToMergeEnvironment(int current_offset); | 190 void SwitchToMergeEnvironment(int current_offset); |
190 | 191 |
191 // Simulates control flow that exits the function body. | 192 // Simulates control flow that exits the function body. |
192 void MergeControlToLeaveFunction(Node* exit); | 193 void MergeControlToLeaveFunction(Node* exit); |
193 | 194 |
194 // Builds entry points that are used by OSR deconstruction. | 195 // Builds entry points that are used by OSR deconstruction. |
(...skipping 27 matching lines...) Expand all Loading... |
222 int handler_offset_; // Handler entry offset within the bytecode. | 223 int handler_offset_; // Handler entry offset within the bytecode. |
223 int context_register_; // Index of register holding handler context. | 224 int context_register_; // Index of register holding handler context. |
224 }; | 225 }; |
225 | 226 |
226 // Field accessors | 227 // Field accessors |
227 Graph* graph() const { return jsgraph_->graph(); } | 228 Graph* graph() const { return jsgraph_->graph(); } |
228 CommonOperatorBuilder* common() const { return jsgraph_->common(); } | 229 CommonOperatorBuilder* common() const { return jsgraph_->common(); } |
229 Zone* graph_zone() const { return graph()->zone(); } | 230 Zone* graph_zone() const { return graph()->zone(); } |
230 JSGraph* jsgraph() const { return jsgraph_; } | 231 JSGraph* jsgraph() const { return jsgraph_; } |
231 JSOperatorBuilder* javascript() const { return jsgraph_->javascript(); } | 232 JSOperatorBuilder* javascript() const { return jsgraph_->javascript(); } |
| 233 SimplifiedOperatorBuilder* simplified() const { |
| 234 return jsgraph_->simplified(); |
| 235 } |
232 Zone* local_zone() const { return local_zone_; } | 236 Zone* local_zone() const { return local_zone_; } |
233 const Handle<BytecodeArray>& bytecode_array() const { | 237 const Handle<BytecodeArray>& bytecode_array() const { |
234 return bytecode_array_; | 238 return bytecode_array_; |
235 } | 239 } |
236 const Handle<HandlerTable>& exception_handler_table() const { | 240 const Handle<HandlerTable>& exception_handler_table() const { |
237 return exception_handler_table_; | 241 return exception_handler_table_; |
238 } | 242 } |
239 const Handle<TypeFeedbackVector>& feedback_vector() const { | 243 const Handle<TypeFeedbackVector>& feedback_vector() const { |
240 return feedback_vector_; | 244 return feedback_vector_; |
241 } | 245 } |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
316 static int const kBinaryOperationSmiHintIndex = 2; | 320 static int const kBinaryOperationSmiHintIndex = 2; |
317 | 321 |
318 DISALLOW_COPY_AND_ASSIGN(BytecodeGraphBuilder); | 322 DISALLOW_COPY_AND_ASSIGN(BytecodeGraphBuilder); |
319 }; | 323 }; |
320 | 324 |
321 } // namespace compiler | 325 } // namespace compiler |
322 } // namespace internal | 326 } // namespace internal |
323 } // namespace v8 | 327 } // namespace v8 |
324 | 328 |
325 #endif // V8_COMPILER_BYTECODE_GRAPH_BUILDER_H_ | 329 #endif // V8_COMPILER_BYTECODE_GRAPH_BUILDER_H_ |
OLD | NEW |