[JSC] Remove gcc warnings on mips and armv7
[WebKit-https.git] / Source / JavaScriptCore / bytecode / CodeBlock.h
index 3962576..2dd1fab 100644 (file)
@@ -1048,7 +1048,7 @@ inline Register& ExecState::uncheckedR(VirtualRegister reg)
 }
 
 template <typename ExecutableType>
-JSObject* ScriptExecutable::prepareForExecution(VM& vm, JSFunction* function, JSScope* scope, CodeSpecializationKind kind, CodeBlock*& resultCodeBlock)
+std::optional<Exception*> ScriptExecutable::prepareForExecution(VM& vm, JSFunction* function, JSScope* scope, CodeSpecializationKind kind, CodeBlock*& resultCodeBlock)
 {
     if (hasJITCodeFor(kind)) {
         if (std::is_same<ExecutableType, EvalExecutable>::value)
@@ -1061,7 +1061,7 @@ JSObject* ScriptExecutable::prepareForExecution(VM& vm, JSFunction* function, JS
             resultCodeBlock = jsCast<CodeBlock*>(jsCast<FunctionExecutable*>(this)->codeBlockFor(kind));
         else
             RELEASE_ASSERT_NOT_REACHED();
-        return nullptr;
+        return std::nullopt;
     }
     return prepareForExecutionImpl(vm, function, scope, kind, resultCodeBlock);
 }