diff options
author | Ali Mohammad Pur <ali.mpfard@gmail.com> | 2021-06-13 20:40:20 +0430 |
---|---|---|
committer | Ali Mohammad Pur <Ali.mpfard@gmail.com> | 2021-06-15 22:06:33 +0430 |
commit | 1414c7b049c5a8858f400a5e677cd20894463b32 (patch) | |
tree | 3b5255b2688222739f515819bed19c982a45baca /Userland/Libraries/LibJS/Bytecode/BasicBlock.cpp | |
parent | e81fd7106b47d93345e11059bb80600a66b4daf3 (diff) | |
download | serenity-1414c7b049c5a8858f400a5e677cd20894463b32.zip |
LibJS: Add a basic pass manager and add some basic passes
This commit adds a bunch of passes, the most interesting of which is a
pass that merges blocks together, and a pass that places blocks that
flow into each other next to each other, and a very simply pass that
removes duplicate basic blocks.
Note that this does not remove the jump at the end of each block in that
pass to avoid scope creep in the passes.
Diffstat (limited to 'Userland/Libraries/LibJS/Bytecode/BasicBlock.cpp')
-rw-r--r-- | Userland/Libraries/LibJS/Bytecode/BasicBlock.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Userland/Libraries/LibJS/Bytecode/BasicBlock.cpp b/Userland/Libraries/LibJS/Bytecode/BasicBlock.cpp index 0182d4412f..8bac7aa06a 100644 --- a/Userland/Libraries/LibJS/Bytecode/BasicBlock.cpp +++ b/Userland/Libraries/LibJS/Bytecode/BasicBlock.cpp @@ -66,6 +66,7 @@ void BasicBlock::grow(size_t additional_size) void InstructionStreamIterator::operator++() { + VERIFY(!at_end()); m_offset += dereference().length(); } |