Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(795)

Unified Diff: src/mips64/builtins-mips64.cc

Issue 1696043002: [runtime] Unify and simplify how frames are marked (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix merge problems Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/mips64/builtins-mips64.cc
diff --git a/src/mips64/builtins-mips64.cc b/src/mips64/builtins-mips64.cc
index 7090793f41aa73a06151e786a749dc99deb3cda0..0c191fbab7c64d9c6201a4da93173853f3820dfe 100644
--- a/src/mips64/builtins-mips64.cc
+++ b/src/mips64/builtins-mips64.cc
@@ -528,6 +528,7 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm,
// -- a1 : constructor function
// -- a2 : allocation site or undefined
// -- a3 : new target
+ // -- cp : context
// -- ra : return address
// -- sp[...]: constructor arguments
// -----------------------------------
@@ -541,7 +542,7 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm,
// Preserve the incoming parameters on the stack.
__ AssertUndefinedOrAllocationSite(a2, t0);
__ SmiTag(a0);
- __ Push(a2, a0);
+ __ Push(cp, a2, a0);
if (create_implicit_receiver) {
__ Push(a1, a3);
@@ -612,7 +613,7 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm,
}
// Restore context from the frame.
- __ ld(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
+ __ ld(cp, MemOperand(fp, ConstructFrameConstants::kContextOffset));
if (create_implicit_receiver) {
// If the result is an object (in the ECMA sense), we should get rid
@@ -743,8 +744,6 @@ static void Generate_JSEntryTrampolineHelper(MacroAssembler* masm,
// -- s0: argv
// -----------------------------------
ProfileEntryHookStub::MaybeCallEntryHook(masm);
- // Clear the context before we push it when entering the JS frame.
- __ mov(cp, zero_reg);
// Enter an internal frame.
{
@@ -839,9 +838,7 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) {
// MANUAL indicates that the scope shouldn't actually generate code to set up
// the frame (that is done below).
FrameScope frame_scope(masm, StackFrame::MANUAL);
-
- __ Push(ra, fp, cp, a1);
- __ Daddu(fp, sp, Operand(StandardFrameConstants::kFixedFrameSizeFromFp));
+ __ PushStandardFrame(a1);
// Get the bytecode array from the function object and load the pointer to the
// first entry into kInterpreterBytecodeRegister.
@@ -1197,8 +1194,7 @@ void Builtins::Generate_MarkCodeAsExecutedOnce(MacroAssembler* masm) {
__ MultiPop(saved_regs);
// Perform prologue operations usually performed by the young code stub.
- __ Push(ra, fp, cp, a1);
- __ Daddu(fp, sp, Operand(StandardFrameConstants::kFixedFrameSizeFromFp));
+ __ PushStandardFrame(a1);
// Jump to point after the code-age stub.
__ Daddu(a0, a0, Operand((kNoCodeAgeSequenceLength)));
@@ -1967,7 +1963,8 @@ void PrepareForTailCall(MacroAssembler* masm, Register args_reg,
// Drop possible interpreter handler/stub frame.
{
Label no_interpreter_frame;
- __ ld(scratch3, MemOperand(fp, StandardFrameConstants::kMarkerOffset));
+ __ ld(scratch3,
+ MemOperand(fp, CommonFrameConstants::kContextOrFrameTypeOffset));
__ Branch(&no_interpreter_frame, ne, scratch3,
Operand(Smi::FromInt(StackFrame::STUB)));
__ ld(fp, MemOperand(fp, StandardFrameConstants::kCallerFPOffset));
@@ -1978,7 +1975,8 @@ void PrepareForTailCall(MacroAssembler* masm, Register args_reg,
Register caller_args_count_reg = scratch1;
Label no_arguments_adaptor, formal_parameter_count_loaded;
__ ld(scratch2, MemOperand(fp, StandardFrameConstants::kCallerFPOffset));
- __ ld(scratch3, MemOperand(scratch2, StandardFrameConstants::kContextOffset));
+ __ ld(scratch3,
+ MemOperand(scratch2, CommonFrameConstants::kContextOrFrameTypeOffset));
__ Branch(&no_arguments_adaptor, ne, scratch3,
Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR)));
@@ -1991,7 +1989,8 @@ void PrepareForTailCall(MacroAssembler* masm, Register args_reg,
__ bind(&no_arguments_adaptor);
// Load caller's formal parameter count
- __ ld(scratch1, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset));
+ __ ld(scratch1,
+ MemOperand(fp, ArgumentsAdaptorFrameConstants::kFunctionOffset));
__ ld(scratch1,
FieldMemOperand(scratch1, JSFunction::kSharedFunctionInfoOffset));
__ lw(caller_args_count_reg,

Powered by Google App Engine
This is Rietveld 408576698