mirror of
https://github.com/SerenityOS/serenity
synced 2026-05-05 22:52:10 +02:00
LibJS: Deduplicate scoped continue & break bytecode generation
The only two differences between these two functions are the name of the block that is created and the specific jump/break handling per boundary.
This commit is contained in:
committed by
Andreas Kling
parent
c4bad2186f
commit
663e4507ea
@@ -212,6 +212,12 @@ public:
|
||||
[[nodiscard]] size_t next_global_variable_cache() { return m_next_global_variable_cache++; }
|
||||
|
||||
private:
|
||||
enum class JumpType {
|
||||
Continue,
|
||||
Break,
|
||||
};
|
||||
void generate_scoped_jump(JumpType);
|
||||
|
||||
Generator();
|
||||
~Generator() = default;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user