OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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_AST_GRAPH_BUILDER_H_ | 5 #ifndef V8_COMPILER_AST_GRAPH_BUILDER_H_ |
6 #define V8_COMPILER_AST_GRAPH_BUILDER_H_ | 6 #define V8_COMPILER_AST_GRAPH_BUILDER_H_ |
7 | 7 |
8 #include "src/ast/ast.h" | 8 #include "src/ast/ast.h" |
9 #include "src/compiler/compiler-source-position-table.h" | 9 #include "src/compiler/compiler-source-position-table.h" |
10 #include "src/compiler/js-graph.h" | 10 #include "src/compiler/js-graph.h" |
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 Node* BuildToBoolean(Node* input, TypeFeedbackId feedback_id); | 302 Node* BuildToBoolean(Node* input, TypeFeedbackId feedback_id); |
303 Node* BuildToObject(Node* input, BailoutId bailout_id); | 303 Node* BuildToObject(Node* input, BailoutId bailout_id); |
304 | 304 |
305 // Builder for adding the [[HomeObject]] to a value if the value came from a | 305 // Builder for adding the [[HomeObject]] to a value if the value came from a |
306 // function literal and needs a home object. Do nothing otherwise. | 306 // function literal and needs a home object. Do nothing otherwise. |
307 Node* BuildSetHomeObject(Node* value, Node* home_object, | 307 Node* BuildSetHomeObject(Node* value, Node* home_object, |
308 LiteralProperty* property, int slot_number = 0); | 308 LiteralProperty* property, int slot_number = 0); |
309 | 309 |
310 // Builders for error reporting at runtime. | 310 // Builders for error reporting at runtime. |
311 Node* BuildThrowError(Node* exception, BailoutId bailout_id); | 311 Node* BuildThrowError(Node* exception, BailoutId bailout_id); |
312 Node* BuildThrowReferenceError(Variable* var, BailoutId bailout_id); | |
313 Node* BuildThrowConstAssignError(BailoutId bailout_id); | 312 Node* BuildThrowConstAssignError(BailoutId bailout_id); |
314 | 313 |
315 // Builders for dynamic hole-checks at runtime. | |
316 Node* BuildHoleCheckThenThrow(Node* value, Variable* var, Node* not_hole, | |
317 BailoutId bailout_id); | |
318 Node* BuildHoleCheckElseThrow(Node* value, Variable* var, Node* for_hole, | |
319 BailoutId bailout_id); | |
320 | |
321 // Builders for non-local control flow. | 314 // Builders for non-local control flow. |
322 Node* BuildReturn(Node* return_value); | 315 Node* BuildReturn(Node* return_value); |
323 Node* BuildThrow(Node* exception_value); | 316 Node* BuildThrow(Node* exception_value); |
324 | 317 |
325 // Builders for binary operations. | 318 // Builders for binary operations. |
326 Node* BuildBinaryOp(Node* left, Node* right, Token::Value op, | 319 Node* BuildBinaryOp(Node* left, Node* right, Token::Value op, |
327 TypeFeedbackId feedback_id); | 320 TypeFeedbackId feedback_id); |
328 | 321 |
329 // Process arguments to a call by popping {arity} elements off the operand | 322 // Process arguments to a call by popping {arity} elements off the operand |
330 // stack and build a call node using the given call operator. | 323 // stack and build a call node using the given call operator. |
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
585 private: | 578 private: |
586 SourcePositionTable* const source_positions_; | 579 SourcePositionTable* const source_positions_; |
587 SourcePosition const start_position_; | 580 SourcePosition const start_position_; |
588 }; | 581 }; |
589 | 582 |
590 } // namespace compiler | 583 } // namespace compiler |
591 } // namespace internal | 584 } // namespace internal |
592 } // namespace v8 | 585 } // namespace v8 |
593 | 586 |
594 #endif // V8_COMPILER_AST_GRAPH_BUILDER_H_ | 587 #endif // V8_COMPILER_AST_GRAPH_BUILDER_H_ |
OLD | NEW |