mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-08 06:09:58 +00:00
LibJS: Stop worrying about Instruction destructors
By adding static_asserts to prove that all of our generated instruction classes are trivially destructible, we can confidently remove the destructor walk in BasicBlock and save ourselves some unnecessary work.
This commit is contained in:
parent
370b81f1b7
commit
f37063e2a1
Notes:
github-actions[bot]
2025-11-21 08:47:34 +00:00
Author: https://github.com/awesomekling
Commit: f37063e2a1
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6888
4 changed files with 2 additions and 27 deletions
|
|
@ -322,6 +322,7 @@ def generate_class(op: OpDef) -> str:
|
|||
lines.append(f" {f.type} {f.name};")
|
||||
|
||||
lines.append("};")
|
||||
lines.append(f"static_assert(IsTriviallyDestructible<{op.name}>);")
|
||||
return "\n".join(lines)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue