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/v8.h" | 8 #include "src/v8.h" |
9 | 9 |
10 #include "src/ast.h" | 10 #include "src/ast.h" |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 // Getters for values in the activation record. | 65 // Getters for values in the activation record. |
66 Node* GetFunctionClosure(); | 66 Node* GetFunctionClosure(); |
67 Node* GetFunctionContext(); | 67 Node* GetFunctionContext(); |
68 | 68 |
69 // | 69 // |
70 // The following build methods all generate graph fragments and return one | 70 // The following build methods all generate graph fragments and return one |
71 // resulting node. The operand stack height remains the same, variables and | 71 // resulting node. The operand stack height remains the same, variables and |
72 // other dependencies tracked by the environment might be mutated though. | 72 // other dependencies tracked by the environment might be mutated though. |
73 // | 73 // |
74 | 74 |
| 75 // Builder to create a receiver check for sloppy mode. |
| 76 Node* BuildPatchReceiverToGlobalProxy(Node* receiver); |
| 77 |
75 // Builder to create a local function context. | 78 // Builder to create a local function context. |
76 Node* BuildLocalFunctionContext(Node* context, Node* closure); | 79 Node* BuildLocalFunctionContext(Node* context, Node* closure); |
77 | 80 |
78 // Builder to create an arguments object if it is used. | 81 // Builder to create an arguments object if it is used. |
79 Node* BuildArgumentsObject(Variable* arguments); | 82 Node* BuildArgumentsObject(Variable* arguments); |
80 | 83 |
81 // Builders for variable load and assignment. | 84 // Builders for variable load and assignment. |
82 Node* BuildVariableAssignment(Variable* var, Node* value, Token::Value op, | 85 Node* BuildVariableAssignment(Variable* var, Node* value, Token::Value op, |
83 BailoutId bailout_id, | 86 BailoutId bailout_id, |
84 OutputFrameStateCombine state_combine = | 87 OutputFrameStateCombine state_combine = |
85 OutputFrameStateCombine::Ignore()); | 88 OutputFrameStateCombine::Ignore()); |
86 Node* BuildVariableDelete(Variable* var, BailoutId bailout_id, | 89 Node* BuildVariableDelete(Variable* var, BailoutId bailout_id, |
87 OutputFrameStateCombine state_combine); | 90 OutputFrameStateCombine state_combine); |
88 Node* BuildVariableLoad(Variable* var, BailoutId bailout_id, | 91 Node* BuildVariableLoad(Variable* var, BailoutId bailout_id, |
89 const VectorSlotPair& feedback, | 92 const VectorSlotPair& feedback, |
90 ContextualMode mode = CONTEXTUAL); | 93 ContextualMode mode = CONTEXTUAL); |
91 | 94 |
92 // Builders for accessing the function context. | 95 // Builders for accessing the function context. |
93 Node* BuildLoadBuiltinsObject(); | 96 Node* BuildLoadBuiltinsObject(); |
94 Node* BuildLoadGlobalObject(); | 97 Node* BuildLoadGlobalObject(); |
| 98 Node* BuildLoadGlobalProxy(); |
95 Node* BuildLoadClosure(); | 99 Node* BuildLoadClosure(); |
96 Node* BuildLoadObjectField(Node* object, int offset); | 100 Node* BuildLoadObjectField(Node* object, int offset); |
97 | 101 |
98 // Builders for automatic type conversion. | 102 // Builders for automatic type conversion. |
99 Node* BuildToBoolean(Node* value); | 103 Node* BuildToBoolean(Node* value); |
100 | 104 |
101 // Builders for error reporting at runtime. | 105 // Builders for error reporting at runtime. |
102 Node* BuildThrowReferenceError(Variable* var, BailoutId bailout_id); | 106 Node* BuildThrowReferenceError(Variable* var, BailoutId bailout_id); |
103 | 107 |
104 // Builders for dynamic hole-checks at runtime. | 108 // Builders for dynamic hole-checks at runtime. |
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
440 | 444 |
441 Scope* AstGraphBuilder::current_scope() const { | 445 Scope* AstGraphBuilder::current_scope() const { |
442 return execution_context_->scope(); | 446 return execution_context_->scope(); |
443 } | 447 } |
444 | 448 |
445 } // namespace compiler | 449 } // namespace compiler |
446 } // namespace internal | 450 } // namespace internal |
447 } // namespace v8 | 451 } // namespace v8 |
448 | 452 |
449 #endif // V8_COMPILER_AST_GRAPH_BUILDER_H_ | 453 #endif // V8_COMPILER_AST_GRAPH_BUILDER_H_ |
OLD | NEW |