From db7140229c06910f3f022c15d5e21c5b1c5e1bd2 Mon Sep 17 00:00:00 2001 From: Dan Elphick Date: Thu, 7 Nov 2019 11:39:41 +0000 Subject: [PATCH] [builtins] Make CEntry builtin Code objects non-executable Make every CEntry_* builtin except CEntry_Return1_DontSaveFPRegs_ArgvOnStack_NoBuiltinExit non-executable since they don't seem to be needed. The remaining one is still required until Linkage::GetCEntryStubCallDescriptor is converted to use CallBuiltinPointer. Bug: v8:9338 Change-Id: Id1fcad95958ec3299328f7ed0e322ff2f766cfd4 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1897540 Commit-Queue: Dan Elphick Reviewed-by: Jakob Gruber Cr-Commit-Position: refs/heads/master@{#64835} --- src/builtins/builtins.cc | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/builtins/builtins.cc b/src/builtins/builtins.cc index 82885a44a6..e33683ac03 100644 --- a/src/builtins/builtins.cc +++ b/src/builtins/builtins.cc @@ -454,16 +454,6 @@ bool Builtins::CodeObjectIsExecutable(int builtin_index) { case Builtins::kInterpreterEntryTrampoline: case Builtins::kCompileLazy: case Builtins::kCompileLazyDeoptimizedCode: - case Builtins::kCEntry_Return1_DontSaveFPRegs_ArgvOnStack_NoBuiltinExit: - case Builtins::kCEntry_Return1_DontSaveFPRegs_ArgvOnStack_BuiltinExit: - case Builtins::kCEntry_Return1_DontSaveFPRegs_ArgvInRegister_NoBuiltinExit: - case Builtins::kCEntry_Return1_SaveFPRegs_ArgvOnStack_NoBuiltinExit: - case Builtins::kCEntry_Return1_SaveFPRegs_ArgvOnStack_BuiltinExit: - case Builtins::kCEntry_Return2_DontSaveFPRegs_ArgvOnStack_NoBuiltinExit: - case Builtins::kCEntry_Return2_DontSaveFPRegs_ArgvOnStack_BuiltinExit: - case Builtins::kCEntry_Return2_DontSaveFPRegs_ArgvInRegister_NoBuiltinExit: - case Builtins::kCEntry_Return2_SaveFPRegs_ArgvOnStack_NoBuiltinExit: - case Builtins::kCEntry_Return2_SaveFPRegs_ArgvOnStack_BuiltinExit: case Builtins::kCallFunction_ReceiverIsNullOrUndefined: case Builtins::kCallFunction_ReceiverIsNotNullOrUndefined: case Builtins::kCallFunction_ReceiverIsAny: @@ -474,6 +464,10 @@ bool Builtins::CodeObjectIsExecutable(int builtin_index) { case Builtins::kArgumentsAdaptorTrampoline: case Builtins::kHandleApiCall: case Builtins::kInstantiateAsmJs: + + // TODO(delphick): Remove this when calls to it have the trampoline inlined + // or are converted to use kCallBuiltinPointer. + case Builtins::kCEntry_Return1_DontSaveFPRegs_ArgvOnStack_NoBuiltinExit: return true; default: return false;