| Index: src/x64/builtins-x64.cc
|
| diff --git a/src/x64/builtins-x64.cc b/src/x64/builtins-x64.cc
|
| index df6acb6f0c02e61a6807cc9cd2df3719b963eff2..2f5e0c1b9634792c4af4480c1c40b3a3eda82218 100644
|
| --- a/src/x64/builtins-x64.cc
|
| +++ b/src/x64/builtins-x64.cc
|
| @@ -627,6 +627,42 @@ CODE_AGE_LIST(DEFINE_CODE_AGE_BUILTIN_GENERATOR)
|
| #undef DEFINE_CODE_AGE_BUILTIN_GENERATOR
|
|
|
|
|
| +void Builtins::Generate_MarkCodeAsExecutedOnce(MacroAssembler* masm) {
|
| + // For now, as in GenerateMakeCodeYoungAgainCommon, we are relying on the fact
|
| + // that make_code_young doesn't do any garbage collection which allows us to
|
| + // save/restore the registers without worrying about which of them contain
|
| + // pointers.
|
| + __ Pushad();
|
| + __ movq(arg_reg_2, ExternalReference::isolate_address(masm->isolate()));
|
| + __ movq(arg_reg_1, Operand(rsp, kNumSafepointRegisters * kPointerSize));
|
| + __ subq(arg_reg_1, Immediate(Assembler::kShortCallInstructionLength));
|
| + { // NOLINT
|
| + FrameScope scope(masm, StackFrame::MANUAL);
|
| + __ PrepareCallCFunction(1);
|
| + __ CallCFunction(
|
| + ExternalReference::get_mark_code_as_executed_function(masm->isolate()),
|
| + 1);
|
| + }
|
| + __ Popad();
|
| +
|
| + // Perform prologue operations usually performed by the young code stub.
|
| + __ pop(r10); // Pop return address into scratch register.
|
| + __ push(rbp); // Caller's frame pointer.
|
| + __ movq(rbp, rsp);
|
| + __ push(rsi); // Callee's context.
|
| + __ push(rdi); // Callee's JS Function.
|
| + __ push(r10); // Push return address after frame prologue.
|
| +
|
| + // Jump to point after the code-age stub.
|
| + __ ret(0);
|
| +}
|
| +
|
| +
|
| +void Builtins::Generate_MarkCodeAsExecutedTwice(MacroAssembler* masm) {
|
| + GenerateMakeCodeYoungAgainCommon(masm);
|
| +}
|
| +
|
| +
|
| void Builtins::Generate_NotifyStubFailure(MacroAssembler* masm) {
|
| // Enter an internal frame.
|
| {
|
|
|