blob: fed4b2b543cb4813000a905f663904fecf3f019b [file] [log] [blame]
{
"name": "test.handlesintypes",
"library_dependencies": [],
"bits_declarations": [],
"const_declarations": [],
"enum_declarations": [
{
"name": "test.handlesintypes/obj_type",
"naming_context": [
"obj_type"
],
"location": {
"filename": "../../tools/fidl/fidlc/testdata/handles_in_types.test.fidl",
"line": 6,
"column": 6,
"length": 8
},
"type": "uint32",
"members": [
{
"name": "NONE",
"location": {
"filename": "../../tools/fidl/fidlc/testdata/handles_in_types.test.fidl",
"line": 7,
"column": 5,
"length": 4
},
"value": {
"kind": "literal",
"value": "0",
"expression": "0",
"literal": {
"kind": "numeric",
"value": "0",
"expression": "0"
}
}
},
{
"name": "VMO",
"location": {
"filename": "../../tools/fidl/fidlc/testdata/handles_in_types.test.fidl",
"line": 8,
"column": 5,
"length": 3
},
"value": {
"kind": "literal",
"value": "3",
"expression": "3",
"literal": {
"kind": "numeric",
"value": "3",
"expression": "3"
}
}
}
],
"strict": true
}
],
"experimental_resource_declarations": [
{
"name": "test.handlesintypes/handle",
"location": {
"filename": "../../tools/fidl/fidlc/testdata/handles_in_types.test.fidl",
"line": 11,
"column": 21,
"length": 6
},
"type": {
"kind": "primitive",
"subtype": "uint32",
"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
}
},
"properties": [
{
"name": "subtype",
"location": {
"filename": "../../tools/fidl/fidlc/testdata/handles_in_types.test.fidl",
"line": 13,
"column": 9,
"length": 7
},
"type": {
"kind": "identifier",
"identifier": "test.handlesintypes/obj_type",
"nullable": false,
"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
}
}
}
]
}
],
"protocol_declarations": [],
"service_declarations": [],
"struct_declarations": [
{
"name": "test.handlesintypes/HandlesInTypes",
"naming_context": [
"HandlesInTypes"
],
"location": {
"filename": "../../tools/fidl/fidlc/testdata/handles_in_types.test.fidl",
"line": 25,
"column": 6,
"length": 14
},
"members": [
{
"type": {
"kind": "handle",
"obj_type": 3,
"subtype": "vmo",
"rights": 2147483648,
"nullable": false,
"resource_identifier": "test.handlesintypes/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": "normal_handle",
"location": {
"filename": "../../tools/fidl/fidlc/testdata/handles_in_types.test.fidl",
"line": 26,
"column": 5,
"length": 13
},
"field_shape_v1": {
"offset": 0,
"padding": 4
},
"field_shape_v2": {
"offset": 0,
"padding": 4
}
},
{
"type": {
"kind": "vector",
"element_type": {
"kind": "handle",
"obj_type": 3,
"subtype": "vmo",
"rights": 2147483648,
"nullable": false,
"resource_identifier": "test.handlesintypes/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
}
},
"nullable": false,
"type_shape_v1": {
"inline_size": 16,
"alignment": 8,
"depth": 1,
"max_handles": 4294967295,
"max_out_of_line": 4294967295,
"has_padding": true,
"has_envelope": false,
"has_flexible_envelope": false
},
"type_shape_v2": {
"inline_size": 16,
"alignment": 8,
"depth": 1,
"max_handles": 4294967295,
"max_out_of_line": 4294967295,
"has_padding": true,
"has_envelope": false,
"has_flexible_envelope": false
}
},
"name": "handle_in_vec",
"location": {
"filename": "../../tools/fidl/fidlc/testdata/handles_in_types.test.fidl",
"line": 28,
"column": 5,
"length": 13
},
"field_shape_v1": {
"offset": 8,
"padding": 0
},
"field_shape_v2": {
"offset": 8,
"padding": 0
}
},
{
"type": {
"kind": "array",
"element_type": {
"kind": "handle",
"obj_type": 3,
"subtype": "vmo",
"rights": 2147483648,
"nullable": false,
"resource_identifier": "test.handlesintypes/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
}
},
"element_count": 5,
"type_shape_v1": {
"inline_size": 20,
"alignment": 4,
"depth": 0,
"max_handles": 5,
"max_out_of_line": 0,
"has_padding": false,
"has_envelope": false,
"has_flexible_envelope": false
},
"type_shape_v2": {
"inline_size": 20,
"alignment": 4,
"depth": 0,
"max_handles": 5,
"max_out_of_line": 0,
"has_padding": false,
"has_envelope": false,
"has_flexible_envelope": false
}
},
"name": "handle_in_array",
"location": {
"filename": "../../tools/fidl/fidlc/testdata/handles_in_types.test.fidl",
"line": 29,
"column": 5,
"length": 15
},
"field_shape_v1": {
"offset": 24,
"padding": 4
},
"field_shape_v2": {
"offset": 24,
"padding": 4
}
},
{
"type": {
"kind": "vector",
"element_type": {
"kind": "array",
"element_type": {
"kind": "handle",
"obj_type": 3,
"subtype": "vmo",
"rights": 2147483648,
"nullable": false,
"resource_identifier": "test.handlesintypes/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
}
},
"element_count": 5,
"type_shape_v1": {
"inline_size": 20,
"alignment": 4,
"depth": 0,
"max_handles": 5,
"max_out_of_line": 0,
"has_padding": false,
"has_envelope": false,
"has_flexible_envelope": false
},
"type_shape_v2": {
"inline_size": 20,
"alignment": 4,
"depth": 0,
"max_handles": 5,
"max_out_of_line": 0,
"has_padding": false,
"has_envelope": false,
"has_flexible_envelope": false
}
},
"nullable": false,
"type_shape_v1": {
"inline_size": 16,
"alignment": 8,
"depth": 1,
"max_handles": 4294967295,
"max_out_of_line": 4294967295,
"has_padding": true,
"has_envelope": false,
"has_flexible_envelope": false
},
"type_shape_v2": {
"inline_size": 16,
"alignment": 8,
"depth": 1,
"max_handles": 4294967295,
"max_out_of_line": 4294967295,
"has_padding": true,
"has_envelope": false,
"has_flexible_envelope": false
}
},
"name": "handle_in_mixed_vec_array",
"location": {
"filename": "../../tools/fidl/fidlc/testdata/handles_in_types.test.fidl",
"line": 30,
"column": 5,
"length": 25
},
"field_shape_v1": {
"offset": 48,
"padding": 0
},
"field_shape_v2": {
"offset": 48,
"padding": 0
}
},
{
"type": {
"kind": "identifier",
"identifier": "test.handlesintypes/TableWithHandle",
"nullable": false,
"type_shape_v1": {
"inline_size": 16,
"alignment": 8,
"depth": 2,
"max_handles": 1,
"max_out_of_line": 24,
"has_padding": true,
"has_envelope": true,
"has_flexible_envelope": true
},
"type_shape_v2": {
"inline_size": 16,
"alignment": 8,
"depth": 2,
"max_handles": 1,
"max_out_of_line": 8,
"has_padding": true,
"has_envelope": true,
"has_flexible_envelope": true
}
},
"name": "table_with_handle",
"location": {
"filename": "../../tools/fidl/fidlc/testdata/handles_in_types.test.fidl",
"line": 32,
"column": 5,
"length": 17
},
"field_shape_v1": {
"offset": 64,
"padding": 0
},
"field_shape_v2": {
"offset": 64,
"padding": 0
}
},
{
"type": {
"kind": "identifier",
"identifier": "test.handlesintypes/UnionWithHandle",
"nullable": false,
"type_shape_v1": {
"inline_size": 24,
"alignment": 8,
"depth": 1,
"max_handles": 1,
"max_out_of_line": 8,
"has_padding": true,
"has_envelope": true,
"has_flexible_envelope": true
},
"type_shape_v2": {
"inline_size": 16,
"alignment": 8,
"depth": 1,
"max_handles": 1,
"max_out_of_line": 0,
"has_padding": true,
"has_envelope": true,
"has_flexible_envelope": true
}
},
"name": "union_with_handle",
"location": {
"filename": "../../tools/fidl/fidlc/testdata/handles_in_types.test.fidl",
"line": 33,
"column": 5,
"length": 17
},
"field_shape_v1": {
"offset": 80,
"padding": 0
},
"field_shape_v2": {
"offset": 80,
"padding": 0
}
}
],
"resource": true,
"type_shape_v1": {
"inline_size": 104,
"alignment": 8,
"depth": 2,
"max_handles": 4294967295,
"max_out_of_line": 4294967295,
"has_padding": true,
"has_envelope": true,
"has_flexible_envelope": true
},
"type_shape_v2": {
"inline_size": 96,
"alignment": 8,
"depth": 2,
"max_handles": 4294967295,
"max_out_of_line": 4294967295,
"has_padding": true,
"has_envelope": true,
"has_flexible_envelope": true
}
}
],
"external_struct_declarations": [],
"table_declarations": [
{
"name": "test.handlesintypes/TableWithHandle",
"naming_context": [
"TableWithHandle"
],
"location": {
"filename": "../../tools/fidl/fidlc/testdata/handles_in_types.test.fidl",
"line": 17,
"column": 6,
"length": 15
},
"members": [
{
"ordinal": 1,
"reserved": false,
"type": {
"kind": "handle",
"obj_type": 3,
"subtype": "vmo",
"rights": 2147483648,
"nullable": false,
"resource_identifier": "test.handlesintypes/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/handles_in_types.test.fidl",
"line": 18,
"column": 8,
"length": 1
}
}
],
"strict": false,
"resource": true,
"type_shape_v1": {
"inline_size": 16,
"alignment": 8,
"depth": 2,
"max_handles": 1,
"max_out_of_line": 24,
"has_padding": true,
"has_envelope": true,
"has_flexible_envelope": true
},
"type_shape_v2": {
"inline_size": 16,
"alignment": 8,
"depth": 2,
"max_handles": 1,
"max_out_of_line": 8,
"has_padding": true,
"has_envelope": true,
"has_flexible_envelope": true
}
}
],
"union_declarations": [
{
"name": "test.handlesintypes/UnionWithHandle",
"naming_context": [
"UnionWithHandle"
],
"location": {
"filename": "../../tools/fidl/fidlc/testdata/handles_in_types.test.fidl",
"line": 21,
"column": 6,
"length": 15
},
"members": [
{
"ordinal": 1,
"reserved": false,
"name": "h",
"type": {
"kind": "handle",
"obj_type": 3,
"subtype": "vmo",
"rights": 2147483648,
"nullable": false,
"resource_identifier": "test.handlesintypes/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
}
},
"location": {
"filename": "../../tools/fidl/fidlc/testdata/handles_in_types.test.fidl",
"line": 22,
"column": 8,
"length": 1
}
}
],
"strict": false,
"resource": true,
"type_shape_v1": {
"inline_size": 24,
"alignment": 8,
"depth": 1,
"max_handles": 1,
"max_out_of_line": 8,
"has_padding": true,
"has_envelope": true,
"has_flexible_envelope": true
},
"type_shape_v2": {
"inline_size": 16,
"alignment": 8,
"depth": 1,
"max_handles": 1,
"max_out_of_line": 0,
"has_padding": true,
"has_envelope": true,
"has_flexible_envelope": true
}
}
],
"type_alias_declarations": [],
"declaration_order": [
"test.handlesintypes/obj_type",
"test.handlesintypes/handle",
"test.handlesintypes/UnionWithHandle",
"test.handlesintypes/TableWithHandle",
"test.handlesintypes/HandlesInTypes"
],
"declarations": {
"test.handlesintypes/obj_type": "enum",
"test.handlesintypes/handle": "experimental_resource",
"test.handlesintypes/HandlesInTypes": "struct",
"test.handlesintypes/TableWithHandle": "table",
"test.handlesintypes/UnionWithHandle": "union"
}
}