Skip to content

Commit 288e0ec

Browse files
committed
component_tags -> struct_tags
1 parent c1a1edf commit 288e0ec

File tree

9 files changed

+12
-12
lines changed

9 files changed

+12
-12
lines changed

go/downgrades/76243dd9f77adbf125835fb83a510465b2f29a24/old.dbscheme renamed to go/downgrades/4bd57e093275e5e892dfb16b55ed4bd76ea662be/old.dbscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ underlying_type(unique int named: @namedtype ref, int tp: @type ref);
208208
component_types(int parent: @compositetype ref, int index: int ref, string name: string ref, int tp: @type ref);
209209

210210
#keyset[parent, index]
211-
component_tags(int parent: @structtype ref, int index: int ref, string tag: string ref);
211+
struct_tags(int parent: @structtype ref, int index: int ref, string tag: string ref);
212212

213213
#keyset[interface, index]
214214
interface_private_method_ids(int interface: @interfacetype ref, int index: int ref, string id: string ref);
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
description: Remove component-tags and interface-method-id tables
22
compatibility: full
33

4-
component_tags.rel: delete
4+
struct_tags.rel: delete
55
interface_private_method_ids.rel: delete

go/extractor/dbscheme/tables.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1150,8 +1150,8 @@ var ComponentTypesTable = NewTable("component_types",
11501150
EntityColumn(TypeType, "tp"),
11511151
).KeySet("parent", "index")
11521152

1153-
// ComponentTagsTable is the table associating struct types with their component types' tags
1154-
var ComponentTagsTable = NewTable("component_tags",
1153+
// StructTagsTable is the table associating struct types with their component types' tags
1154+
var StructTagsTable = NewTable("struct_tags",
11551155
EntityColumn(StructType, "parent"),
11561156
IntColumn("index"),
11571157
StringColumn("tag"),

go/extractor/extractor.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1625,7 +1625,7 @@ func extractType(tw *trap.Writer, tp types.Type) trap.Label {
16251625
}
16261626
extractComponentType(tw, lbl, i, name, field.Type())
16271627
if tp.Tag(i) != "" {
1628-
dbscheme.ComponentTagsTable.Emit(tw, lbl, i, tp.Tag(i))
1628+
dbscheme.StructTagsTable.Emit(tw, lbl, i, tp.Tag(i))
16291629
}
16301630
}
16311631
case *types.Pointer:

go/ql/lib/go.dbscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ underlying_type(unique int named: @namedtype ref, int tp: @type ref);
208208
component_types(int parent: @compositetype ref, int index: int ref, string name: string ref, int tp: @type ref);
209209

210210
#keyset[parent, index]
211-
component_tags(int parent: @structtype ref, int index: int ref, string tag: string ref);
211+
struct_tags(int parent: @structtype ref, int index: int ref, string tag: string ref);
212212

213213
#keyset[interface, index]
214214
interface_private_method_ids(int interface: @interfacetype ref, int index: int ref, string id: string ref);

go/ql/lib/go.dbscheme.stats

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13979,7 +13979,7 @@
1397913979
</dependencies>
1398013980
</relation>
1398113981
<relation>
13982-
<name>component_tags</name>
13982+
<name>struct_tags</name>
1398313983
<cardinality>41038845</cardinality>
1398413984
<columnsizes>
1398513985
<e>

go/ql/lib/semmle/go/Types.qll

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -467,9 +467,9 @@ class StructType extends @structtype, CompositeType {
467467
predicate hasOwnFieldWithTag(int i, string name, Type tp, boolean isEmbedded, string tag) {
468468
this.hasOwnField(i, name, tp, isEmbedded) and
469469
(
470-
component_tags(this, i, tag)
470+
struct_tags(this, i, tag)
471471
or
472-
not component_tags(this, i, _) and tag = ""
472+
not struct_tags(this, i, _) and tag = ""
473473
)
474474
}
475475

@@ -594,9 +594,9 @@ class StructType extends @structtype, CompositeType {
594594
concat(int i, string name, Type tp, string tagToPrint |
595595
component_types(this, i, name, tp) and
596596
(
597-
tagToPrint = " `" + any(string tag | component_tags(this, i, tag)) + "`"
597+
tagToPrint = " `" + any(string tag | struct_tags(this, i, tag)) + "`"
598598
or
599-
tagToPrint = "" and not component_tags(this, i, _)
599+
tagToPrint = "" and not struct_tags(this, i, _)
600600
)
601601
|
602602
name + " " + tp.pp() + tagToPrint, "; " order by i

go/ql/lib/upgrades/a58b81b1b4c4cccc8ca11731c1db86622f33af57/go.dbscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ underlying_type(unique int named: @namedtype ref, int tp: @type ref);
208208
component_types(int parent: @compositetype ref, int index: int ref, string name: string ref, int tp: @type ref);
209209

210210
#keyset[parent, index]
211-
component_tags(int parent: @structtype ref, int index: int ref, string tag: string ref);
211+
struct_tags(int parent: @structtype ref, int index: int ref, string tag: string ref);
212212

213213
#keyset[interface, index]
214214
interface_private_method_ids(int interface: @interfacetype ref, int index: int ref, string id: string ref);

0 commit comments

Comments
 (0)