mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 20:29:18 +00:00
LibJS: Remeber which instruction terminated a block
This commit is contained in:
parent
8c4717fc6e
commit
192897c269
Notes:
sideshowbarker
2024-07-17 11:29:41 +09:00
Author: https://github.com/Hendiadyoin1
Commit: 192897c269
Pull-request: https://github.com/SerenityOS/serenity/pull/15971
Reviewed-by: https://github.com/FireFox317
Reviewed-by: https://github.com/alimpfard
Reviewed-by: https://github.com/kleinesfilmroellchen ✅
2 changed files with 6 additions and 5 deletions
|
@ -57,7 +57,7 @@ public:
|
|||
grow(sizeof(OpType));
|
||||
new (slot) OpType(forward<Args>(args)...);
|
||||
if constexpr (OpType::IsTerminator)
|
||||
m_current_basic_block->terminate({});
|
||||
m_current_basic_block->terminate({}, static_cast<Instruction const*>(slot));
|
||||
return *static_cast<OpType*>(slot);
|
||||
}
|
||||
|
||||
|
@ -76,7 +76,7 @@ public:
|
|||
grow(size_to_allocate);
|
||||
new (slot) OpType(forward<Args>(args)...);
|
||||
if constexpr (OpType::IsTerminator)
|
||||
m_current_basic_block->terminate({});
|
||||
m_current_basic_block->terminate({}, static_cast<Instruction const*>(slot));
|
||||
return *static_cast<OpType*>(slot);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue