From e7239331fad1f5ebcf9bdfee48d860004b2a3dce Mon Sep 17 00:00:00 2001 From: "balazs.kilvady@imgtec.com" Date: Tue, 28 Oct 2014 15:43:31 +0000 Subject: [PATCH] MIPS: Use shared function info for eval cache key. Port r24927 (244472a) BUG= R=paul.lind@imgtec.com Review URL: https://codereview.chromium.org/681303002 Cr-Commit-Position: refs/heads/master@{#24950} git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24950 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/mips/full-codegen-mips.cc | 12 ++++++++---- src/mips64/full-codegen-mips64.cc | 12 ++++++++---- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/src/mips/full-codegen-mips.cc b/src/mips/full-codegen-mips.cc index 6760b3c..dab0710 100644 --- a/src/mips/full-codegen-mips.cc +++ b/src/mips/full-codegen-mips.cc @@ -2919,13 +2919,16 @@ void FullCodeGenerator::EmitCall(Call* expr, CallICState::CallType call_type) { void FullCodeGenerator::EmitResolvePossiblyDirectEval(int arg_count) { - // t2: copy of the first argument or undefined if it doesn't exist. + // t3: copy of the first argument or undefined if it doesn't exist. if (arg_count > 0) { - __ lw(t2, MemOperand(sp, arg_count * kPointerSize)); + __ lw(t3, MemOperand(sp, arg_count * kPointerSize)); } else { - __ LoadRoot(t2, Heap::kUndefinedValueRootIndex); + __ LoadRoot(t3, Heap::kUndefinedValueRootIndex); } + // t2: the receiver of the enclosing function. + __ lw(t2, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); + // t1: the receiver of the enclosing function. int receiver_offset = 2 + info_->scope()->num_parameters(); __ lw(t1, MemOperand(fp, receiver_offset * kPointerSize)); @@ -2937,8 +2940,9 @@ void FullCodeGenerator::EmitResolvePossiblyDirectEval(int arg_count) { __ li(a1, Operand(Smi::FromInt(scope()->start_position()))); // Do the runtime call. + __ Push(t3); __ Push(t2, t1, t0, a1); - __ CallRuntime(Runtime::kResolvePossiblyDirectEval, 5); + __ CallRuntime(Runtime::kResolvePossiblyDirectEval, 6); } diff --git a/src/mips64/full-codegen-mips64.cc b/src/mips64/full-codegen-mips64.cc index 0aae037..73572b1 100644 --- a/src/mips64/full-codegen-mips64.cc +++ b/src/mips64/full-codegen-mips64.cc @@ -2918,13 +2918,16 @@ void FullCodeGenerator::EmitCall(Call* expr, CallICState::CallType call_type) { void FullCodeGenerator::EmitResolvePossiblyDirectEval(int arg_count) { - // a6: copy of the first argument or undefined if it doesn't exist. + // a7: copy of the first argument or undefined if it doesn't exist. if (arg_count > 0) { - __ ld(a6, MemOperand(sp, arg_count * kPointerSize)); + __ ld(a7, MemOperand(sp, arg_count * kPointerSize)); } else { - __ LoadRoot(a6, Heap::kUndefinedValueRootIndex); + __ LoadRoot(a7, Heap::kUndefinedValueRootIndex); } + // a6: the receiver of the enclosing function. + __ ld(a6, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); + // a5: the receiver of the enclosing function. int receiver_offset = 2 + info_->scope()->num_parameters(); __ ld(a5, MemOperand(fp, receiver_offset * kPointerSize)); @@ -2936,8 +2939,9 @@ void FullCodeGenerator::EmitResolvePossiblyDirectEval(int arg_count) { __ li(a1, Operand(Smi::FromInt(scope()->start_position()))); // Do the runtime call. + __ Push(a7); __ Push(a6, a5, a4, a1); - __ CallRuntime(Runtime::kResolvePossiblyDirectEval, 5); + __ CallRuntime(Runtime::kResolvePossiblyDirectEval, 6); } -- 2.7.4