blob: fc5b4b3a3c07fa52cf4433cfa0b8533115859990 [file] [log] [blame]
{
"name": "test.encapsulatedstructs",
"library_dependencies": [
{
"name": "zx",
"declarations": {
"zx/rights": {
"kind": "bits"
},
"zx/CHANNEL_MAX_MSG_BYTES": {
"kind": "const"
},
"zx/CHANNEL_MAX_MSG_HANDLES": {
"kind": "const"
},
"zx/DEFAULT_CHANNEL_RIGHTS": {
"kind": "const"
},
"zx/DEFAULT_EVENT_RIGHTS": {
"kind": "const"
},
"zx/MAX_CPUS": {
"kind": "const"
},
"zx/MAX_NAME_LEN": {
"kind": "const"
},
"zx/RIGHTS_BASIC": {
"kind": "const"
},
"zx/RIGHTS_IO": {
"kind": "const"
},
"zx/RIGHTS_POLICY": {
"kind": "const"
},
"zx/RIGHTS_PROPERTY": {
"kind": "const"
},
"zx/obj_type": {
"kind": "enum"
},
"zx/handle": {
"kind": "experimental_resource"
},
"zx/duration": {
"kind": "type_alias"
},
"zx/gpaddr": {
"kind": "type_alias"
},
"zx/koid": {
"kind": "type_alias"
},
"zx/off": {
"kind": "type_alias"
},
"zx/paddr": {
"kind": "type_alias"
},
"zx/paddr32": {
"kind": "type_alias"
},
"zx/procarg": {
"kind": "type_alias"
},
"zx/signals": {
"kind": "type_alias"
},
"zx/status": {
"kind": "type_alias"
},
"zx/ticks": {
"kind": "type_alias"
},
"zx/time": {
"kind": "type_alias"
},
"zx/vaddr": {
"kind": "type_alias"
}
}
}
],
"bits_declarations": [],
"const_declarations": [],
"enum_declarations": [],
"experimental_resource_declarations": [],
"protocol_declarations": [],
"service_declarations": [],
"struct_declarations": [
{
"name": "test.encapsulatedstructs/ArrayInt16Int8",
"naming_context": [
"ArrayInt16Int8"
],
"location": {
"filename": "../../tools/fidl/fidlc/testdata/encapsulated_structs.test.fidl",
"line": 17,
"column": 6,
"length": 14
},
"members": [
{
"type": {
"kind": "array",
"element_type": {
"kind": "identifier",
"identifier": "test.encapsulatedstructs/Int16Int8",
"nullable": false,
"type_shape_v1": {
"inline_size": 4,
"alignment": 2,
"depth": 0,
"max_handles": 0,
"max_out_of_line": 0,
"has_padding": true,
"has_envelope": false,
"has_flexible_envelope": false
},
"type_shape_v2": {
"inline_size": 4,
"alignment": 2,
"depth": 0,
"max_handles": 0,
"max_out_of_line": 0,
"has_padding": true,
"has_envelope": false,
"has_flexible_envelope": false
}
},
"element_count": 3,
"type_shape_v1": {
"inline_size": 12,
"alignment": 2,
"depth": 0,
"max_handles": 0,
"max_out_of_line": 0,
"has_padding": true,
"has_envelope": false,
"has_flexible_envelope": false
},
"type_shape_v2": {
"inline_size": 12,
"alignment": 2,
"depth": 0,
"max_handles": 0,
"max_out_of_line": 0,
"has_padding": true,
"has_envelope": false,
"has_flexible_envelope": false
}
},
"name": "arr",
"location": {
"filename": "../../tools/fidl/fidlc/testdata/encapsulated_structs.test.fidl",
"line": 18,
"column": 5,
"length": 3
},
"field_shape_v1": {
"offset": 0,
"padding": 0
},
"field_shape_v2": {
"offset": 0,
"padding": 0
}
}
],
"resource": false,
"type_shape_v1": {
"inline_size": 12,
"alignment": 2,
"depth": 0,
"max_handles": 0,
"max_out_of_line": 0,
"has_padding": true,
"has_envelope": false,
"has_flexible_envelope": false
},
"type_shape_v2": {
"inline_size": 12,
"alignment": 2,
"depth": 0,
"max_handles": 0,
"max_out_of_line": 0,
"has_padding": true,
"has_envelope": false,
"has_flexible_envelope": false
}
},
{
"name": "test.encapsulatedstructs/Int16Int8",
"naming_context": [
"Int16Int8"
],
"location": {
"filename": "../../tools/fidl/fidlc/testdata/encapsulated_structs.test.fidl",
"line": 11,
"column": 6,
"length": 9
},
"members": [
{
"type": {
"kind": "primitive",
"subtype": "int16",
"type_shape_v1": {
"inline_size": 2,
"alignment": 2,
"depth": 0,
"max_handles": 0,
"max_out_of_line": 0,
"has_padding": false,
"has_envelope": false,
"has_flexible_envelope": false
},
"type_shape_v2": {
"inline_size": 2,
"alignment": 2,
"depth": 0,
"max_handles": 0,
"max_out_of_line": 0,
"has_padding": false,
"has_envelope": false,
"has_flexible_envelope": false
}
},
"name": "a",
"location": {
"filename": "../../tools/fidl/fidlc/testdata/encapsulated_structs.test.fidl",
"line": 12,
"column": 5,
"length": 1
},
"field_shape_v1": {
"offset": 0,
"padding": 0
},
"field_shape_v2": {
"offset": 0,
"padding": 0
}
},
{
"type": {
"kind": "primitive",
"subtype": "int8",
"type_shape_v1": {
"inline_size": 1,
"alignment": 1,
"depth": 0,
"max_handles": 0,
"max_out_of_line": 0,
"has_padding": false,
"has_envelope": false,
"has_flexible_envelope": false
},
"type_shape_v2": {
"inline_size": 1,
"alignment": 1,
"depth": 0,
"max_handles": 0,
"max_out_of_line": 0,
"has_padding": false,
"has_envelope": false,
"has_flexible_envelope": false
}
},
"name": "b",
"location": {
"filename": "../../tools/fidl/fidlc/testdata/encapsulated_structs.test.fidl",
"line": 13,
"column": 5,
"length": 1
},
"field_shape_v1": {
"offset": 2,
"padding": 1
},
"field_shape_v2": {
"offset": 2,
"padding": 1
}
}
],
"resource": false,
"type_shape_v1": {
"inline_size": 4,
"alignment": 2,
"depth": 0,
"max_handles": 0,
"max_out_of_line": 0,
"has_padding": true,
"has_envelope": false,
"has_flexible_envelope": false
},
"type_shape_v2": {
"inline_size": 4,
"alignment": 2,
"depth": 0,
"max_handles": 0,
"max_out_of_line": 0,
"has_padding": true,
"has_envelope": false,
"has_flexible_envelope": false
}
},
{
"name": "test.encapsulatedstructs/Int8Int32",
"naming_context": [
"Int8Int32"
],
"location": {
"filename": "../../tools/fidl/fidlc/testdata/encapsulated_structs.test.fidl",
"line": 5,
"column": 6,
"length": 9
},
"members": [
{
"type": {
"kind": "primitive",
"subtype": "int8",
"type_shape_v1": {
"inline_size": 1,
"alignment": 1,
"depth": 0,
"max_handles": 0,
"max_out_of_line": 0,
"has_padding": false,
"has_envelope": false,
"has_flexible_envelope": false
},
"type_shape_v2": {
"inline_size": 1,
"alignment": 1,
"depth": 0,
"max_handles": 0,
"max_out_of_line": 0,
"has_padding": false,
"has_envelope": false,
"has_flexible_envelope": false
}
},
"name": "a",
"location": {
"filename": "../../tools/fidl/fidlc/testdata/encapsulated_structs.test.fidl",
"line": 6,
"column": 5,
"length": 1
},
"field_shape_v1": {
"offset": 0,
"padding": 3
},
"field_shape_v2": {
"offset": 0,
"padding": 3
}
},
{
"type": {
"kind": "primitive",
"subtype": "int32",
"type_shape_v1": {
"inline_size": 4,
"alignment": 4,
"depth": 0,
"max_handles": 0,
"max_out_of_line": 0,
"has_padding": false,
"has_envelope": false,
"has_flexible_envelope": false
},
"type_shape_v2": {
"inline_size": 4,
"alignment": 4,
"depth": 0,
"max_handles": 0,
"max_out_of_line": 0,
"has_padding": false,
"has_envelope": false,
"has_flexible_envelope": false
}
},
"name": "b",
"location": {
"filename": "../../tools/fidl/fidlc/testdata/encapsulated_structs.test.fidl",
"line": 8,
"column": 5,
"length": 1
},
"field_shape_v1": {
"offset": 4,
"padding": 0
},
"field_shape_v2": {
"offset": 4,
"padding": 0
}
}
],
"resource": false,
"type_shape_v1": {
"inline_size": 8,
"alignment": 4,
"depth": 0,
"max_handles": 0,
"max_out_of_line": 0,
"has_padding": true,
"has_envelope": false,
"has_flexible_envelope": false
},
"type_shape_v2": {
"inline_size": 8,
"alignment": 4,
"depth": 0,
"max_handles": 0,
"max_out_of_line": 0,
"has_padding": true,
"has_envelope": false,
"has_flexible_envelope": false
}
},
{
"name": "test.encapsulatedstructs/NonInlineStructTestStruct",
"naming_context": [
"NonInlineStructTestStruct"
],
"location": {
"filename": "../../tools/fidl/fidlc/testdata/encapsulated_structs.test.fidl",
"line": 33,
"column": 6,
"length": 25
},
"members": [
{
"type": {
"kind": "identifier",
"identifier": "test.encapsulatedstructs/Int16Int8",
"nullable": true,
"type_shape_v1": {
"inline_size": 8,
"alignment": 8,
"depth": 1,
"max_handles": 0,
"max_out_of_line": 8,
"has_padding": true,
"has_envelope": false,
"has_flexible_envelope": false
},
"type_shape_v2": {
"inline_size": 8,
"alignment": 8,
"depth": 1,
"max_handles": 0,
"max_out_of_line": 8,
"has_padding": true,
"has_envelope": false,
"has_flexible_envelope": false
}
},
"name": "element",
"location": {
"filename": "../../tools/fidl/fidlc/testdata/encapsulated_structs.test.fidl",
"line": 34,
"column": 5,
"length": 7
},
"field_shape_v1": {
"offset": 0,
"padding": 0
},
"field_shape_v2": {
"offset": 0,
"padding": 0
}
},
{
"type": {
"kind": "handle",
"obj_type": 0,
"subtype": "handle",
"rights": 2147483648,
"nullable": false,
"resource_identifier": "zx/handle",
"type_shape_v1": {
"inline_size": 4,
"alignment": 4,
"depth": 0,
"max_handles": 1,
"max_out_of_line": 0,
"has_padding": false,
"has_envelope": false,
"has_flexible_envelope": false
},
"type_shape_v2": {
"inline_size": 4,
"alignment": 4,
"depth": 0,
"max_handles": 1,
"max_out_of_line": 0,
"has_padding": false,
"has_envelope": false,
"has_flexible_envelope": false
}
},
"name": "h",
"location": {
"filename": "../../tools/fidl/fidlc/testdata/encapsulated_structs.test.fidl",
"line": 35,
"column": 5,
"length": 1
},
"field_shape_v1": {
"offset": 8,
"padding": 4
},
"field_shape_v2": {
"offset": 8,
"padding": 4
}
}
],
"resource": true,
"type_shape_v1": {
"inline_size": 16,
"alignment": 8,
"depth": 1,
"max_handles": 1,
"max_out_of_line": 8,
"has_padding": true,
"has_envelope": false,
"has_flexible_envelope": false
},
"type_shape_v2": {
"inline_size": 16,
"alignment": 8,
"depth": 1,
"max_handles": 1,
"max_out_of_line": 8,
"has_padding": true,
"has_envelope": false,
"has_flexible_envelope": false
}
},
{
"name": "test.encapsulatedstructs/StructPaddingTestStruct",
"naming_context": [
"StructPaddingTestStruct"
],
"location": {
"filename": "../../tools/fidl/fidlc/testdata/encapsulated_structs.test.fidl",
"line": 22,
"column": 6,
"length": 23
},
"members": [
{
"type": {
"kind": "identifier",
"identifier": "test.encapsulatedstructs/Int16Int8",
"nullable": false,
"type_shape_v1": {
"inline_size": 4,
"alignment": 2,
"depth": 0,
"max_handles": 0,
"max_out_of_line": 0,
"has_padding": true,
"has_envelope": false,
"has_flexible_envelope": false
},
"type_shape_v2": {
"inline_size": 4,
"alignment": 2,
"depth": 0,
"max_handles": 0,
"max_out_of_line": 0,
"has_padding": true,
"has_envelope": false,
"has_flexible_envelope": false
}
},
"name": "trailing",
"location": {
"filename": "../../tools/fidl/fidlc/testdata/encapsulated_structs.test.fidl",
"line": 23,
"column": 5,
"length": 8
},
"field_shape_v1": {
"offset": 0,
"padding": 0
},
"field_shape_v2": {
"offset": 0,
"padding": 0
}
},
{
"type": {
"kind": "identifier",
"identifier": "test.encapsulatedstructs/Int8Int32",
"nullable": false,
"type_shape_v1": {
"inline_size": 8,
"alignment": 4,
"depth": 0,
"max_handles": 0,
"max_out_of_line": 0,
"has_padding": true,
"has_envelope": false,
"has_flexible_envelope": false
},
"type_shape_v2": {
"inline_size": 8,
"alignment": 4,
"depth": 0,
"max_handles": 0,
"max_out_of_line": 0,
"has_padding": true,
"has_envelope": false,
"has_flexible_envelope": false
}
},
"name": "inner",
"location": {
"filename": "../../tools/fidl/fidlc/testdata/encapsulated_structs.test.fidl",
"line": 27,
"column": 5,
"length": 5
},
"field_shape_v1": {
"offset": 4,
"padding": 0
},
"field_shape_v2": {
"offset": 4,
"padding": 0
}
},
{
"type": {
"kind": "identifier",
"identifier": "test.encapsulatedstructs/ArrayInt16Int8",
"nullable": false,
"type_shape_v1": {
"inline_size": 12,
"alignment": 2,
"depth": 0,
"max_handles": 0,
"max_out_of_line": 0,
"has_padding": true,
"has_envelope": false,
"has_flexible_envelope": false
},
"type_shape_v2": {
"inline_size": 12,
"alignment": 2,
"depth": 0,
"max_handles": 0,
"max_out_of_line": 0,
"has_padding": true,
"has_envelope": false,
"has_flexible_envelope": false
}
},
"name": "array",
"location": {
"filename": "../../tools/fidl/fidlc/testdata/encapsulated_structs.test.fidl",
"line": 28,
"column": 5,
"length": 5
},
"field_shape_v1": {
"offset": 12,
"padding": 0
},
"field_shape_v2": {
"offset": 12,
"padding": 0
}
}
],
"resource": false,
"type_shape_v1": {
"inline_size": 24,
"alignment": 4,
"depth": 0,
"max_handles": 0,
"max_out_of_line": 0,
"has_padding": true,
"has_envelope": false,
"has_flexible_envelope": false
},
"type_shape_v2": {
"inline_size": 24,
"alignment": 4,
"depth": 0,
"max_handles": 0,
"max_out_of_line": 0,
"has_padding": true,
"has_envelope": false,
"has_flexible_envelope": false
}
},
{
"name": "test.encapsulatedstructs/TopLevelStruct",
"naming_context": [
"TopLevelStruct"
],
"location": {
"filename": "../../tools/fidl/fidlc/testdata/encapsulated_structs.test.fidl",
"line": 39,
"column": 6,
"length": 14
},
"members": [
{
"type": {
"kind": "identifier",
"identifier": "test.encapsulatedstructs/StructPaddingTestStruct",
"nullable": false,
"type_shape_v1": {
"inline_size": 24,
"alignment": 4,
"depth": 0,
"max_handles": 0,
"max_out_of_line": 0,
"has_padding": true,
"has_envelope": false,
"has_flexible_envelope": false
},
"type_shape_v2": {
"inline_size": 24,
"alignment": 4,
"depth": 0,
"max_handles": 0,
"max_out_of_line": 0,
"has_padding": true,
"has_envelope": false,
"has_flexible_envelope": false
}
},
"name": "a",
"location": {
"filename": "../../tools/fidl/fidlc/testdata/encapsulated_structs.test.fidl",
"line": 40,
"column": 5,
"length": 1
},
"field_shape_v1": {
"offset": 0,
"padding": 0
},
"field_shape_v2": {
"offset": 0,
"padding": 0
}
},
{
"type": {
"kind": "identifier",
"identifier": "test.encapsulatedstructs/NonInlineStructTestStruct",
"nullable": false,
"type_shape_v1": {
"inline_size": 16,
"alignment": 8,
"depth": 1,
"max_handles": 1,
"max_out_of_line": 8,
"has_padding": true,
"has_envelope": false,
"has_flexible_envelope": false
},
"type_shape_v2": {
"inline_size": 16,
"alignment": 8,
"depth": 1,
"max_handles": 1,
"max_out_of_line": 8,
"has_padding": true,
"has_envelope": false,
"has_flexible_envelope": false
}
},
"name": "b",
"location": {
"filename": "../../tools/fidl/fidlc/testdata/encapsulated_structs.test.fidl",
"line": 41,
"column": 5,
"length": 1
},
"field_shape_v1": {
"offset": 24,
"padding": 0
},
"field_shape_v2": {
"offset": 24,
"padding": 0
}
}
],
"resource": true,
"type_shape_v1": {
"inline_size": 40,
"alignment": 8,
"depth": 1,
"max_handles": 1,
"max_out_of_line": 8,
"has_padding": true,
"has_envelope": false,
"has_flexible_envelope": false
},
"type_shape_v2": {
"inline_size": 40,
"alignment": 8,
"depth": 1,
"max_handles": 1,
"max_out_of_line": 8,
"has_padding": true,
"has_envelope": false,
"has_flexible_envelope": false
}
}
],
"external_struct_declarations": [],
"table_declarations": [],
"union_declarations": [],
"type_alias_declarations": [],
"declaration_order": [
"test.encapsulatedstructs/NonInlineStructTestStruct",
"test.encapsulatedstructs/Int8Int32",
"test.encapsulatedstructs/Int16Int8",
"test.encapsulatedstructs/ArrayInt16Int8",
"test.encapsulatedstructs/StructPaddingTestStruct",
"test.encapsulatedstructs/TopLevelStruct"
],
"declarations": {
"test.encapsulatedstructs/ArrayInt16Int8": "struct",
"test.encapsulatedstructs/Int16Int8": "struct",
"test.encapsulatedstructs/Int8Int32": "struct",
"test.encapsulatedstructs/NonInlineStructTestStruct": "struct",
"test.encapsulatedstructs/StructPaddingTestStruct": "struct",
"test.encapsulatedstructs/TopLevelStruct": "struct"
}
}