| 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, | 107 Node* MakeNode(const Operator* op, int value_input_count, Node** value_inputs, |
| 108 Node* const* value_inputs, bool incomplete); | 108 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); | |
| 117 Node* ProcessCallArguments(const Operator* call_op, Node* callee, | 112 Node* ProcessCallArguments(const Operator* call_op, Node* callee, |
| 118 interpreter::Register receiver, size_t arity); | 113 interpreter::Register receiver, size_t arity); |
| 119 Node* ProcessConstructArguments(const Operator* call_new_op, Node* callee, | 114 Node* ProcessConstructArguments(const Operator* call_new_op, Node* callee, |
| 120 Node* new_target, | 115 Node* new_target, |
| 121 interpreter::Register first_arg, | 116 interpreter::Register first_arg, |
| 122 size_t arity); | 117 size_t arity); |
| 123 Node* ProcessConstructWithSpreadArguments(const Operator* op, Node* callee, | 118 Node* ProcessConstructWithSpreadArguments(const Operator* op, Node* callee, |
| 124 Node* new_target, | 119 Node* new_target, |
| 125 interpreter::Register first_arg, | 120 interpreter::Register first_arg, |
| 126 size_t arity); | 121 size_t arity); |
| (...skipping 21 matching lines...) Expand all Loading... |
| 148 kNormal, | 143 kNormal, |
| 149 // Store value to the receiver without checking the prototype chain. | 144 // Store value to the receiver without checking the prototype chain. |
| 150 kOwn, | 145 kOwn, |
| 151 }; | 146 }; |
| 152 void BuildNamedStore(LanguageMode language_mode, StoreMode store_mode); | 147 void BuildNamedStore(LanguageMode language_mode, StoreMode store_mode); |
| 153 void BuildKeyedStore(LanguageMode language_mode); | 148 void BuildKeyedStore(LanguageMode language_mode); |
| 154 void BuildLdaLookupSlot(TypeofMode typeof_mode); | 149 void BuildLdaLookupSlot(TypeofMode typeof_mode); |
| 155 void BuildLdaLookupContextSlot(TypeofMode typeof_mode); | 150 void BuildLdaLookupContextSlot(TypeofMode typeof_mode); |
| 156 void BuildLdaLookupGlobalSlot(TypeofMode typeof_mode); | 151 void BuildLdaLookupGlobalSlot(TypeofMode typeof_mode); |
| 157 void BuildStaLookupSlot(LanguageMode language_mode); | 152 void BuildStaLookupSlot(LanguageMode language_mode); |
| 158 void BuildCallVarArgs(TailCallMode tail_call_mode, | 153 void BuildCall(TailCallMode tail_call_mode, |
| 159 ConvertReceiverMode receiver_hint); | 154 ConvertReceiverMode receiver_hint); |
| 160 void BuildCall(TailCallMode tail_call_mode, ConvertReceiverMode receiver_hint, | |
| 161 Node* const* args, size_t arg_count, int slot_id); | |
| 162 void BuildCall(TailCallMode tail_call_mode, ConvertReceiverMode receiver_hint, | |
| 163 std::initializer_list<Node*> args, int slot_id) { | |
| 164 BuildCall(tail_call_mode, receiver_hint, args.begin(), args.size(), | |
| 165 slot_id); | |
| 166 } | |
| 167 void BuildThrow(); | |
| 168 void BuildBinaryOp(const Operator* op); | 155 void BuildBinaryOp(const Operator* op); |
| 169 void BuildBinaryOpWithImmediate(const Operator* op); | 156 void BuildBinaryOpWithImmediate(const Operator* op); |
| 170 void BuildCompareOp(const Operator* op); | 157 void BuildCompareOp(const Operator* op); |
| 171 void BuildDelete(LanguageMode language_mode); | 158 void BuildDelete(LanguageMode language_mode); |
| 172 void BuildCastOperator(const Operator* op); | 159 void BuildCastOperator(const Operator* op); |
| 173 void BuildForInPrepare(); | 160 void BuildForInPrepare(); |
| 174 void BuildForInNext(); | 161 void BuildForInNext(); |
| 175 void BuildInvokeIntrinsic(); | 162 void BuildInvokeIntrinsic(); |
| 176 | 163 |
| 177 // Optional early lowering to the simplified operator level. Returns the node | 164 // Optional early lowering to the simplified operator level. Returns the node |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 348 static int const kBinaryOperationSmiHintIndex = 2; | 335 static int const kBinaryOperationSmiHintIndex = 2; |
| 349 | 336 |
| 350 DISALLOW_COPY_AND_ASSIGN(BytecodeGraphBuilder); | 337 DISALLOW_COPY_AND_ASSIGN(BytecodeGraphBuilder); |
| 351 }; | 338 }; |
| 352 | 339 |
| 353 } // namespace compiler | 340 } // namespace compiler |
| 354 } // namespace internal | 341 } // namespace internal |
| 355 } // namespace v8 | 342 } // namespace v8 |
| 356 | 343 |
| 357 #endif // V8_COMPILER_BYTECODE_GRAPH_BUILDER_H_ | 344 #endif // V8_COMPILER_BYTECODE_GRAPH_BUILDER_H_ |
| OLD | NEW |