| Index: src/mips/lithium-codegen-mips.cc
|
| diff --git a/src/mips/lithium-codegen-mips.cc b/src/mips/lithium-codegen-mips.cc
|
| index 02eb26903ef498b483668e009aec28e1a548b0bb..ac8c04a49debda1aa7037fa0c0f434f00ddee8a0 100644
|
| --- a/src/mips/lithium-codegen-mips.cc
|
| +++ b/src/mips/lithium-codegen-mips.cc
|
| @@ -1936,12 +1936,12 @@ void LCodeGen::DoArithmeticD(LArithmeticD* instr) {
|
| __ MultiPush(saved_regs);
|
|
|
| __ PrepareCallCFunction(0, 2, scratch0());
|
| - __ SetCallCDoubleArguments(left, right);
|
| + __ MovToFloatParameters(left, right);
|
| __ CallCFunction(
|
| ExternalReference::mod_two_doubles_operation(isolate()),
|
| 0, 2);
|
| // Move the result in the double result register.
|
| - __ GetCFunctionDoubleResult(result);
|
| + __ MovFromFloatResult(result);
|
|
|
| // Restore saved register.
|
| __ MultiPop(saved_regs);
|
| @@ -2815,10 +2815,9 @@ void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
|
| ASSERT(ToRegister(instr->result()).is(v0));
|
|
|
| __ li(a2, Operand(instr->name()));
|
| - RelocInfo::Mode mode = instr->for_typeof() ? RelocInfo::CODE_TARGET
|
| - : RelocInfo::CODE_TARGET_CONTEXT;
|
| - Handle<Code> ic = isolate()->builtins()->LoadIC_Initialize();
|
| - CallCode(ic, mode, instr);
|
| + ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL;
|
| + Handle<Code> ic = LoadIC::initialize_stub(isolate(), mode);
|
| + CallCode(ic, RelocInfo::CODE_TARGET, instr);
|
| }
|
|
|
|
|
| @@ -2853,10 +2852,10 @@ void LCodeGen::DoStoreGlobalGeneric(LStoreGlobalGeneric* instr) {
|
| ASSERT(ToRegister(instr->value()).is(a0));
|
|
|
| __ li(a2, Operand(instr->name()));
|
| - Handle<Code> ic = (instr->strict_mode_flag() == kStrictMode)
|
| - ? isolate()->builtins()->StoreIC_Initialize_Strict()
|
| - : isolate()->builtins()->StoreIC_Initialize();
|
| - CallCode(ic, RelocInfo::CODE_TARGET_CONTEXT, instr);
|
| + Handle<Code> ic = StoreIC::initialize_stub(isolate(),
|
| + instr->strict_mode_flag(),
|
| + CONTEXTUAL);
|
| + CallCode(ic, RelocInfo::CODE_TARGET, instr);
|
| }
|
|
|
|
|
| @@ -2953,7 +2952,7 @@ void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) {
|
|
|
| // Name is always in a2.
|
| __ li(a2, Operand(instr->name()));
|
| - Handle<Code> ic = isolate()->builtins()->LoadIC_Initialize();
|
| + Handle<Code> ic = LoadIC::initialize_stub(isolate(), NOT_CONTEXTUAL);
|
| CallCode(ic, RelocInfo::CODE_TARGET, instr);
|
| }
|
|
|
| @@ -3371,11 +3370,8 @@ void LCodeGen::DoWrapReceiver(LWrapReceiver* instr) {
|
| __ Branch(&result_in_receiver);
|
|
|
| __ bind(&global_object);
|
| + CallStubCompiler::FetchGlobalProxy(masm(), receiver, function);
|
|
|
| - __ lw(result, MemOperand(fp, StandardFrameConstants::kContextOffset));
|
| - __ lw(result, ContextOperand(result, Context::GLOBAL_OBJECT_INDEX));
|
| - __ lw(result,
|
| - FieldMemOperand(result, JSGlobalObject::kGlobalReceiverOffset));
|
| if (result.is(receiver)) {
|
| __ bind(&result_in_receiver);
|
| } else {
|
| @@ -3860,10 +3856,10 @@ void LCodeGen::DoMathExp(LMathExp* instr) {
|
|
|
| void LCodeGen::DoMathLog(LMathLog* instr) {
|
| __ PrepareCallCFunction(0, 1, scratch0());
|
| - __ SetCallCDoubleArguments(ToDoubleRegister(instr->value()));
|
| + __ MovToFloatParameter(ToDoubleRegister(instr->value()));
|
| __ CallCFunction(ExternalReference::math_log_double_function(isolate()),
|
| 0, 1);
|
| - __ GetCFunctionDoubleResult(ToDoubleRegister(instr->result()));
|
| + __ MovFromFloatResult(ToDoubleRegister(instr->result()));
|
| }
|
|
|
|
|
| @@ -3905,11 +3901,10 @@ void LCodeGen::DoCallNamed(LCallNamed* instr) {
|
| ASSERT(ToRegister(instr->result()).is(v0));
|
|
|
| int arity = instr->arity();
|
| - RelocInfo::Mode mode = RelocInfo::CODE_TARGET;
|
| Handle<Code> ic =
|
| - isolate()->stub_cache()->ComputeCallInitialize(arity, mode);
|
| + isolate()->stub_cache()->ComputeCallInitialize(arity, NOT_CONTEXTUAL);
|
| __ li(a2, Operand(instr->name()));
|
| - CallCode(ic, mode, instr);
|
| + CallCode(ic, RelocInfo::CODE_TARGET, instr);
|
| }
|
|
|
|
|
| @@ -3919,7 +3914,10 @@ void LCodeGen::DoCallFunction(LCallFunction* instr) {
|
| ASSERT(ToRegister(instr->result()).is(v0));
|
|
|
| int arity = instr->arity();
|
| - CallFunctionStub stub(arity, NO_CALL_FUNCTION_FLAGS);
|
| + CallFunctionFlags flags =
|
| + instr->hydrogen()->IsContextualCall() ?
|
| + RECEIVER_IS_IMPLICIT : NO_CALL_FUNCTION_FLAGS;
|
| + CallFunctionStub stub(arity, flags);
|
| if (instr->hydrogen()->IsTailCall()) {
|
| if (NeedsEagerFrame()) __ mov(sp, fp);
|
| __ Jump(stub.GetCode(isolate()), RelocInfo::CODE_TARGET);
|
| @@ -3934,11 +3932,10 @@ void LCodeGen::DoCallGlobal(LCallGlobal* instr) {
|
| ASSERT(ToRegister(instr->result()).is(v0));
|
|
|
| int arity = instr->arity();
|
| - RelocInfo::Mode mode = RelocInfo::CODE_TARGET_CONTEXT;
|
| Handle<Code> ic =
|
| - isolate()->stub_cache()->ComputeCallInitialize(arity, mode);
|
| + isolate()->stub_cache()->ComputeCallInitialize(arity, CONTEXTUAL);
|
| __ li(a2, Operand(instr->name()));
|
| - CallCode(ic, mode, instr);
|
| + CallCode(ic, RelocInfo::CODE_TARGET, instr);
|
| }
|
|
|
|
|
| @@ -3979,10 +3976,9 @@ void LCodeGen::DoCallNewArray(LCallNewArray* instr) {
|
| (AllocationSite::GetMode(kind) == TRACK_ALLOCATION_SITE)
|
| ? DISABLE_ALLOCATION_SITES
|
| : DONT_OVERRIDE;
|
| - ContextCheckMode context_mode = CONTEXT_CHECK_NOT_REQUIRED;
|
|
|
| if (instr->arity() == 0) {
|
| - ArrayNoArgumentConstructorStub stub(kind, context_mode, override_mode);
|
| + ArrayNoArgumentConstructorStub stub(kind, override_mode);
|
| CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr);
|
| } else if (instr->arity() == 1) {
|
| Label done;
|
| @@ -3994,18 +3990,17 @@ void LCodeGen::DoCallNewArray(LCallNewArray* instr) {
|
| __ Branch(&packed_case, eq, t1, Operand(zero_reg));
|
|
|
| ElementsKind holey_kind = GetHoleyElementsKind(kind);
|
| - ArraySingleArgumentConstructorStub stub(holey_kind, context_mode,
|
| - override_mode);
|
| + ArraySingleArgumentConstructorStub stub(holey_kind, override_mode);
|
| CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr);
|
| __ jmp(&done);
|
| __ bind(&packed_case);
|
| }
|
|
|
| - ArraySingleArgumentConstructorStub stub(kind, context_mode, override_mode);
|
| + ArraySingleArgumentConstructorStub stub(kind, override_mode);
|
| CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr);
|
| __ bind(&done);
|
| } else {
|
| - ArrayNArgumentsConstructorStub stub(kind, context_mode, override_mode);
|
| + ArrayNArgumentsConstructorStub stub(kind, override_mode);
|
| CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr);
|
| }
|
| }
|
| @@ -4135,9 +4130,9 @@ void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) {
|
|
|
| // Name is always in a2.
|
| __ li(a2, Operand(instr->name()));
|
| - Handle<Code> ic = (instr->strict_mode_flag() == kStrictMode)
|
| - ? isolate()->builtins()->StoreIC_Initialize_Strict()
|
| - : isolate()->builtins()->StoreIC_Initialize();
|
| + Handle<Code> ic = StoreIC::initialize_stub(isolate(),
|
| + instr->strict_mode_flag(),
|
| + NOT_CONTEXTUAL);
|
| CallCode(ic, RelocInfo::CODE_TARGET, instr);
|
| }
|
|
|
|
|