-
Notifications
You must be signed in to change notification settings - Fork 278
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[rubysrc2cpg] Enhancing TypeDecl implementation #3358
[rubysrc2cpg] Enhancing TypeDecl implementation #3358
Conversation
…emraj/methodAndCallInSameFile
…emraj/methodAndCallInSameFile
…emraj/methodAndCallInSameFile
…emraj/fixingClassInstanceCalls
@@ -36,6 +86,10 @@ trait AstCreatorHelper { this: AstCreator => | |||
usedVariableNames.put(variableName, counter) | |||
currentVariableName | |||
} | |||
|
|||
protected def addReceiverEdge(dstNode: nodes.NewNode, srcNode: nodes.NewNode): Unit = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something like this exists in the Ast()
class already
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will remove this code as anyways we are not using this function anywhere in ruby
case _: SimpleMethodNamePartContext if !classStack.top.endsWith(":program") => | ||
val thisParameterNode = createMethodParameterIn( | ||
"this", | ||
typeFullName = callNode.methodFullName, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this call node refer to the :program
method?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, the call node refers to methodDefinition. We use the information from the callNode and discard it
Basically here for any methodDefinition encountered we are categorizing the whether they are class method or instance method
…emraj/fixingClassInstanceCalls
@DavidBakerEffendi Have made the requested changes |
The PR contains the following
this
parameter as the parameter with index 0, which help in tracking and linking dataflow for instance variablesindex
andorder
valuescc - @fabsx00 @DavidBakerEffendi