Skip to content

Commit 55b15a0

Browse files
Generate code
1 parent e73e214 commit 55b15a0

File tree

10 files changed

+90
-90
lines changed

10 files changed

+90
-90
lines changed

domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/GraphSchema.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ object GraphSchema extends flatgraph.Schema {
277277
"POSSIBLE_TYPES",
278278
"ROOT",
279279
"SIGNATURE",
280-
"STATIC_BASE_TYPE",
280+
"STATIC_RECEIVER",
281281
"TYPE_DECL_FULL_NAME",
282282
"TYPE_FULL_NAME",
283283
"VALUE",
@@ -430,7 +430,7 @@ object GraphSchema extends flatgraph.Schema {
430430
nodePropertyDescriptors(3713) = FormalQtyType.QtyMulti
431431
nodePropertyDescriptors(3884) = FormalQtyType.StringType // CALL.SIGNATURE
432432
nodePropertyDescriptors(3885) = FormalQtyType.QtyOne
433-
nodePropertyDescriptors(3970) = FormalQtyType.StringType // CALL.STATIC_BASE_TYPE
433+
nodePropertyDescriptors(3970) = FormalQtyType.StringType // CALL.STATIC_RECEIVER
434434
nodePropertyDescriptors(3971) = FormalQtyType.QtyOption
435435
nodePropertyDescriptors(4142) = FormalQtyType.StringType // CALL.TYPE_FULL_NAME
436436
nodePropertyDescriptors(4143) = FormalQtyType.QtyOne
@@ -1096,7 +1096,7 @@ object GraphSchema extends flatgraph.Schema {
10961096
_newNodeInserters(3454) = nodes.NewCall.InsertionHelpers.NewNodeInserter_Call_order
10971097
_newNodeInserters(3712) = nodes.NewCall.InsertionHelpers.NewNodeInserter_Call_possibleTypes
10981098
_newNodeInserters(3884) = nodes.NewCall.InsertionHelpers.NewNodeInserter_Call_signature
1099-
_newNodeInserters(3970) = nodes.NewCall.InsertionHelpers.NewNodeInserter_Call_staticBaseType
1099+
_newNodeInserters(3970) = nodes.NewCall.InsertionHelpers.NewNodeInserter_Call_staticReceiver
11001100
_newNodeInserters(4142) = nodes.NewCall.InsertionHelpers.NewNodeInserter_Call_typeFullName
11011101
_newNodeInserters(532) = nodes.NewClosureBinding.InsertionHelpers.NewNodeInserter_ClosureBinding_closureBindingId
11021102
_newNodeInserters(1392) = nodes.NewClosureBinding.InsertionHelpers.NewNodeInserter_ClosureBinding_evaluationStrategy
@@ -1468,7 +1468,7 @@ object GraphSchema extends flatgraph.Schema {
14681468
"ORDER",
14691469
"POSSIBLE_TYPES",
14701470
"SIGNATURE",
1471-
"STATIC_BASE_TYPE",
1471+
"STATIC_RECEIVER",
14721472
"TYPE_FULL_NAME"
14731473
)
14741474
case "CLOSURE_BINDING" => Set("CLOSURE_BINDING_ID", "EVALUATION_STRATEGY")

domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/Properties.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -242,13 +242,13 @@ object Properties {
242242
*/
243243
val Signature = flatgraph.SinglePropertyKey[String](kind = 45, name = "SIGNATURE", default = "")
244244

245-
/** The `STATIC_BASE_TYPE` field is used to keep track of the type on which a static method is called for static
245+
/** The `STATIC_RECEIVER` field is used to keep track of the type on which a static method is called for static
246246
* methods which may be inherited. This information can then be used to find the true `METHOD_FULL_NAME` of the
247247
* method being called during call linking. For example, if a class `Foo` defines a static method `foo` and a class
248-
* `Bar extends Foo`, then the `STATIC_BASE_TYPE` of a`Bar.foo()` call is `Bar` and the `METHOD_FULL_NAME` of the
248+
* `Bar extends Foo`, then the `STATIC_RECEIVER` of a`Bar.foo()` call is `Bar` and the `METHOD_FULL_NAME` of the
249249
* `foo` call is rewritten to `Foo.foo:<signature>`.
250250
*/
251-
val StaticBaseType = flatgraph.OptionalPropertyKey[String](kind = 46, name = "STATIC_BASE_TYPE")
251+
val StaticReceiver = flatgraph.OptionalPropertyKey[String](kind = 46, name = "STATIC_RECEIVER")
252252

253253
/** The static type decl of a TYPE. This property is matched against the FULL_NAME of TYPE_DECL nodes. It is required
254254
* to have exactly one TYPE_DECL for each different TYPE_DECL_FULL_NAME

domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/PropertyNames.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -247,13 +247,13 @@ object PropertyNames {
247247
*/
248248
val Signature: String = "SIGNATURE"
249249

250-
/** The `STATIC_BASE_TYPE` field is used to keep track of the type on which a static method is called for static
250+
/** The `STATIC_RECEIVER` field is used to keep track of the type on which a static method is called for static
251251
* methods which may be inherited. This information can then be used to find the true `METHOD_FULL_NAME` of the
252252
* method being called during call linking. For example, if a class `Foo` defines a static method `foo` and a class
253-
* `Bar extends Foo`, then the `STATIC_BASE_TYPE` of a`Bar.foo()` call is `Bar` and the `METHOD_FULL_NAME` of the
253+
* `Bar extends Foo`, then the `STATIC_RECEIVER` of a`Bar.foo()` call is `Bar` and the `METHOD_FULL_NAME` of the
254254
* `foo` call is rewritten to `Foo.foo:<signature>`.
255255
*/
256-
val StaticBaseType: String = "STATIC_BASE_TYPE"
256+
val StaticReceiver: String = "STATIC_RECEIVER"
257257

258258
/** The static type decl of a TYPE. This property is matched against the FULL_NAME of TYPE_DECL nodes. It is required
259259
* to have exactly one TYPE_DECL for each different TYPE_DECL_FULL_NAME
@@ -338,7 +338,7 @@ object PropertyNames {
338338
Root,
339339
SecondaryId,
340340
Signature,
341-
StaticBaseType,
341+
StaticReceiver,
342342
TypeDeclFullName,
343343
TypeFullName,
344344
Value,

domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/accessors/Accessors.scala

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -316,8 +316,8 @@ object Accessors {
316316
default = "": String
317317
)
318318
}
319-
final class AccessPropertyStaticBaseType(val node: nodes.StoredNode) extends AnyVal {
320-
def staticBaseType: Option[String] = flatgraph.Accessors
319+
final class AccessPropertyStaticReceiver(val node: nodes.StoredNode) extends AnyVal {
320+
def staticReceiver: Option[String] = flatgraph.Accessors
321321
.getNodePropertyOption[String](node.graph, nodeKind = node.nodeKind, propertyKind = 46, seq = node.seq)
322322
}
323323
final class AccessPropertyTypeDeclFullName(val node: nodes.StoredNode) extends AnyVal {
@@ -423,9 +423,9 @@ object Accessors {
423423
case stored: nodes.StoredNode => new AccessPropertyPossibleTypes(stored).possibleTypes
424424
case newNode: nodes.NewCall => newNode.possibleTypes
425425
}
426-
def staticBaseType: Option[String] = node match {
427-
case stored: nodes.StoredNode => new AccessPropertyStaticBaseType(stored).staticBaseType
428-
case newNode: nodes.NewCall => newNode.staticBaseType
426+
def staticReceiver: Option[String] = node match {
427+
case stored: nodes.StoredNode => new AccessPropertyStaticReceiver(stored).staticReceiver
428+
case newNode: nodes.NewCall => newNode.staticReceiver
429429
}
430430
def typeFullName: String = node match {
431431
case stored: nodes.StoredNode => new AccessPropertyTypeFullName(stored).typeFullName
@@ -1120,9 +1120,9 @@ trait ConcreteStoredConversions extends ConcreteBaseConversions {
11201120
implicit def accessPropertySignature(
11211121
node: nodes.StoredNode & nodes.StaticType[nodes.HasSignatureEMT]
11221122
): AccessPropertySignature = new AccessPropertySignature(node)
1123-
implicit def accessPropertyStaticBaseType(
1124-
node: nodes.StoredNode & nodes.StaticType[nodes.HasStaticBaseTypeEMT]
1125-
): AccessPropertyStaticBaseType = new AccessPropertyStaticBaseType(node)
1123+
implicit def accessPropertyStaticReceiver(
1124+
node: nodes.StoredNode & nodes.StaticType[nodes.HasStaticReceiverEMT]
1125+
): AccessPropertyStaticReceiver = new AccessPropertyStaticReceiver(node)
11261126
implicit def accessPropertyTypeDeclFullName(
11271127
node: nodes.StoredNode & nodes.StaticType[nodes.HasTypeDeclFullNameEMT]
11281128
): AccessPropertyTypeDeclFullName = new AccessPropertyTypeDeclFullName(node)

domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/nodes/BaseTypes.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,10 +334,10 @@ trait HasRootEMT
334334
*/
335335
trait HasSignatureEMT
336336

337-
/** Node types with this marker trait are guaranteed to have the STATIC_BASE_TYPE property. EMT stands for: "erased
337+
/** Node types with this marker trait are guaranteed to have the STATIC_RECEIVER property. EMT stands for: "erased
338338
* marker trait", it exists only at compile time in order to improve type safety.
339339
*/
340-
trait HasStaticBaseTypeEMT
340+
trait HasStaticReceiverEMT
341341

342342
/** Node types with this marker trait are guaranteed to have the TYPE_DECL_FULL_NAME property. EMT stands for: "erased
343343
* marker trait", it exists only at compile time in order to improve type safety.

domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/nodes/Call.scala

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ trait CallEMT
1515
with HasDynamicTypeHintFullNameEMT
1616
with HasMethodFullNameEMT
1717
with HasPossibleTypesEMT
18-
with HasStaticBaseTypeEMT
18+
with HasStaticReceiverEMT
1919
with HasTypeFullNameEMT
2020

2121
trait CallBase extends AbstractNode with CallReprBase with ExpressionBase with StaticType[CallEMT] {
@@ -39,7 +39,7 @@ trait CallBase extends AbstractNode with CallReprBase with ExpressionBase with S
3939
val tmpPossibleTypes = this.possibleTypes;
4040
if (tmpPossibleTypes.nonEmpty) res.put("POSSIBLE_TYPES", tmpPossibleTypes)
4141
if (("": String) != this.signature) res.put("SIGNATURE", this.signature)
42-
this.staticBaseType.foreach { p => res.put("STATIC_BASE_TYPE", p) }
42+
this.staticReceiver.foreach { p => res.put("STATIC_RECEIVER", p) }
4343
if (("<empty>": String) != this.typeFullName) res.put("TYPE_FULL_NAME", this.typeFullName)
4444
res
4545
}
@@ -108,10 +108,10 @@ object Call {
108108
* enforce a strict format for the signature, that is, it can be chosen by the frontend implementor to fit the source
109109
* language.
110110
*
111-
* ▸ StaticBaseType (String); Cardinality `ZeroOrOne` (optional); The `STATIC_BASE_TYPE` field is used to keep track of
111+
* ▸ StaticReceiver (String); Cardinality `ZeroOrOne` (optional); The `STATIC_RECEIVER` field is used to keep track of
112112
* the type on which a static method is called for static methods which may be inherited. This information can then be
113113
* used to find the true `METHOD_FULL_NAME` of the method being called during call linking. For example, if a class
114-
* `Foo` defines a static method `foo` and a class `Bar extends Foo`, then the `STATIC_BASE_TYPE` of a`Bar.foo()` call
114+
* `Foo` defines a static method `foo` and a class `Bar extends Foo`, then the `STATIC_RECEIVER` of a`Bar.foo()` call
115115
* is `Bar` and the `METHOD_FULL_NAME` of the `foo` call is rewritten to `Foo.foo:<signature>`.
116116
*
117117
* ▸ TypeFullName (String); Cardinality `one` (mandatory with default value `<empty>`); This field contains the
@@ -142,7 +142,7 @@ class Call(graph_4762: flatgraph.Graph, seq_4762: Int)
142142
case 11 => "order"
143143
case 12 => "possibleTypes"
144144
case 13 => "signature"
145-
case 14 => "staticBaseType"
145+
case 14 => "staticReceiver"
146146
case 15 => "typeFullName"
147147
case _ => ""
148148
}
@@ -163,7 +163,7 @@ class Call(graph_4762: flatgraph.Graph, seq_4762: Int)
163163
case 11 => this.order
164164
case 12 => this.possibleTypes
165165
case 13 => this.signature
166-
case 14 => this.staticBaseType
166+
case 14 => this.staticReceiver
167167
case 15 => this.typeFullName
168168
case _ => null
169169
}

domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/nodes/NewCall.scala

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1615,7 +1615,7 @@ object NewCall {
16151615
}
16161616
}
16171617
}
1618-
object NewNodeInserter_Call_staticBaseType extends flatgraph.NewNodePropertyInsertionHelper {
1618+
object NewNodeInserter_Call_staticReceiver extends flatgraph.NewNodePropertyInsertionHelper {
16191619
override def insertNewNodeProperties(
16201620
newNodes: mutable.ArrayBuffer[flatgraph.DNode],
16211621
dst: AnyRef,
@@ -1630,7 +1630,7 @@ object NewCall {
16301630
val nn = newNodes(idx)
16311631
nn match {
16321632
case generated: NewCall =>
1633-
generated.staticBaseType match {
1633+
generated.staticReceiver match {
16341634
case Some(item) =>
16351635
dstCast(offset) = item
16361636
offset += 1
@@ -1697,7 +1697,7 @@ class NewCall extends NewNode(nodeKind = 7) with CallBase with CallReprNew with
16971697
var order: Int = -1: Int
16981698
var possibleTypes: IndexedSeq[String] = ArraySeq.empty
16991699
var signature: String = "": String
1700-
var staticBaseType: Option[String] = None
1700+
var staticReceiver: Option[String] = None
17011701
var typeFullName: String = "<empty>": String
17021702
def argumentIndex(value: Int): this.type = { this.argumentIndex = value; this }
17031703
def argumentName(value: Option[String]): this.type = { this.argumentName = value; this }
@@ -1720,8 +1720,8 @@ class NewCall extends NewNode(nodeKind = 7) with CallBase with CallReprNew with
17201720
def order(value: Int): this.type = { this.order = value; this }
17211721
def possibleTypes(value: IterableOnce[String]): this.type = { this.possibleTypes = value.iterator.to(ArraySeq); this }
17221722
def signature(value: String): this.type = { this.signature = value; this }
1723-
def staticBaseType(value: Option[String]): this.type = { this.staticBaseType = value; this }
1724-
def staticBaseType(value: String): this.type = { this.staticBaseType = Option(value); this }
1723+
def staticReceiver(value: Option[String]): this.type = { this.staticReceiver = value; this }
1724+
def staticReceiver(value: String): this.type = { this.staticReceiver = Option(value); this }
17251725
def typeFullName(value: String): this.type = { this.typeFullName = value; this }
17261726
override def countAndVisitProperties(interface: flatgraph.BatchedUpdateInterface): Unit = {
17271727
interface.countProperty(this, 1, 1)
@@ -1738,7 +1738,7 @@ class NewCall extends NewNode(nodeKind = 7) with CallBase with CallReprNew with
17381738
interface.countProperty(this, 40, 1)
17391739
interface.countProperty(this, 43, possibleTypes.size)
17401740
interface.countProperty(this, 45, 1)
1741-
interface.countProperty(this, 46, staticBaseType.size)
1741+
interface.countProperty(this, 46, staticReceiver.size)
17421742
interface.countProperty(this, 48, 1)
17431743
}
17441744

@@ -1758,7 +1758,7 @@ class NewCall extends NewNode(nodeKind = 7) with CallBase with CallReprNew with
17581758
newInstance.order = this.order
17591759
newInstance.possibleTypes = this.possibleTypes
17601760
newInstance.signature = this.signature
1761-
newInstance.staticBaseType = this.staticBaseType
1761+
newInstance.staticReceiver = this.staticReceiver
17621762
newInstance.typeFullName = this.typeFullName
17631763
newInstance.asInstanceOf[this.type]
17641764
}
@@ -1779,7 +1779,7 @@ class NewCall extends NewNode(nodeKind = 7) with CallBase with CallReprNew with
17791779
case 11 => "order"
17801780
case 12 => "possibleTypes"
17811781
case 13 => "signature"
1782-
case 14 => "staticBaseType"
1782+
case 14 => "staticReceiver"
17831783
case 15 => "typeFullName"
17841784
case _ => ""
17851785
}
@@ -1800,7 +1800,7 @@ class NewCall extends NewNode(nodeKind = 7) with CallBase with CallReprNew with
18001800
case 11 => this.order
18011801
case 12 => this.possibleTypes
18021802
case 13 => this.signature
1803-
case 14 => this.staticBaseType
1803+
case 14 => this.staticReceiver
18041804
case 15 => this.typeFullName
18051805
case _ => null
18061806
}

domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/traversals/TraversalCallBase.scala

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -149,76 +149,76 @@ final class TraversalCallBase[NodeType <: nodes.CallBase](val traversal: Iterato
149149
def possibleTypes: Iterator[String] =
150150
traversal.flatMap(_.possibleTypes)
151151

152-
/** Traverse to staticBaseType property */
153-
def staticBaseType: Iterator[String] =
154-
traversal.flatMap(_.staticBaseType)
152+
/** Traverse to staticReceiver property */
153+
def staticReceiver: Iterator[String] =
154+
traversal.flatMap(_.staticReceiver)
155155

156-
/** Traverse to nodes where the staticBaseType matches the regular expression `value`
156+
/** Traverse to nodes where the staticReceiver matches the regular expression `value`
157157
*/
158-
def staticBaseType(pattern: String): Iterator[NodeType] = {
158+
def staticReceiver(pattern: String): Iterator[NodeType] = {
159159
if (!flatgraph.misc.Regex.isRegex(pattern)) {
160-
staticBaseTypeExact(pattern)
160+
staticReceiverExact(pattern)
161161
} else {
162162
val matcher = flatgraph.misc.Regex.multilineMatcher(pattern)
163163
traversal.filter { item =>
164-
val tmp = item.staticBaseType; tmp.isDefined && matcher.reset(tmp.get).matches
164+
val tmp = item.staticReceiver; tmp.isDefined && matcher.reset(tmp.get).matches
165165
}
166166
}
167167
}
168168

169-
/** Traverse to nodes where the staticBaseType matches at least one of the regular expressions in `values`
169+
/** Traverse to nodes where the staticReceiver matches at least one of the regular expressions in `values`
170170
*/
171-
def staticBaseType(patterns: String*): Iterator[NodeType] = {
171+
def staticReceiver(patterns: String*): Iterator[NodeType] = {
172172
val matchers = patterns.map(flatgraph.misc.Regex.multilineMatcher)
173173
traversal.filter { item =>
174-
val tmp = item.staticBaseType; tmp.isDefined && matchers.exists { _.reset(tmp.get).matches }
174+
val tmp = item.staticReceiver; tmp.isDefined && matchers.exists { _.reset(tmp.get).matches }
175175
}
176176
}
177177

178-
/** Traverse to nodes where staticBaseType matches `value` exactly.
178+
/** Traverse to nodes where staticReceiver matches `value` exactly.
179179
*/
180-
def staticBaseTypeExact(value: String): Iterator[NodeType] = traversal match {
180+
def staticReceiverExact(value: String): Iterator[NodeType] = traversal match {
181181
case init: flatgraph.misc.InitNodeIterator[flatgraph.GNode @unchecked] if init.isVirgin && init.hasNext =>
182182
val someNode = init.next
183183
flatgraph.Accessors
184184
.getWithInverseIndex(someNode.graph, someNode.nodeKind, 46, value)
185185
.asInstanceOf[Iterator[NodeType]]
186186
case _ =>
187187
traversal.filter { node =>
188-
val tmp = node.staticBaseType; tmp.isDefined && tmp.get == value
188+
val tmp = node.staticReceiver; tmp.isDefined && tmp.get == value
189189
}
190190
}
191191

192-
/** Traverse to nodes where staticBaseType matches one of the elements in `values` exactly.
192+
/** Traverse to nodes where staticReceiver matches one of the elements in `values` exactly.
193193
*/
194-
def staticBaseTypeExact(values: String*): Iterator[NodeType] =
195-
if (values.length == 1) staticBaseTypeExact(values.head)
194+
def staticReceiverExact(values: String*): Iterator[NodeType] =
195+
if (values.length == 1) staticReceiverExact(values.head)
196196
else {
197197
val valueSet = values.toSet
198198
traversal.filter { item =>
199-
val tmp = item.staticBaseType; tmp.isDefined && valueSet.contains(tmp.get)
199+
val tmp = item.staticReceiver; tmp.isDefined && valueSet.contains(tmp.get)
200200
}
201201
}
202202

203-
/** Traverse to nodes where staticBaseType does not match the regular expression `value`.
203+
/** Traverse to nodes where staticReceiver does not match the regular expression `value`.
204204
*/
205-
def staticBaseTypeNot(pattern: String): Iterator[NodeType] = {
205+
def staticReceiverNot(pattern: String): Iterator[NodeType] = {
206206
if (!flatgraph.misc.Regex.isRegex(pattern)) {
207-
traversal.filter { node => node.staticBaseType.isEmpty || node.staticBaseType.get != pattern }
207+
traversal.filter { node => node.staticReceiver.isEmpty || node.staticReceiver.get != pattern }
208208
} else {
209209
val matcher = flatgraph.misc.Regex.multilineMatcher(pattern)
210210
traversal.filterNot { item =>
211-
val tmp = item.staticBaseType; tmp.isDefined && matcher.reset(tmp.get).matches
211+
val tmp = item.staticReceiver; tmp.isDefined && matcher.reset(tmp.get).matches
212212
}
213213
}
214214
}
215215

216-
/** Traverse to nodes where staticBaseType does not match any of the regular expressions in `values`.
216+
/** Traverse to nodes where staticReceiver does not match any of the regular expressions in `values`.
217217
*/
218-
def staticBaseTypeNot(patterns: String*): Iterator[NodeType] = {
218+
def staticReceiverNot(patterns: String*): Iterator[NodeType] = {
219219
val matchers = patterns.map(flatgraph.misc.Regex.multilineMatcher)
220220
traversal.filterNot { item =>
221-
val tmp = item.staticBaseType; tmp.isDefined && matchers.exists { _.reset(tmp.get).matches }
221+
val tmp = item.staticReceiver; tmp.isDefined && matchers.exists { _.reset(tmp.get).matches }
222222
}
223223
}
224224

0 commit comments

Comments
 (0)