JS: Pass local arguments to parameter value node, not SSA node

This commit is contained in:
Asger Feldthaus
2020-04-29 14:43:41 +01:00
parent dc2d6a5fd9
commit 5568f0e182

View File

@@ -1340,6 +1340,12 @@ module DataFlow {
succ = lvalueNode(param) // The SSA node represents the parameters's local variable
)
or
exists(Expr arg, Parameter param |
localArgumentPassing(arg, param) and
pred = valueNode(arg) and
succ = valueNode(param)
)
or
exists(PropertyPattern pattern |
pred = TPropNode(pattern) and
succ = lvalueNode(pattern.getValuePattern())
@@ -1475,8 +1481,7 @@ module DataFlow {
*/
private AST::ValueNode defSourceNode(VarDef def) {
result = def.getSource() or
result = def.getDestructuringSource() or
localArgumentPassing(result, def)
result = def.getDestructuringSource()
}
/**