diff --git a/Userland/Libraries/LibJS/Bytecode/Interpreter.cpp b/Userland/Libraries/LibJS/Bytecode/Interpreter.cpp index 8a2a062049..b100662002 100644 --- a/Userland/Libraries/LibJS/Bytecode/Interpreter.cpp +++ b/Userland/Libraries/LibJS/Bytecode/Interpreter.cpp @@ -508,22 +508,22 @@ static ThrowCompletionOr put_by_property_key(VM& vm, Value base, Value thi return {}; } -ThrowCompletionOr Load::execute_impl(Bytecode::Interpreter& interpreter) const +ThrowCompletionOr Load::execute_impl(Bytecode::Interpreter&) const { - interpreter.accumulator() = interpreter.reg(m_src); - return {}; + // Handled in the interpreter loop. + __builtin_unreachable(); } -ThrowCompletionOr LoadImmediate::execute_impl(Bytecode::Interpreter& interpreter) const +ThrowCompletionOr LoadImmediate::execute_impl(Bytecode::Interpreter&) const { - interpreter.accumulator() = m_value; - return {}; + // Handled in the interpreter loop. + __builtin_unreachable(); } -ThrowCompletionOr Store::execute_impl(Bytecode::Interpreter& interpreter) const +ThrowCompletionOr Store::execute_impl(Bytecode::Interpreter&) const { - interpreter.reg(m_dst) = interpreter.accumulator(); - return {}; + // Handled in the interpreter loop. + __builtin_unreachable(); } static ThrowCompletionOr abstract_inequals(VM& vm, Value src1, Value src2) @@ -930,15 +930,10 @@ ThrowCompletionOr GetGlobal::execute_impl(Bytecode::Interpreter& interpret return vm.throw_completion(ErrorType::UnknownIdentifier, name); } -ThrowCompletionOr GetLocal::execute_impl(Bytecode::Interpreter& interpreter) const +ThrowCompletionOr GetLocal::execute_impl(Bytecode::Interpreter&) const { - auto& vm = interpreter.vm(); - if (vm.running_execution_context().local_variables[m_index].is_empty()) { - auto const& variable_name = vm.running_execution_context().function->local_variables_names()[m_index]; - return interpreter.vm().throw_completion(ErrorType::BindingNotInitialized, variable_name); - } - interpreter.accumulator() = vm.running_execution_context().local_variables[m_index]; - return {}; + // Handled in the interpreter loop. + __builtin_unreachable(); } ThrowCompletionOr DeleteVariable::execute_impl(Bytecode::Interpreter& interpreter) const @@ -1020,10 +1015,10 @@ ThrowCompletionOr SetVariable::execute_impl(Bytecode::Interpreter& interpr return {}; } -ThrowCompletionOr SetLocal::execute_impl(Bytecode::Interpreter& interpreter) const +ThrowCompletionOr SetLocal::execute_impl(Bytecode::Interpreter&) const { - interpreter.vm().running_execution_context().local_variables[m_index] = interpreter.accumulator(); - return {}; + // Handled in the interpreter loop. + __builtin_unreachable(); } static ThrowCompletionOr> base_object_for_get(Bytecode::Interpreter& interpreter, Value base_value) @@ -1179,7 +1174,7 @@ ThrowCompletionOr DeleteByIdWithThis::execute_impl(Bytecode::Interpreter& ThrowCompletionOr Jump::execute_impl(Bytecode::Interpreter&) const { // Handled in the interpreter loop. - VERIFY_NOT_REACHED(); + __builtin_unreachable(); } ThrowCompletionOr ResolveThisBinding::execute_impl(Bytecode::Interpreter& interpreter) const @@ -1227,19 +1222,19 @@ ThrowCompletionOr GetImportMeta::execute_impl(Bytecode::Interpreter& inter ThrowCompletionOr JumpConditional::execute_impl(Bytecode::Interpreter&) const { // Handled in the interpreter loop. - VERIFY_NOT_REACHED(); + __builtin_unreachable(); } ThrowCompletionOr JumpNullish::execute_impl(Bytecode::Interpreter&) const { // Handled in the interpreter loop. - VERIFY_NOT_REACHED(); + __builtin_unreachable(); } ThrowCompletionOr JumpUndefined::execute_impl(Bytecode::Interpreter&) const { // Handled in the interpreter loop. - VERIFY_NOT_REACHED(); + __builtin_unreachable(); } // 13.3.8.1 https://tc39.es/ecma262/#sec-runtime-semantics-argumentlistevaluation @@ -1460,13 +1455,13 @@ ThrowCompletionOr ThrowIfNullish::execute_impl(Bytecode::Interpreter& inte ThrowCompletionOr EnterUnwindContext::execute_impl(Bytecode::Interpreter&) const { // Handled in the interpreter loop. - VERIFY_NOT_REACHED(); + __builtin_unreachable(); } ThrowCompletionOr ScheduleJump::execute_impl(Bytecode::Interpreter&) const { // Handled in the interpreter loop. - VERIFY_NOT_REACHED(); + __builtin_unreachable(); } ThrowCompletionOr LeaveLexicalEnvironment::execute_impl(Bytecode::Interpreter& interpreter) const @@ -1484,7 +1479,7 @@ ThrowCompletionOr LeaveUnwindContext::execute_impl(Bytecode::Interpreter& ThrowCompletionOr ContinuePendingUnwind::execute_impl(Bytecode::Interpreter&) const { // Handled in the interpreter loop. - VERIFY_NOT_REACHED(); + __builtin_unreachable(); } ThrowCompletionOr PushDeclarativeEnvironment::execute_impl(Bytecode::Interpreter& interpreter) const