| 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 arity); |
| 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); |
| (...skipping 21 matching lines...) Expand all Loading... |
| 143 kNormal, | 148 kNormal, |
| 144 // Store value to the receiver without checking the prototype chain. | 149 // Store value to the receiver without checking the prototype chain. |
| 145 kOwn, | 150 kOwn, |
| 146 }; | 151 }; |
| 147 void BuildNamedStore(LanguageMode language_mode, StoreMode store_mode); | 152 void BuildNamedStore(LanguageMode language_mode, StoreMode store_mode); |
| 148 void BuildKeyedStore(LanguageMode language_mode); | 153 void BuildKeyedStore(LanguageMode language_mode); |
| 149 void BuildLdaLookupSlot(TypeofMode typeof_mode); | 154 void BuildLdaLookupSlot(TypeofMode typeof_mode); |
| 150 void BuildLdaLookupContextSlot(TypeofMode typeof_mode); | 155 void BuildLdaLookupContextSlot(TypeofMode typeof_mode); |
| 151 void BuildLdaLookupGlobalSlot(TypeofMode typeof_mode); | 156 void BuildLdaLookupGlobalSlot(TypeofMode typeof_mode); |
| 152 void BuildStaLookupSlot(LanguageMode language_mode); | 157 void BuildStaLookupSlot(LanguageMode language_mode); |
| 153 void BuildCall(TailCallMode tail_call_mode, | 158 void BuildCallVarArgs(TailCallMode tail_call_mode, |
| 154 ConvertReceiverMode receiver_hint); | 159 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(); |
| 155 void BuildBinaryOp(const Operator* op); | 168 void BuildBinaryOp(const Operator* op); |
| 156 void BuildBinaryOpWithImmediate(const Operator* op); | 169 void BuildBinaryOpWithImmediate(const Operator* op); |
| 157 void BuildCompareOp(const Operator* op); | 170 void BuildCompareOp(const Operator* op); |
| 158 void BuildTestingOp(const Operator* op); | 171 void BuildTestingOp(const Operator* op); |
| 159 void BuildDelete(LanguageMode language_mode); | 172 void BuildDelete(LanguageMode language_mode); |
| 160 void BuildCastOperator(const Operator* op); | 173 void BuildCastOperator(const Operator* op); |
| 161 void BuildForInPrepare(); | 174 void BuildForInPrepare(); |
| 162 void BuildForInNext(); | 175 void BuildForInNext(); |
| 163 void BuildInvokeIntrinsic(); | 176 void BuildInvokeIntrinsic(); |
| 164 | 177 |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 static int const kBinaryOperationSmiHintIndex = 2; | 349 static int const kBinaryOperationSmiHintIndex = 2; |
| 337 | 350 |
| 338 DISALLOW_COPY_AND_ASSIGN(BytecodeGraphBuilder); | 351 DISALLOW_COPY_AND_ASSIGN(BytecodeGraphBuilder); |
| 339 }; | 352 }; |
| 340 | 353 |
| 341 } // namespace compiler | 354 } // namespace compiler |
| 342 } // namespace internal | 355 } // namespace internal |
| 343 } // namespace v8 | 356 } // namespace v8 |
| 344 | 357 |
| 345 #endif // V8_COMPILER_BYTECODE_GRAPH_BUILDER_H_ | 358 #endif // V8_COMPILER_BYTECODE_GRAPH_BUILDER_H_ |
| OLD | NEW |