@@ -81,6 +81,73 @@ class GenericSynthesizedNode extends DataFlow::Node, TGenericSynthesizedNode {
8181 string getTag ( ) { result = tag }
8282}
8383
84+ /**
85+ * An argument containing an array of all positional arguments with an obvious index, i.e. not affected by a spread argument.
86+ */
87+ class StaticArgumentArrayNode extends DataFlow:: Node , TStaticArgumentArrayNode {
88+ private InvokeExpr invoke ;
89+
90+ StaticArgumentArrayNode ( ) { this = TStaticArgumentArrayNode ( invoke ) }
91+
92+ override StmtContainer getContainer ( ) { result = invoke .getContainer ( ) }
93+
94+ override string toString ( ) { result = "[static argument array]" }
95+
96+ override Location getLocation ( ) { result = invoke .getLocation ( ) }
97+ }
98+
99+ /**
100+ * An argument containing an array of all positional arguments with non-obvious index, i.e. affected by a spread argument.
101+ *
102+ * Only exists for call sites with a spread argument.
103+ */
104+ class DynamicArgumentArrayNode extends DataFlow:: Node , TDynamicArgumentArrayNode {
105+ private InvokeExpr invoke ;
106+
107+ DynamicArgumentArrayNode ( ) { this = TDynamicArgumentArrayNode ( invoke ) }
108+
109+ override StmtContainer getContainer ( ) { result = invoke .getContainer ( ) }
110+
111+ override string toString ( ) { result = "[dynamic argument array]" }
112+
113+ override Location getLocation ( ) { result = invoke .getLocation ( ) }
114+ }
115+
116+ /**
117+ * A parameter containing an array of all positional arguments with an obvious index, i.e. not affected by spread or `.apply()`.
118+ *
119+ * These are read and stored in the function's rest parameter and `arguments` array.
120+ * The node only exists for functions with a rest parameter or which uses the `arguments` array.
121+ */
122+ class StaticParameterArrayNode extends DataFlow:: Node , TStaticParameterArrayNode {
123+ private Function function ;
124+
125+ StaticParameterArrayNode ( ) { this = TStaticParameterArrayNode ( function ) }
126+
127+ override StmtContainer getContainer ( ) { result = function }
128+
129+ override string toString ( ) { result = "[static parameter array]" }
130+
131+ override Location getLocation ( ) { result = function .getLocation ( ) }
132+ }
133+
134+ /**
135+ * A parameter containing an array of all positional argument values with non-obvious index, i.e. affected by spread or `.apply()`.
136+ *
137+ * These are read and assigned into regular positional parameters and stored into rest parameters and the `arguments` array.
138+ */
139+ class DynamicParameterArrayNode extends DataFlow:: Node , TDynamicParameterArrayNode {
140+ private Function function ;
141+
142+ DynamicParameterArrayNode ( ) { this = TDynamicParameterArrayNode ( function ) }
143+
144+ override StmtContainer getContainer ( ) { result = function }
145+
146+ override string toString ( ) { result = "[dynamic parameter array]" }
147+
148+ override Location getLocation ( ) { result = function .getLocation ( ) }
149+ }
150+
84151cached
85152newtype TReturnKind =
86153 MkNormalReturnKind ( ) or
0 commit comments