This commit is contained in:
Chris Smowton 2024-10-01 14:39:32 +01:00
Родитель c1a1edf24e
Коммит 288e0ec565
9 изменённых файлов: 12 добавлений и 12 удалений

Просмотреть файл

@ -208,7 +208,7 @@ underlying_type(unique int named: @namedtype ref, int tp: @type ref);
component_types(int parent: @compositetype ref, int index: int ref, string name: string ref, int tp: @type ref);
#keyset[parent, index]
component_tags(int parent: @structtype ref, int index: int ref, string tag: string ref);
struct_tags(int parent: @structtype ref, int index: int ref, string tag: string ref);
#keyset[interface, index]
interface_private_method_ids(int interface: @interfacetype ref, int index: int ref, string id: string ref);

Просмотреть файл

@ -1,5 +1,5 @@
description: Remove component-tags and interface-method-id tables
compatibility: full
component_tags.rel: delete
struct_tags.rel: delete
interface_private_method_ids.rel: delete

Просмотреть файл

@ -1150,8 +1150,8 @@ var ComponentTypesTable = NewTable("component_types",
EntityColumn(TypeType, "tp"),
).KeySet("parent", "index")
// ComponentTagsTable is the table associating struct types with their component types' tags
var ComponentTagsTable = NewTable("component_tags",
// StructTagsTable is the table associating struct types with their component types' tags
var StructTagsTable = NewTable("struct_tags",
EntityColumn(StructType, "parent"),
IntColumn("index"),
StringColumn("tag"),

Просмотреть файл

@ -1625,7 +1625,7 @@ func extractType(tw *trap.Writer, tp types.Type) trap.Label {
}
extractComponentType(tw, lbl, i, name, field.Type())
if tp.Tag(i) != "" {
dbscheme.ComponentTagsTable.Emit(tw, lbl, i, tp.Tag(i))
dbscheme.StructTagsTable.Emit(tw, lbl, i, tp.Tag(i))
}
}
case *types.Pointer:

Просмотреть файл

@ -208,7 +208,7 @@ underlying_type(unique int named: @namedtype ref, int tp: @type ref);
component_types(int parent: @compositetype ref, int index: int ref, string name: string ref, int tp: @type ref);
#keyset[parent, index]
component_tags(int parent: @structtype ref, int index: int ref, string tag: string ref);
struct_tags(int parent: @structtype ref, int index: int ref, string tag: string ref);
#keyset[interface, index]
interface_private_method_ids(int interface: @interfacetype ref, int index: int ref, string id: string ref);

Просмотреть файл

@ -13979,7 +13979,7 @@
</dependencies>
</relation>
<relation>
<name>component_tags</name>
<name>struct_tags</name>
<cardinality>41038845</cardinality>
<columnsizes>
<e>

Просмотреть файл

@ -467,9 +467,9 @@ class StructType extends @structtype, CompositeType {
predicate hasOwnFieldWithTag(int i, string name, Type tp, boolean isEmbedded, string tag) {
this.hasOwnField(i, name, tp, isEmbedded) and
(
component_tags(this, i, tag)
struct_tags(this, i, tag)
or
not component_tags(this, i, _) and tag = ""
not struct_tags(this, i, _) and tag = ""
)
}
@ -594,9 +594,9 @@ class StructType extends @structtype, CompositeType {
concat(int i, string name, Type tp, string tagToPrint |
component_types(this, i, name, tp) and
(
tagToPrint = " `" + any(string tag | component_tags(this, i, tag)) + "`"
tagToPrint = " `" + any(string tag | struct_tags(this, i, tag)) + "`"
or
tagToPrint = "" and not component_tags(this, i, _)
tagToPrint = "" and not struct_tags(this, i, _)
)
|
name + " " + tp.pp() + tagToPrint, "; " order by i

Просмотреть файл

@ -208,7 +208,7 @@ underlying_type(unique int named: @namedtype ref, int tp: @type ref);
component_types(int parent: @compositetype ref, int index: int ref, string name: string ref, int tp: @type ref);
#keyset[parent, index]
component_tags(int parent: @structtype ref, int index: int ref, string tag: string ref);
struct_tags(int parent: @structtype ref, int index: int ref, string tag: string ref);
#keyset[interface, index]
interface_private_method_ids(int interface: @interfacetype ref, int index: int ref, string id: string ref);