| Index: arguments/src/x64/codegen-x64.cc
|
| diff --git a/arguments/src/x64/codegen-x64.cc b/arguments/src/x64/codegen-x64.cc
|
| index 793b6aca5fb0d9bb09979be2c6e1e205f1297ea7..7181216bb2588b1d8fadf8abc8a983428b30bb37 100644
|
| --- a/arguments/src/x64/codegen-x64.cc
|
| +++ b/arguments/src/x64/codegen-x64.cc
|
| @@ -5595,46 +5595,36 @@ void CodeGenerator::VisitCall(Call* node) {
|
| // -------------------------------------------
|
|
|
| // Load the function to call from the property through a reference.
|
| - if (property->is_synthetic()) {
|
| - Reference ref(this, property, false);
|
| - ref.GetValue();
|
| - // Use global object as receiver.
|
| - LoadGlobalReceiver();
|
| - // Call the function.
|
| - CallWithArguments(args, RECEIVER_MIGHT_BE_VALUE, node->position());
|
| - } else {
|
| - // Push the receiver onto the frame.
|
| - Load(property->obj());
|
| -
|
| - // Load the name of the function.
|
| - Load(property->key());
|
| -
|
| - // Swap the name of the function and the receiver on the stack to follow
|
| - // the calling convention for call ICs.
|
| - Result key = frame_->Pop();
|
| - Result receiver = frame_->Pop();
|
| - frame_->Push(&key);
|
| - frame_->Push(&receiver);
|
| - key.Unuse();
|
| - receiver.Unuse();
|
| + Load(property->obj());
|
|
|
| - // Load the arguments.
|
| - int arg_count = args->length();
|
| - for (int i = 0; i < arg_count; i++) {
|
| - Load(args->at(i));
|
| - frame_->SpillTop();
|
| - }
|
| + // Load the name of the function.
|
| + Load(property->key());
|
|
|
| - // Place the key on top of stack and call the IC initialization code.
|
| - frame_->PushElementAt(arg_count + 1);
|
| - CodeForSourcePosition(node->position());
|
| - Result result = frame_->CallKeyedCallIC(RelocInfo::CODE_TARGET,
|
| - arg_count,
|
| - loop_nesting());
|
| - frame_->Drop(); // Drop the key still on the stack.
|
| - frame_->RestoreContextRegister();
|
| - frame_->Push(&result);
|
| + // Swap the name of the function and the receiver on the stack to follow
|
| + // the calling convention for call ICs.
|
| + Result key = frame_->Pop();
|
| + Result receiver = frame_->Pop();
|
| + frame_->Push(&key);
|
| + frame_->Push(&receiver);
|
| + key.Unuse();
|
| + receiver.Unuse();
|
| +
|
| + // Load the arguments.
|
| + int arg_count = args->length();
|
| + for (int i = 0; i < arg_count; i++) {
|
| + Load(args->at(i));
|
| + frame_->SpillTop();
|
| }
|
| +
|
| + // Place the key on top of stack and call the IC initialization code.
|
| + frame_->PushElementAt(arg_count + 1);
|
| + CodeForSourcePosition(node->position());
|
| + Result result = frame_->CallKeyedCallIC(RelocInfo::CODE_TARGET,
|
| + arg_count,
|
| + loop_nesting());
|
| + frame_->Drop(); // Drop the key still on the stack.
|
| + frame_->RestoreContextRegister();
|
| + frame_->Push(&result);
|
| }
|
| } else {
|
| // ----------------------------------
|
|
|