JS: Add dedicated API graph label for the receiver, instead of parameter -1 #8523
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.
This changes the API graph label representing the receiver of call from
parameter -1toreceiver.The member predicates of
API::Nodeare affected as follows:getParameter(i)no longer has a result fori = -1, previously it returned the receiver.getAParameter()no longer includes the receiver.getLastParameter()no longer returns the receiver when the call has zero arguments. (In theory this is not a behaviour-preserving change, but in practice it doesn't change much:
getParameter(i)outsideApiGraphs.qll, all of them unaffected due to how they restricti.getAParameter, some of which are affected, but as far as I can tell, none of them actually intended to get the receiver.getLastParameter, which are affected in theory but unlikely to matter in practice (since the modeled function expects >=1 arguments), and none of them intended to get the receiver.This was motivated by an upcoming change in MaD, where we want to use
Argument[this]to represent the receiver (Argument[self]in Python/Ruby).Evaluation looks good. A few spurious taint sources have been removed, which referred to the receiver argument to a callback.