@@ -31,9 +31,19 @@ private class PrimaryArgumentNode extends ArgumentNode {
31
31
override predicate argumentOf ( DataFlowCall call , int pos ) { op = call .getArgumentOperand ( pos ) }
32
32
33
33
override string toString ( ) {
34
- result = "Argument " + op .( PositionalArgumentOperand ) .getIndex ( )
34
+ exists ( Expr unconverted |
35
+ unconverted = op .getDef ( ) .getUnconvertedResultExpression ( ) and
36
+ result = unconverted .toString ( )
37
+ )
35
38
or
36
- op instanceof ThisArgumentOperand and result = "This argument"
39
+ // Certain instructions don't map to an unconverted result expression. For these cases
40
+ // we fall back to a simpler naming scheme. This can happen in IR-generated constructors.
41
+ not exists ( op .getDef ( ) .getUnconvertedResultExpression ( ) ) and
42
+ (
43
+ result = "Argument " + op .( PositionalArgumentOperand ) .getIndex ( )
44
+ or
45
+ op instanceof ThisArgumentOperand and result = "Argument this"
46
+ )
37
47
}
38
48
}
39
49
@@ -53,9 +63,16 @@ private class SideEffectArgumentNode extends ArgumentNode {
53
63
}
54
64
55
65
override string toString ( ) {
56
- if read .getIndex ( ) = - 1
57
- then result = "This indirection"
58
- else result = "Argument " + read .getIndex ( ) + " indirection"
66
+ result = read .getArgumentDef ( ) .getUnconvertedResultExpression ( ) .toString ( ) + " indirection"
67
+ or
68
+ // Some instructions don't map to an unconverted result expression. For these cases
69
+ // we fall back to a simpler naming scheme. This can happen in IR-generated constructors.
70
+ not exists ( read .getArgumentDef ( ) .getUnconvertedResultExpression ( ) ) and
71
+ (
72
+ if read .getIndex ( ) = - 1
73
+ then result = "Argument this indirection"
74
+ else result = "Argument " + read .getIndex ( ) + " indirection"
75
+ )
59
76
}
60
77
}
61
78
0 commit comments