[perf/base-class-macro] Skip classes with inline constructors - #525
Merged
AbnormalPoof merged 1 commit intoOct 4, 2026
Merged
AbnormalPoof merged 1 commit into
AbnormalPoof merged 1 commit into
Conversation
These classes are generally used as simple data containers (like Vectors and Matrices)
perf/base-class-macro] Don't make classes with inline constructors scriptableperf/base-class-macro] Skip classes with inline constructors
AbnormalPoof
merged commit Oct 4, 2026
021e02f
into
FunkinCrew:perf/base-class-macro
9 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This should fix the failure on the Heaps library, as throughout its code lies uses of inlined constructor calls (
inline new Foo()) for certain classes.The fix involves making the macro skip classes that have an
inlineconstructor, as that often means the class itself is stripped away in compile-time and transformed into variables; this does mean that there's a caveat: an enforced inline constructor call could still fail if the class it's trying to inline doesn't have a constructor that in itself is notinline.Note
I know
ClassTypehas aconstructorfield. So why not use it, instead of having to useLambda.find? Apparently since a class has not been fully built when the macro reaches it, theconstructorfield is always empty, making it useless in this case.This means the following classes would now be no longer scriptable: