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 #include "src/compiler/bytecode-graph-builder.h" | 5 #include "src/compiler/bytecode-graph-builder.h" |
6 | 6 |
7 #include "src/compiler/bytecode-branch-analysis.h" | 7 #include "src/compiler/bytecode-branch-analysis.h" |
8 #include "src/compiler/linkage.h" | 8 #include "src/compiler/linkage.h" |
9 #include "src/compiler/operator-properties.h" | 9 #include "src/compiler/operator-properties.h" |
10 #include "src/interpreter/bytecodes.h" | 10 #include "src/interpreter/bytecodes.h" |
(...skipping 1179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1190 FrameStateBeforeAndAfter states(this, iterator); | 1190 FrameStateBeforeAndAfter states(this, iterator); |
1191 // TODO(rmcilroy): Set receiver_hint correctly based on whether the receiver | 1191 // TODO(rmcilroy): Set receiver_hint correctly based on whether the receiver |
1192 // register has been loaded with null / undefined explicitly or we are sure it | 1192 // register has been loaded with null / undefined explicitly or we are sure it |
1193 // is not null / undefined. | 1193 // is not null / undefined. |
1194 ConvertReceiverMode receiver_hint = ConvertReceiverMode::kAny; | 1194 ConvertReceiverMode receiver_hint = ConvertReceiverMode::kAny; |
1195 Node* callee = environment()->LookupRegister(iterator.GetRegisterOperand(0)); | 1195 Node* callee = environment()->LookupRegister(iterator.GetRegisterOperand(0)); |
1196 interpreter::Register receiver = iterator.GetRegisterOperand(1); | 1196 interpreter::Register receiver = iterator.GetRegisterOperand(1); |
1197 size_t arg_count = iterator.GetCountOperand(2); | 1197 size_t arg_count = iterator.GetCountOperand(2); |
1198 VectorSlotPair feedback = CreateVectorSlotPair(iterator.GetIndexOperand(3)); | 1198 VectorSlotPair feedback = CreateVectorSlotPair(iterator.GetIndexOperand(3)); |
1199 | 1199 |
| 1200 // TODO(ishell): provide correct tail_call_mode value to CallFunction. |
1200 const Operator* call = javascript()->CallFunction( | 1201 const Operator* call = javascript()->CallFunction( |
1201 arg_count + 2, language_mode(), feedback, receiver_hint); | 1202 arg_count + 2, language_mode(), feedback, receiver_hint); |
1202 Node* value = ProcessCallArguments(call, callee, receiver, arg_count + 2); | 1203 Node* value = ProcessCallArguments(call, callee, receiver, arg_count + 2); |
1203 environment()->BindAccumulator(value, &states); | 1204 environment()->BindAccumulator(value, &states); |
1204 } | 1205 } |
1205 | 1206 |
1206 | 1207 |
1207 void BytecodeGraphBuilder::VisitCall( | 1208 void BytecodeGraphBuilder::VisitCall( |
1208 const interpreter::BytecodeArrayIterator& iterator) { | 1209 const interpreter::BytecodeArrayIterator& iterator) { |
1209 BuildCall(iterator); | 1210 BuildCall(iterator); |
(...skipping 891 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2101 | 2102 |
2102 void BytecodeGraphBuilder::UpdateControlDependencyToLeaveFunction(Node* exit) { | 2103 void BytecodeGraphBuilder::UpdateControlDependencyToLeaveFunction(Node* exit) { |
2103 if (environment()->IsMarkedAsUnreachable()) return; | 2104 if (environment()->IsMarkedAsUnreachable()) return; |
2104 environment()->MarkAsUnreachable(); | 2105 environment()->MarkAsUnreachable(); |
2105 exit_controls_.push_back(exit); | 2106 exit_controls_.push_back(exit); |
2106 } | 2107 } |
2107 | 2108 |
2108 } // namespace compiler | 2109 } // namespace compiler |
2109 } // namespace internal | 2110 } // namespace internal |
2110 } // namespace v8 | 2111 } // namespace v8 |
OLD | NEW |