[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 <delphick@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64835}
This commit is contained in:
Dan Elphick 2019-11-07 11:39:41 +00:00 committed by Commit Bot
parent 07f26fc606
commit db7140229c

View File

@ -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;