summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibMarkdown/Heading.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-06-04 12:07:38 +0200
committerAndreas Kling <kling@serenityos.org>2021-06-07 18:11:59 +0200
commit6ae9346cd39bf6fb01a971dea85159cdd842cece (patch)
treeabf6412c7b9ec171f9551a243b64dece444c4f1b /Userland/Libraries/LibMarkdown/Heading.cpp
parent91640d0727e6a4d9ff24417909e02d77547c89df (diff)
downloadserenity-6ae9346cd39bf6fb01a971dea85159cdd842cece.zip
LibJS: Add basic support for while loops in the bytecode engine
This introduces two new instructions: Jump and JumpIfFalse. Jumps are made to a Bytecode::Label, which is a simple object that represents a location in the bytecode stream. Note that you may not always know the target of a jump when adding the jump instruction itself, but we can just update the instruction later on during codegen once we know where the jump target is. The Bytecode::Interpreter now implements jumping via a jump slot that gets checked after each instruction to see if a jump is pending. If not, we just increment the PC as usual.
Diffstat (limited to 'Userland/Libraries/LibMarkdown/Heading.cpp')
0 files changed, 0 insertions, 0 deletions