mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 11:49:44 +00:00
LibJS: Add placeholder bytecode block sealing mechanism
After compiling bytecode, we should mark the memory read-only. This currently does not work because it breaks instruction destruction. I'm adding this anyway with a FIXME so we don't forget about it. :^)
This commit is contained in:
parent
4ba2eb8fe5
commit
312297ac38
Notes:
sideshowbarker
2024-07-18 12:41:39 +09:00
Author: https://github.com/awesomekling
Commit: 312297ac38
3 changed files with 9 additions and 0 deletions
|
@ -28,6 +28,7 @@ OwnPtr<Block> Generator::generate(ASTNode const& node)
|
|||
Generator generator;
|
||||
[[maybe_unused]] auto dummy = node.generate_bytecode(generator);
|
||||
generator.m_block->set_register_count({}, generator.m_next_register);
|
||||
generator.m_block->seal();
|
||||
return move(generator.m_block);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue