mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 00:37:45 +00:00
LibJS: Mark classes and virtual functions final
where possible
These cases were found with GCC's `-Wsuggest-final-{types,methods}` warnings, which catch calls that could have been devirtualized had we declared the functions `final` in the source. To reproduce, Link Time Optimization needs to be enabled. The easiest way to achieve this is to set the `CMAKE_INTERPROCEDURAL_OPTIMIZATION` cache variable to `ON`. The `.incbin` directive in LibCompress' Brotli decompressor might needs to be changed to an absolute path for this to work. This commit also removes a pair of unused virtual functions.
This commit is contained in:
parent
72c9f56c66
commit
65232b6681
9 changed files with 17 additions and 20 deletions
|
@ -63,8 +63,6 @@ protected:
|
|||
virtual void visit_edges(Visitor&) override;
|
||||
|
||||
private:
|
||||
virtual bool is_environment() const final { return true; }
|
||||
|
||||
bool m_permanently_screwed_by_eval { false };
|
||||
|
||||
GCPtr<Environment> m_outer_environment;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue