Index: src/compiler/bytecode-graph-builder.cc |
diff --git a/src/compiler/bytecode-graph-builder.cc b/src/compiler/bytecode-graph-builder.cc |
index 4e22e5b3ff49bc41123830777213e99982b2fd62..faea8c7cb02ca8f9a7d3d9e14edb1fc02d207b51 100644 |
--- a/src/compiler/bytecode-graph-builder.cc |
+++ b/src/compiler/bytecode-graph-builder.cc |
@@ -501,7 +501,10 @@ |
VectorSlotPair BytecodeGraphBuilder::CreateVectorSlotPair(int slot_id) { |
- FeedbackVectorSlot slot = feedback_vector()->ToSlot(slot_id); |
+ FeedbackVectorSlot slot; |
+ if (slot_id >= TypeFeedbackVector::kReservedIndexCount) { |
+ slot = feedback_vector()->ToSlot(slot_id); |
+ } |
return VectorSlotPair(feedback_vector(), slot); |
} |
@@ -989,8 +992,7 @@ |
return value; |
} |
-void BytecodeGraphBuilder::BuildCallWithFeedbackSlot( |
- TailCallMode tail_call_mode) { |
+void BytecodeGraphBuilder::BuildCall(TailCallMode tail_call_mode) { |
FrameStateBeforeAndAfter states(this); |
// TODO(rmcilroy): Set receiver_hint correctly based on whether the receiver |
// register has been loaded with null / undefined explicitly or we are sure it |
@@ -1000,44 +1002,11 @@ |
environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(0)); |
interpreter::Register receiver = bytecode_iterator().GetRegisterOperand(1); |
size_t arg_count = bytecode_iterator().GetRegisterCountOperand(2); |
- int slot_id = bytecode_iterator().GetIndexOperand(3); |
- VectorSlotPair feedback = CreateVectorSlotPair(slot_id); |
+ VectorSlotPair feedback = |
+ CreateVectorSlotPair(bytecode_iterator().GetIndexOperand(3)); |
const Operator* call = javascript()->CallFunction( |
arg_count + 1, feedback, receiver_hint, tail_call_mode); |
- Node* value = ProcessCallArguments(call, callee, receiver, arg_count + 1); |
- environment()->BindAccumulator(value, &states); |
-} |
- |
-void BytecodeGraphBuilder::VisitCallIC() { |
- BuildCallWithFeedbackSlot(TailCallMode::kDisallow); |
-} |
- |
-void BytecodeGraphBuilder::VisitCallICWide() { |
- BuildCallWithFeedbackSlot(TailCallMode::kDisallow); |
-} |
- |
-void BytecodeGraphBuilder::VisitTailCallIC() { |
- BuildCallWithFeedbackSlot(TailCallMode::kAllow); |
-} |
- |
-void BytecodeGraphBuilder::VisitTailCallICWide() { |
- BuildCallWithFeedbackSlot(TailCallMode::kAllow); |
-} |
- |
-void BytecodeGraphBuilder::BuildCall(TailCallMode tail_call_mode) { |
- FrameStateBeforeAndAfter states(this); |
- // TODO(rmcilroy): Set receiver_hint correctly based on whether the receiver |
- // register has been loaded with null / undefined explicitly or we are sure it |
- // is not null / undefined. |
- ConvertReceiverMode receiver_hint = ConvertReceiverMode::kAny; |
- Node* callee = |
- environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(0)); |
- interpreter::Register receiver = bytecode_iterator().GetRegisterOperand(1); |
- size_t arg_count = bytecode_iterator().GetRegisterCountOperand(2); |
- |
- const Operator* call = javascript()->CallFunction( |
- arg_count + 1, VectorSlotPair(), receiver_hint, tail_call_mode); |
Node* value = ProcessCallArguments(call, callee, receiver, arg_count + 1); |
environment()->BindAccumulator(value, &states); |
} |