diff options
author | Matthew Olsson <matthewcolsson@gmail.com> | 2021-06-08 14:46:46 -0700 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-06-09 00:37:17 +0200 |
commit | a01bd35c67e35e9f0e33f46bb3a4431e49af1b60 (patch) | |
tree | 721d4cbfdc307afe03122d4509ea173313f09016 /AK/String.cpp | |
parent | 83be39c91aeff53c5dfd158844e8ad73f10ae9d2 (diff) | |
download | serenity-a01bd35c67e35e9f0e33f46bb3a4431e49af1b60.zip |
LibJS: Add bytecode instruction handles
This change removes the mmap inside of Block in favor of a growing
vector of bytes. This is favorable for two reasons:
- We don't take more space than we need
- There is no limit to the growth of the vector (previously, if
the Block overstepped its 64kb boundary, it would just crash)
However, if that vector happens to resize, any pointer pointing into
that vector would become invalid. To avoid this, this commit adds an
InstructionHandle<Op> class which just stores a block and an offset
into that block.
Diffstat (limited to 'AK/String.cpp')
0 files changed, 0 insertions, 0 deletions