| Index: src/mips/full-codegen-mips.cc
|
| diff --git a/src/mips/full-codegen-mips.cc b/src/mips/full-codegen-mips.cc
|
| index 1303fba5385530dc80fbea18f3ce96653cc1565b..77708cd3674df552d05f374e1ae40e25f4dc03a3 100644
|
| --- a/src/mips/full-codegen-mips.cc
|
| +++ b/src/mips/full-codegen-mips.cc
|
| @@ -2755,10 +2755,9 @@ void FullCodeGenerator::VisitCall(Call* expr) {
|
|
|
| Comment cmnt(masm_, "[ Call");
|
| Expression* callee = expr->expression();
|
| - VariableProxy* proxy = callee->AsVariableProxy();
|
| - Property* property = callee->AsProperty();
|
| + Call::CallType call_type = expr->GetCallType(isolate());
|
|
|
| - if (proxy != NULL && proxy->var()->is_possibly_eval(isolate())) {
|
| + if (call_type == Call::POSSIBLY_EVAL_CALL) {
|
| // In a call to eval, we first call %ResolvePossiblyDirectEval to
|
| // resolve the function we need to call and the receiver of the
|
| // call. Then we call the resolved function using the given
|
| @@ -2796,13 +2795,15 @@ void FullCodeGenerator::VisitCall(Call* expr) {
|
| // Restore context register.
|
| __ lw(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
|
| context()->DropAndPlug(1, v0);
|
| - } else if (proxy != NULL && proxy->var()->IsUnallocated()) {
|
| + } else if (call_type == Call::GLOBAL_CALL) {
|
| // Push global object as receiver for the call IC.
|
| __ lw(a0, GlobalObjectOperand());
|
| __ push(a0);
|
| + VariableProxy* proxy = callee->AsVariableProxy();
|
| EmitCallWithIC(expr, proxy->name(), CONTEXTUAL);
|
| - } else if (proxy != NULL && proxy->var()->IsLookupSlot()) {
|
| + } else if (call_type == Call::LOOKUP_SLOT_CALL) {
|
| // Call to a lookup slot (dynamically introduced variable).
|
| + VariableProxy* proxy = callee->AsVariableProxy();
|
| Label slow, done;
|
|
|
| { PreservePositionScope scope(masm()->positions_recorder());
|
| @@ -2839,7 +2840,8 @@ void FullCodeGenerator::VisitCall(Call* expr) {
|
| // The receiver is either the global receiver or an object found
|
| // by LoadContextSlot.
|
| EmitCallWithStub(expr);
|
| - } else if (property != NULL) {
|
| + } else if (call_type == Call::PROPERTY_CALL) {
|
| + Property* property = callee->AsProperty();
|
| { PreservePositionScope scope(masm()->positions_recorder());
|
| VisitForStackValue(property->obj());
|
| }
|
| @@ -2851,6 +2853,7 @@ void FullCodeGenerator::VisitCall(Call* expr) {
|
| EmitKeyedCallWithIC(expr, property->key());
|
| }
|
| } else {
|
| + ASSERT(call_type == Call::OTHER_CALL);
|
| // Call to an arbitrary expression not handled specially above.
|
| { PreservePositionScope scope(masm()->positions_recorder());
|
| VisitForStackValue(callee);
|
| @@ -3727,21 +3730,13 @@ void FullCodeGenerator::EmitStringCharAt(CallRuntime* expr) {
|
| void FullCodeGenerator::EmitStringAdd(CallRuntime* expr) {
|
| ZoneList<Expression*>* args = expr->arguments();
|
| ASSERT_EQ(2, args->length());
|
| - if (FLAG_new_string_add) {
|
| - VisitForStackValue(args->at(0));
|
| - VisitForAccumulatorValue(args->at(1));
|
| -
|
| - __ pop(a1);
|
| - __ mov(a0, result_register()); // NewStringAddStub requires args in a0, a1.
|
| - NewStringAddStub stub(STRING_ADD_CHECK_BOTH, NOT_TENURED);
|
| - __ CallStub(&stub);
|
| - } else {
|
| - VisitForStackValue(args->at(0));
|
| - VisitForStackValue(args->at(1));
|
| + VisitForStackValue(args->at(0));
|
| + VisitForAccumulatorValue(args->at(1));
|
|
|
| - StringAddStub stub(STRING_ADD_CHECK_BOTH);
|
| - __ CallStub(&stub);
|
| - }
|
| + __ pop(a1);
|
| + __ mov(a0, result_register()); // StringAddStub requires args in a0, a1.
|
| + StringAddStub stub(STRING_ADD_CHECK_BOTH, NOT_TENURED);
|
| + __ CallStub(&stub);
|
| context()->Plug(v0);
|
| }
|
|
|
|
|