Chromium Code Reviews| Index: src/compiler/bytecode-graph-builder.cc |
| diff --git a/src/compiler/bytecode-graph-builder.cc b/src/compiler/bytecode-graph-builder.cc |
| index 4cfd68d4ca8b8d2b8fb56657e52e95e8ee847c65..12b1f8bb41329e036258af0e9674ea8851e06aba 100644 |
| --- a/src/compiler/bytecode-graph-builder.cc |
| +++ b/src/compiler/bytecode-graph-builder.cc |
| @@ -502,10 +502,7 @@ Node* BytecodeGraphBuilder::BuildLoadNativeContextField(int index) { |
| VectorSlotPair BytecodeGraphBuilder::CreateVectorSlotPair(int slot_id) { |
| Handle<TypeFeedbackVector> feedback_vector = info()->feedback_vector(); |
| - FeedbackVectorSlot slot; |
| - if (slot_id >= TypeFeedbackVector::kReservedIndexCount) { |
| - slot = feedback_vector->ToSlot(slot_id); |
| - } |
| + FeedbackVectorSlot slot = feedback_vector->ToSlot(slot_id); |
| return VectorSlotPair(feedback_vector, slot); |
| } |
| @@ -1041,7 +1038,7 @@ Node* BytecodeGraphBuilder::ProcessCallArguments(const Operator* call_op, |
| return value; |
| } |
| -void BytecodeGraphBuilder::BuildCall() { |
| +void BytecodeGraphBuilder::BuildCall(bool has_feedback_slot) { |
|
rmcilroy
2016/02/12 14:21:03
Not keen on this, I'd prefer it just to be two sep
mythria
2016/02/17 11:02:47
Done.
|
| 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 |
| @@ -1051,8 +1048,11 @@ void BytecodeGraphBuilder::BuildCall() { |
| environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(0)); |
| interpreter::Register receiver = bytecode_iterator().GetRegisterOperand(1); |
| size_t arg_count = bytecode_iterator().GetRegisterCountOperand(2); |
| - VectorSlotPair feedback = |
| - CreateVectorSlotPair(bytecode_iterator().GetIndexOperand(3)); |
| + int slot_id = FeedbackVectorSlot::Invalid().ToInt(); |
| + if (has_feedback_slot) { |
| + slot_id = bytecode_iterator().GetIndexOperand(3); |
| + } |
| + VectorSlotPair feedback = CreateVectorSlotPair(slot_id); |
| // TODO(ishell): provide correct tail_call_mode value to CallFunction. |
| const Operator* call = javascript()->CallFunction( |
| @@ -1061,9 +1061,13 @@ void BytecodeGraphBuilder::BuildCall() { |
| environment()->BindAccumulator(value, &states); |
| } |
| -void BytecodeGraphBuilder::VisitCall() { BuildCall(); } |
| +void BytecodeGraphBuilder::VisitCallIC() { BuildCall(true); } |
| + |
| +void BytecodeGraphBuilder::VisitCallICWide() { BuildCall(true); } |
| + |
| +void BytecodeGraphBuilder::VisitCall() { BuildCall(false); } |
| -void BytecodeGraphBuilder::VisitCallWide() { BuildCall(); } |
| +void BytecodeGraphBuilder::VisitCallWide() { BuildCall(false); } |
| void BytecodeGraphBuilder::BuildCallJSRuntime() { |
| FrameStateBeforeAndAfter states(this); |