Ruby: add API node representing a module/class object#12841
Merged
asgerf merged 5 commits intogithub:mainfrom Apr 21, 2023
Merged
Ruby: add API node representing a module/class object#12841asgerf merged 5 commits intogithub:mainfrom
asgerf merged 5 commits intogithub:mainfrom
Conversation
d45d638 to
b9e3b7b
Compare
b9e3b7b to
8c0c335
Compare
hvitved
approved these changes
Apr 20, 2023
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.
Adds a new kind of API node,
MkModuleObjectto represent a module/class object, (MkModuleInstanceis coming in a future PR).This also refactors the generation of subclass edge so that subclass edges target the
MkModuleObjectnode. Theusepredicate associates uses with aMkModuleObject. (This is similar to howMkClassInstanceworks in JS)This is a mostly semantics-preserving change, except we now perform a
trackUseNodestep to the subclass edge generation.Also contains a bugfix in
DataFlow::ModuleNode.getAnImmediateReferencethat was needed to associateMkModuleObjectto its uses.Evaluation shows good performance and 3 new sinks (which are due to the addition of
trackUseNodementioned above).