| { |
| "version": "0.0.1", |
| "name": "test.name", |
| "library_dependencies": [], |
| "bits_declarations": [], |
| "const_declarations": [], |
| "enum_declarations": [], |
| "interface_declarations": [], |
| "service_declarations": [], |
| "struct_declarations": [ |
| { |
| "name": "test.name/NullableUnionStruct", |
| "location": { |
| "filename": "garnet/go/src/fidl/compiler/backend/typestest/union.test.fidl", |
| "line": 24, |
| "column": 8 |
| }, |
| "anonymous": false, |
| "members": [ |
| { |
| "type": { |
| "kind": "identifier", |
| "identifier": "test.name/Union", |
| "nullable": true |
| }, |
| "name": "the_union", |
| "location": { |
| "filename": "garnet/go/src/fidl/compiler/backend/typestest/union.test.fidl", |
| "line": 25, |
| "column": 12 |
| }, |
| "field_shape_v1": { |
| "offset": 0, |
| "padding": 0 |
| }, |
| "size": 8 |
| } |
| ], |
| "type_shape_v1": { |
| "inline_size": 24, |
| "alignment": 8, |
| "depth": 3, |
| "max_handles": 0, |
| "max_out_of_line": 4294967295, |
| "has_padding": true, |
| "has_flexible_envelope": false, |
| "contains_union": true |
| } |
| } |
| ], |
| "table_declarations": [], |
| "union_declarations": [ |
| { |
| "name": "test.name/Union", |
| "location": { |
| "filename": "garnet/go/src/fidl/compiler/backend/typestest/union.test.fidl", |
| "line": 3, |
| "column": 7 |
| }, |
| "members": [ |
| { |
| "xunion_ordinal": 1, |
| "reserved": false, |
| "name": "Primitive", |
| "type": { |
| "kind": "primitive", |
| "subtype": "int32" |
| }, |
| "location": { |
| "filename": "garnet/go/src/fidl/compiler/backend/typestest/union.test.fidl", |
| "line": 4, |
| "column": 14 |
| }, |
| "size": 4, |
| "offset": 8 |
| }, |
| { |
| "xunion_ordinal": 2, |
| "reserved": false, |
| "name": "StringNeedsConstructor", |
| "type": { |
| "kind": "string", |
| "nullable": false |
| }, |
| "location": { |
| "filename": "garnet/go/src/fidl/compiler/backend/typestest/union.test.fidl", |
| "line": 5, |
| "column": 15 |
| }, |
| "size": 16, |
| "offset": 8 |
| }, |
| { |
| "xunion_ordinal": 3, |
| "reserved": false, |
| "name": "VectorStringAlsoNeedsConstructor", |
| "type": { |
| "kind": "vector", |
| "element_type": { |
| "kind": "string", |
| "nullable": false |
| }, |
| "nullable": false |
| }, |
| "location": { |
| "filename": "garnet/go/src/fidl/compiler/backend/typestest/union.test.fidl", |
| "line": 6, |
| "column": 23 |
| }, |
| "size": 16, |
| "offset": 8 |
| } |
| ], |
| "type_shape_v1": { |
| "inline_size": 24, |
| "alignment": 8, |
| "depth": 3, |
| "max_handles": 0, |
| "max_out_of_line": 4294967295, |
| "has_padding": true, |
| "has_flexible_envelope": false, |
| "contains_union": true |
| } |
| }, |
| { |
| "name": "test.name/FieldCollision", |
| "location": { |
| "filename": "garnet/go/src/fidl/compiler/backend/typestest/union.test.fidl", |
| "line": 9, |
| "column": 7 |
| }, |
| "members": [ |
| { |
| "xunion_ordinal": 1, |
| "reserved": false, |
| "name": "field_collision_tag", |
| "type": { |
| "kind": "primitive", |
| "subtype": "int32" |
| }, |
| "location": { |
| "filename": "garnet/go/src/fidl/compiler/backend/typestest/union.test.fidl", |
| "line": 10, |
| "column": 14 |
| }, |
| "size": 4, |
| "offset": 4 |
| } |
| ], |
| "type_shape_v1": { |
| "inline_size": 24, |
| "alignment": 8, |
| "depth": 1, |
| "max_handles": 0, |
| "max_out_of_line": 8, |
| "has_padding": true, |
| "has_flexible_envelope": false, |
| "contains_union": true |
| } |
| }, |
| { |
| "name": "test.name/ExplicitUnion", |
| "location": { |
| "filename": "garnet/go/src/fidl/compiler/backend/typestest/union.test.fidl", |
| "line": 13, |
| "column": 7 |
| }, |
| "members": [ |
| { |
| "xunion_ordinal": 1, |
| "reserved": false, |
| "name": "Primitive", |
| "type": { |
| "kind": "primitive", |
| "subtype": "int32" |
| }, |
| "location": { |
| "filename": "garnet/go/src/fidl/compiler/backend/typestest/union.test.fidl", |
| "line": 15, |
| "column": 14 |
| }, |
| "size": 4, |
| "offset": 8 |
| }, |
| { |
| "xunion_ordinal": 2, |
| "reserved": true, |
| "location": { |
| "filename": "garnet/go/src/fidl/compiler/backend/typestest/union.test.fidl", |
| "line": 14, |
| "column": 5 |
| } |
| }, |
| { |
| "xunion_ordinal": 3, |
| "reserved": false, |
| "name": "StringNeedsConstructor", |
| "type": { |
| "kind": "string", |
| "nullable": false |
| }, |
| "location": { |
| "filename": "garnet/go/src/fidl/compiler/backend/typestest/union.test.fidl", |
| "line": 16, |
| "column": 15 |
| }, |
| "size": 16, |
| "offset": 8 |
| } |
| ], |
| "type_shape_v1": { |
| "inline_size": 24, |
| "alignment": 8, |
| "depth": 2, |
| "max_handles": 0, |
| "max_out_of_line": 4294967295, |
| "has_padding": true, |
| "has_flexible_envelope": false, |
| "contains_union": true |
| } |
| }, |
| { |
| "name": "test.name/ReverseOrdinalUnion", |
| "location": { |
| "filename": "garnet/go/src/fidl/compiler/backend/typestest/union.test.fidl", |
| "line": 19, |
| "column": 7 |
| }, |
| "members": [ |
| { |
| "xunion_ordinal": 1, |
| "reserved": false, |
| "name": "first", |
| "type": { |
| "kind": "primitive", |
| "subtype": "uint32" |
| }, |
| "location": { |
| "filename": "garnet/go/src/fidl/compiler/backend/typestest/union.test.fidl", |
| "line": 21, |
| "column": 15 |
| }, |
| "size": 4, |
| "offset": 4 |
| }, |
| { |
| "xunion_ordinal": 2, |
| "reserved": false, |
| "name": "second", |
| "type": { |
| "kind": "primitive", |
| "subtype": "uint32" |
| }, |
| "location": { |
| "filename": "garnet/go/src/fidl/compiler/backend/typestest/union.test.fidl", |
| "line": 20, |
| "column": 15 |
| }, |
| "size": 4, |
| "offset": 4 |
| } |
| ], |
| "type_shape_v1": { |
| "inline_size": 24, |
| "alignment": 8, |
| "depth": 1, |
| "max_handles": 0, |
| "max_out_of_line": 8, |
| "has_padding": true, |
| "has_flexible_envelope": false, |
| "contains_union": true |
| } |
| } |
| ], |
| "xunion_declarations": [], |
| "type_alias_declarations": [], |
| "declaration_order": [ |
| "test.name/Union", |
| "test.name/ReverseOrdinalUnion", |
| "test.name/NullableUnionStruct", |
| "test.name/FieldCollision", |
| "test.name/ExplicitUnion" |
| ], |
| "declarations": { |
| "test.name/NullableUnionStruct": "struct", |
| "test.name/Union": "union", |
| "test.name/FieldCollision": "union", |
| "test.name/ExplicitUnion": "union", |
| "test.name/ReverseOrdinalUnion": "union" |
| } |
| } |