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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 Node* NewPhi(int count, Node* input, Node* control); | 97 Node* NewPhi(int count, Node* input, Node* control); |
98 Node* NewEffectPhi(int count, Node* input, Node* control); | 98 Node* NewEffectPhi(int count, Node* input, Node* control); |
99 | 99 |
100 // Helpers for merging control, effect or value dependencies. | 100 // Helpers for merging control, effect or value dependencies. |
101 Node* MergeControl(Node* control, Node* other); | 101 Node* MergeControl(Node* control, Node* other); |
102 Node* MergeEffect(Node* effect, Node* other_effect, Node* control); | 102 Node* MergeEffect(Node* effect, Node* other_effect, Node* control); |
103 Node* MergeValue(Node* value, Node* other_value, Node* control); | 103 Node* MergeValue(Node* value, Node* other_value, Node* control); |
104 | 104 |
105 // The main node creation chokepoint. Adds context, frame state, effect, | 105 // The main node creation chokepoint. Adds context, frame state, effect, |
106 // and control dependencies depending on the operator. | 106 // and control dependencies depending on the operator. |
107 Node* MakeNode(const Operator* op, int value_input_count, Node** value_inputs, | 107 Node* MakeNode(const Operator* op, int value_input_count, |
108 bool incomplete); | 108 Node* const* value_inputs, bool incomplete); |
109 | 109 |
110 Node** EnsureInputBufferSize(int size); | 110 Node** EnsureInputBufferSize(int size); |
111 | 111 |
| 112 Node* const* GetCallArgumentsFromRegister(Node* callee, |
| 113 interpreter::Register first_arg, |
| 114 size_t arity); |
| 115 Node* ProcessCallArguments(const Operator* call_op, Node* const* args, |
| 116 size_t arg_count); |
112 Node* ProcessCallArguments(const Operator* call_op, Node* callee, | 117 Node* ProcessCallArguments(const Operator* call_op, Node* callee, |
113 interpreter::Register receiver, size_t arity); | 118 interpreter::Register receiver, size_t arg_count); |
114 Node* ProcessConstructArguments(const Operator* call_new_op, Node* callee, | 119 Node* ProcessConstructArguments(const Operator* call_new_op, Node* callee, |
115 Node* new_target, | 120 Node* new_target, |
116 interpreter::Register first_arg, | 121 interpreter::Register first_arg, |
117 size_t arity); | 122 size_t arity); |
118 Node* ProcessConstructWithSpreadArguments(const Operator* op, Node* callee, | 123 Node* ProcessConstructWithSpreadArguments(const Operator* op, Node* callee, |
119 Node* new_target, | 124 Node* new_target, |
120 interpreter::Register first_arg, | 125 interpreter::Register first_arg, |
121 size_t arity); | 126 size_t arity); |
122 Node* ProcessCallRuntimeArguments(const Operator* call_runtime_op, | 127 Node* ProcessCallRuntimeArguments(const Operator* call_runtime_op, |
123 interpreter::Register first_arg, | 128 interpreter::Register first_arg, |
(...skipping 14 matching lines...) Expand all Loading... |
138 TypeofMode typeof_mode); | 143 TypeofMode typeof_mode); |
139 void BuildStoreGlobal(LanguageMode language_mode); | 144 void BuildStoreGlobal(LanguageMode language_mode); |
140 void BuildNamedStore(LanguageMode language_mode); | 145 void BuildNamedStore(LanguageMode language_mode); |
141 void BuildKeyedStore(LanguageMode language_mode); | 146 void BuildKeyedStore(LanguageMode language_mode); |
142 void BuildLdaLookupSlot(TypeofMode typeof_mode); | 147 void BuildLdaLookupSlot(TypeofMode typeof_mode); |
143 void BuildLdaLookupContextSlot(TypeofMode typeof_mode); | 148 void BuildLdaLookupContextSlot(TypeofMode typeof_mode); |
144 void BuildLdaLookupGlobalSlot(TypeofMode typeof_mode); | 149 void BuildLdaLookupGlobalSlot(TypeofMode typeof_mode); |
145 void BuildStaLookupSlot(LanguageMode language_mode); | 150 void BuildStaLookupSlot(LanguageMode language_mode); |
146 void BuildCall(TailCallMode tail_call_mode, | 151 void BuildCall(TailCallMode tail_call_mode, |
147 ConvertReceiverMode receiver_hint); | 152 ConvertReceiverMode receiver_hint); |
| 153 void BuildCall(TailCallMode tail_call_mode, ConvertReceiverMode receiver_hint, |
| 154 Node* const* args, size_t arg_count, int slot_id); |
| 155 void BuildCall(TailCallMode tail_call_mode, ConvertReceiverMode receiver_hint, |
| 156 std::initializer_list<Node*> args, int slot_id) { |
| 157 BuildCall(tail_call_mode, receiver_hint, args.begin(), args.size(), |
| 158 slot_id); |
| 159 } |
148 void BuildThrow(); | 160 void BuildThrow(); |
149 void BuildBinaryOp(const Operator* op); | 161 void BuildBinaryOp(const Operator* op); |
150 void BuildBinaryOpWithImmediate(const Operator* op); | 162 void BuildBinaryOpWithImmediate(const Operator* op); |
151 void BuildCompareOp(const Operator* op); | 163 void BuildCompareOp(const Operator* op); |
152 void BuildDelete(LanguageMode language_mode); | 164 void BuildDelete(LanguageMode language_mode); |
153 void BuildCastOperator(const Operator* op); | 165 void BuildCastOperator(const Operator* op); |
154 void BuildForInPrepare(); | 166 void BuildForInPrepare(); |
155 void BuildForInNext(); | 167 void BuildForInNext(); |
156 void BuildInvokeIntrinsic(); | 168 void BuildInvokeIntrinsic(); |
157 | 169 |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
312 static int const kBinaryOperationSmiHintIndex = 2; | 324 static int const kBinaryOperationSmiHintIndex = 2; |
313 | 325 |
314 DISALLOW_COPY_AND_ASSIGN(BytecodeGraphBuilder); | 326 DISALLOW_COPY_AND_ASSIGN(BytecodeGraphBuilder); |
315 }; | 327 }; |
316 | 328 |
317 } // namespace compiler | 329 } // namespace compiler |
318 } // namespace internal | 330 } // namespace internal |
319 } // namespace v8 | 331 } // namespace v8 |
320 | 332 |
321 #endif // V8_COMPILER_BYTECODE_GRAPH_BUILDER_H_ | 333 #endif // V8_COMPILER_BYTECODE_GRAPH_BUILDER_H_ |
OLD | NEW |