blob: 07097a859a07c4c4d4abb0f45d69d3da552a54ee [file] [log] [blame]
{
"name": "test.placementofattributes",
"library_dependencies": [
{
"name": "test.exampleusing",
"declarations": {
"test.exampleusing/Empty": {
"kind": "struct",
"resource": false
}
}
}
],
"bits_declarations": [
{
"name": "test.placementofattributes/ExampleBits",
"naming_context": [
"ExampleBits"
],
"location": {
"filename": "../../tools/fidl/fidlc/testdata/placement_of_attributes/example.test.fidl",
"line": 7,
"column": 6,
"length": 11
},
"maybe_attributes": [
{
"name": "on_bits",
"arguments": [],
"location": {
"filename": "../../tools/fidl/fidlc/testdata/placement_of_attributes/example.test.fidl",
"line": 6,
"column": 1,
"length": 8
}
}
],
"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
}
},
"mask": "1",
"members": [
{
"name": "MEMBER",
"location": {
"filename": "../../tools/fidl/fidlc/testdata/placement_of_attributes/example.test.fidl",
"line": 9,
"column": 5,
"length": 6
},
"value": {
"kind": "literal",
"value": "1",
"expression": "1",
"literal": {
"kind": "numeric",
"value": "1",
"expression": "1"
}
},
"maybe_attributes": [
{
"name": "on_bits_member",
"arguments": [],
"location": {
"filename": "../../tools/fidl/fidlc/testdata/placement_of_attributes/example.test.fidl",
"line": 8,
"column": 5,
"length": 15
}
}
]
}
],
"strict": true
}
],
"const_declarations": [
{
"name": "test.placementofattributes/EXAMPLE_CONST",
"location": {
"filename": "../../tools/fidl/fidlc/testdata/placement_of_attributes/example.test.fidl",
"line": 13,
"column": 7,
"length": 13
},
"maybe_attributes": [
{
"name": "on_const",
"arguments": [],
"location": {
"filename": "../../tools/fidl/fidlc/testdata/placement_of_attributes/example.test.fidl",
"line": 12,
"column": 1,
"length": 9
}
}
],
"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
}
},
"value": {
"kind": "literal",
"value": "0",
"expression": "0",
"literal": {
"kind": "numeric",
"value": "0",
"expression": "0"
}
}
}
],
"enum_declarations": [
{
"name": "test.placementofattributes/ExampleEnum",
"naming_context": [
"ExampleEnum"
],
"location": {
"filename": "../../tools/fidl/fidlc/testdata/placement_of_attributes/example.test.fidl",
"line": 16,
"column": 6,
"length": 11
},
"maybe_attributes": [
{
"name": "on_enum",
"arguments": [],
"location": {
"filename": "../../tools/fidl/fidlc/testdata/placement_of_attributes/example.test.fidl",
"line": 15,
"column": 1,
"length": 8
}
}
],
"type": "uint32",
"members": [
{
"name": "MEMBER",
"location": {
"filename": "../../tools/fidl/fidlc/testdata/placement_of_attributes/example.test.fidl",
"line": 18,
"column": 5,
"length": 6
},
"value": {
"kind": "literal",
"value": "1",
"expression": "1",
"literal": {
"kind": "numeric",
"value": "1",
"expression": "1"
}
},
"maybe_attributes": [
{
"name": "on_enum_member",
"arguments": [],
"location": {
"filename": "../../tools/fidl/fidlc/testdata/placement_of_attributes/example.test.fidl",
"line": 17,
"column": 5,
"length": 15
}
}
]
}
],
"strict": true
}
],
"experimental_resource_declarations": [],
"protocol_declarations": [
{
"name": "test.placementofattributes/ExampleProtocol",
"location": {
"filename": "../../tools/fidl/fidlc/testdata/placement_of_attributes/example.test.fidl",
"line": 22,
"column": 10,
"length": 15
},
"maybe_attributes": [
{
"name": "on_protocol",
"arguments": [],
"location": {
"filename": "../../tools/fidl/fidlc/testdata/placement_of_attributes/example.test.fidl",
"line": 21,
"column": 1,
"length": 12
}
}
],
"composed_protocols": [],
"methods": [
{
"ordinal": 6023439637367187273,
"name": "Method",
"location": {
"filename": "../../tools/fidl/fidlc/testdata/placement_of_attributes/example.test.fidl",
"line": 24,
"column": 5,
"length": 6
},
"has_request": true,
"maybe_attributes": [
{
"name": "on_method",
"arguments": [],
"location": {
"filename": "../../tools/fidl/fidlc/testdata/placement_of_attributes/example.test.fidl",
"line": 23,
"column": 5,
"length": 10
}
}
],
"maybe_request_payload": {
"kind": "identifier",
"identifier": "test.placementofattributes/ExampleProtocolMethodRequest",
"nullable": false,
"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
}
},
"has_response": false,
"is_composed": false,
"has_error": false
}
]
}
],
"service_declarations": [],
"struct_declarations": [
{
"name": "test.placementofattributes/ExampleProtocolMethodRequest",
"naming_context": [
"ExampleProtocol",
"Method",
"Request"
],
"location": {
"filename": "../../tools/fidl/fidlc/testdata/placement_of_attributes/example.test.fidl",
"line": 24,
"column": 12,
"length": 51
},
"members": [
{
"type": {
"kind": "identifier",
"identifier": "test.exampleusing/Empty",
"nullable": false,
"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": "arg",
"location": {
"filename": "../../tools/fidl/fidlc/testdata/placement_of_attributes/example.test.fidl",
"line": 25,
"column": 9,
"length": 3
},
"field_shape_v1": {
"offset": 0,
"padding": 0
},
"field_shape_v2": {
"offset": 0,
"padding": 0
}
}
],
"resource": false,
"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": "test.placementofattributes/ExampleStruct",
"naming_context": [
"ExampleStruct"
],
"location": {
"filename": "../../tools/fidl/fidlc/testdata/placement_of_attributes/example.test.fidl",
"line": 30,
"column": 6,
"length": 13
},
"maybe_attributes": [
{
"name": "on_struct",
"arguments": [],
"location": {
"filename": "../../tools/fidl/fidlc/testdata/placement_of_attributes/example.test.fidl",
"line": 29,
"column": 1,
"length": 10
}
}
],
"members": [
{
"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
}
},
"name": "member",
"location": {
"filename": "../../tools/fidl/fidlc/testdata/placement_of_attributes/example.test.fidl",
"line": 32,
"column": 5,
"length": 6
},
"maybe_attributes": [
{
"name": "on_struct_member",
"arguments": [],
"location": {
"filename": "../../tools/fidl/fidlc/testdata/placement_of_attributes/example.test.fidl",
"line": 31,
"column": 5,
"length": 17
}
}
],
"field_shape_v1": {
"offset": 0,
"padding": 0
},
"field_shape_v2": {
"offset": 0,
"padding": 0
}
}
],
"resource": 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
}
}
],
"external_struct_declarations": [],
"table_declarations": [
{
"name": "test.placementofattributes/ExampleTable",
"naming_context": [
"ExampleTable"
],
"location": {
"filename": "../../tools/fidl/fidlc/testdata/placement_of_attributes/example.test.fidl",
"line": 36,
"column": 6,
"length": 12
},
"maybe_attributes": [
{
"name": "on_table",
"arguments": [],
"location": {
"filename": "../../tools/fidl/fidlc/testdata/placement_of_attributes/example.test.fidl",
"line": 35,
"column": 1,
"length": 9
}
}
],
"members": [
{
"ordinal": 1,
"reserved": false,
"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
}
},
"name": "member",
"location": {
"filename": "../../tools/fidl/fidlc/testdata/placement_of_attributes/example.test.fidl",
"line": 38,
"column": 8,
"length": 6
},
"maybe_attributes": [
{
"name": "on_table_member",
"arguments": [],
"location": {
"filename": "../../tools/fidl/fidlc/testdata/placement_of_attributes/example.test.fidl",
"line": 37,
"column": 5,
"length": 16
}
}
]
}
],
"strict": false,
"resource": false,
"type_shape_v1": {
"inline_size": 16,
"alignment": 8,
"depth": 2,
"max_handles": 0,
"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": 0,
"max_out_of_line": 8,
"has_padding": true,
"has_envelope": true,
"has_flexible_envelope": true
}
}
],
"union_declarations": [
{
"name": "test.placementofattributes/ExampleUnion",
"naming_context": [
"ExampleUnion"
],
"location": {
"filename": "../../tools/fidl/fidlc/testdata/placement_of_attributes/example.test.fidl",
"line": 45,
"column": 6,
"length": 12
},
"maybe_attributes": [
{
"name": "on_union",
"arguments": [],
"location": {
"filename": "../../tools/fidl/fidlc/testdata/placement_of_attributes/example.test.fidl",
"line": 44,
"column": 1,
"length": 9
}
}
],
"members": [
{
"ordinal": 1,
"reserved": false,
"name": "variant",
"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
}
},
"location": {
"filename": "../../tools/fidl/fidlc/testdata/placement_of_attributes/example.test.fidl",
"line": 47,
"column": 8,
"length": 7
},
"maybe_attributes": [
{
"name": "on_union_member",
"arguments": [],
"location": {
"filename": "../../tools/fidl/fidlc/testdata/placement_of_attributes/example.test.fidl",
"line": 46,
"column": 5,
"length": 16
}
}
]
}
],
"strict": true,
"resource": false,
"type_shape_v1": {
"inline_size": 24,
"alignment": 8,
"depth": 1,
"max_handles": 0,
"max_out_of_line": 8,
"has_padding": true,
"has_envelope": true,
"has_flexible_envelope": false
},
"type_shape_v2": {
"inline_size": 16,
"alignment": 8,
"depth": 1,
"max_handles": 0,
"max_out_of_line": 0,
"has_padding": true,
"has_envelope": true,
"has_flexible_envelope": false
}
},
{
"name": "test.placementofattributes/ExampleXUnion",
"naming_context": [
"ExampleXUnion"
],
"location": {
"filename": "../../tools/fidl/fidlc/testdata/placement_of_attributes/example.test.fidl",
"line": 51,
"column": 6,
"length": 13
},
"maybe_attributes": [
{
"name": "on_x_union",
"arguments": [],
"location": {
"filename": "../../tools/fidl/fidlc/testdata/placement_of_attributes/example.test.fidl",
"line": 50,
"column": 1,
"length": 11
}
}
],
"members": [
{
"ordinal": 1,
"reserved": false,
"name": "variant",
"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
}
},
"location": {
"filename": "../../tools/fidl/fidlc/testdata/placement_of_attributes/example.test.fidl",
"line": 53,
"column": 8,
"length": 7
},
"maybe_attributes": [
{
"name": "on_x_union_member",
"arguments": [],
"location": {
"filename": "../../tools/fidl/fidlc/testdata/placement_of_attributes/example.test.fidl",
"line": 52,
"column": 5,
"length": 18
}
}
]
}
],
"strict": false,
"resource": false,
"type_shape_v1": {
"inline_size": 24,
"alignment": 8,
"depth": 1,
"max_handles": 0,
"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": 0,
"max_out_of_line": 0,
"has_padding": true,
"has_envelope": true,
"has_flexible_envelope": true
}
}
],
"type_alias_declarations": [
{
"name": "test.placementofattributes/TypeAlias",
"location": {
"filename": "../../tools/fidl/fidlc/testdata/placement_of_attributes/example.test.fidl",
"line": 42,
"column": 7,
"length": 9
},
"maybe_attributes": [
{
"name": "on_type_alias",
"arguments": [],
"location": {
"filename": "../../tools/fidl/fidlc/testdata/placement_of_attributes/example.test.fidl",
"line": 41,
"column": 1,
"length": 14
}
}
],
"partial_type_ctor": {
"name": "uint32",
"args": [],
"nullable": false
}
}
],
"declaration_order": [
"test.placementofattributes/TypeAlias",
"test.placementofattributes/ExampleXUnion",
"test.placementofattributes/ExampleUnion",
"test.placementofattributes/ExampleTable",
"test.placementofattributes/ExampleStruct",
"test.placementofattributes/ExampleProtocolMethodRequest",
"test.placementofattributes/ExampleProtocol",
"test.placementofattributes/ExampleEnum",
"test.placementofattributes/ExampleBits",
"test.placementofattributes/EXAMPLE_CONST"
],
"declarations": {
"test.placementofattributes/ExampleBits": "bits",
"test.placementofattributes/EXAMPLE_CONST": "const",
"test.placementofattributes/ExampleEnum": "enum",
"test.placementofattributes/ExampleProtocol": "protocol",
"test.placementofattributes/ExampleProtocolMethodRequest": "struct",
"test.placementofattributes/ExampleStruct": "struct",
"test.placementofattributes/ExampleTable": "table",
"test.placementofattributes/ExampleUnion": "union",
"test.placementofattributes/ExampleXUnion": "union",
"test.placementofattributes/TypeAlias": "type_alias"
}
}