mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-29 15:58:47 +00:00
LibJS: Remove unused members from EnterUnwindContext instruction
This commit is contained in:
parent
b6435ca280
commit
298dfa96a4
Notes:
sideshowbarker
2024-07-17 09:37:30 +09:00
Author: https://github.com/awesomekling
Commit: 298dfa96a4
Pull-request: https://github.com/SerenityOS/serenity/pull/21905
3 changed files with 3 additions and 11 deletions
|
@ -2397,7 +2397,7 @@ Bytecode::CodeGenerationErrorOr<void> TryStatement::generate_bytecode(Bytecode::
|
||||||
|
|
||||||
auto& target_block = generator.make_block();
|
auto& target_block = generator.make_block();
|
||||||
generator.switch_to_basic_block(saved_block);
|
generator.switch_to_basic_block(saved_block);
|
||||||
generator.emit<Bytecode::Op::EnterUnwindContext>(Bytecode::Label { target_block }, handler_target, finalizer_target);
|
generator.emit<Bytecode::Op::EnterUnwindContext>(Bytecode::Label { target_block });
|
||||||
generator.start_boundary(Bytecode::Generator::BlockBoundaryType::Unwind);
|
generator.start_boundary(Bytecode::Generator::BlockBoundaryType::Unwind);
|
||||||
if (m_finalizer)
|
if (m_finalizer)
|
||||||
generator.start_boundary(Bytecode::Generator::BlockBoundaryType::ReturnToFinally);
|
generator.start_boundary(Bytecode::Generator::BlockBoundaryType::ReturnToFinally);
|
||||||
|
|
|
@ -1572,9 +1572,7 @@ DeprecatedString ThrowIfNullish::to_deprecated_string_impl(Bytecode::Executable
|
||||||
|
|
||||||
DeprecatedString EnterUnwindContext::to_deprecated_string_impl(Bytecode::Executable const&) const
|
DeprecatedString EnterUnwindContext::to_deprecated_string_impl(Bytecode::Executable const&) const
|
||||||
{
|
{
|
||||||
auto handler_string = m_handler_target.has_value() ? DeprecatedString::formatted("{}", *m_handler_target) : "<empty>";
|
return DeprecatedString::formatted("EnterUnwindContext entry:{}", m_entry_point);
|
||||||
auto finalizer_string = m_finalizer_target.has_value() ? DeprecatedString::formatted("{}", *m_finalizer_target) : "<empty>";
|
|
||||||
return DeprecatedString::formatted("EnterUnwindContext handler:{} finalizer:{} entry:{}", handler_string, finalizer_string, m_entry_point);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DeprecatedString ScheduleJump::to_deprecated_string_impl(Bytecode::Executable const&) const
|
DeprecatedString ScheduleJump::to_deprecated_string_impl(Bytecode::Executable const&) const
|
||||||
|
|
|
@ -1192,11 +1192,9 @@ class EnterUnwindContext final : public Instruction {
|
||||||
public:
|
public:
|
||||||
constexpr static bool IsTerminator = true;
|
constexpr static bool IsTerminator = true;
|
||||||
|
|
||||||
EnterUnwindContext(Label entry_point, Optional<Label> handler_target, Optional<Label> finalizer_target)
|
EnterUnwindContext(Label entry_point)
|
||||||
: Instruction(Type::EnterUnwindContext, sizeof(*this))
|
: Instruction(Type::EnterUnwindContext, sizeof(*this))
|
||||||
, m_entry_point(move(entry_point))
|
, m_entry_point(move(entry_point))
|
||||||
, m_handler_target(move(handler_target))
|
|
||||||
, m_finalizer_target(move(finalizer_target))
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1204,13 +1202,9 @@ public:
|
||||||
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
|
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
|
||||||
|
|
||||||
auto& entry_point() const { return m_entry_point; }
|
auto& entry_point() const { return m_entry_point; }
|
||||||
auto& handler_target() const { return m_handler_target; }
|
|
||||||
auto& finalizer_target() const { return m_finalizer_target; }
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Label m_entry_point;
|
Label m_entry_point;
|
||||||
Optional<Label> m_handler_target;
|
|
||||||
Optional<Label> m_finalizer_target;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class ScheduleJump final : public Instruction {
|
class ScheduleJump final : public Instruction {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue