Lines Matching refs:flat
37 flat::Type::Kind::kIdentifier, in MessageHeader()
38 flat::Decl::Kind::kStruct, in MessageHeader()
50 .kind = flat::Type::Kind::kPrimitive, in EmptyStructMember()
109 case flat::Type::Kind::kArray: in EmitMethodInParamDecl()
115 case flat::Type::Kind::kVector: in EmitMethodInParamDecl()
119 case flat::Type::Kind::kString: in EmitMethodInParamDecl()
123 case flat::Type::Kind::kHandle: in EmitMethodInParamDecl()
124 case flat::Type::Kind::kRequestHandle: in EmitMethodInParamDecl()
125 case flat::Type::Kind::kPrimitive: in EmitMethodInParamDecl()
128 case flat::Type::Kind::kIdentifier: in EmitMethodInParamDecl()
130 case flat::Decl::Kind::kConst: in EmitMethodInParamDecl()
133 case flat::Decl::Kind::kEnum: in EmitMethodInParamDecl()
134 case flat::Decl::Kind::kInterface: in EmitMethodInParamDecl()
137 case flat::Decl::Kind::kStruct: in EmitMethodInParamDecl()
138 case flat::Decl::Kind::kTable: in EmitMethodInParamDecl()
139 case flat::Decl::Kind::kUnion: in EmitMethodInParamDecl()
156 case flat::Type::Kind::kArray: in EmitMethodOutParamDecl()
162 case flat::Type::Kind::kVector: in EmitMethodOutParamDecl()
167 case flat::Type::Kind::kString: in EmitMethodOutParamDecl()
172 case flat::Type::Kind::kHandle: in EmitMethodOutParamDecl()
173 case flat::Type::Kind::kRequestHandle: in EmitMethodOutParamDecl()
174 case flat::Type::Kind::kPrimitive: in EmitMethodOutParamDecl()
177 case flat::Type::Kind::kIdentifier: in EmitMethodOutParamDecl()
179 case flat::Decl::Kind::kConst: in EmitMethodOutParamDecl()
182 case flat::Decl::Kind::kEnum: in EmitMethodOutParamDecl()
183 case flat::Decl::Kind::kInterface: in EmitMethodOutParamDecl()
186 case flat::Decl::Kind::kStruct: in EmitMethodOutParamDecl()
187 case flat::Decl::Kind::kTable: in EmitMethodOutParamDecl()
188 case flat::Decl::Kind::kUnion: in EmitMethodOutParamDecl()
255 if (member.kind == flat::Type::Kind::kVector || in IsStoredOutOfLine()
256 member.kind == flat::Type::Kind::kString) in IsStoredOutOfLine()
258 if (member.kind == flat::Type::Kind::kIdentifier) { in IsStoredOutOfLine()
260 … (member.decl_kind == flat::Decl::Kind::kStruct || member.decl_kind == flat::Decl::Kind::kUnion); in IsStoredOutOfLine()
268 if (member.kind == flat::Type::Kind::kVector) in EmitMeasureInParams()
270 else if (member.kind == flat::Type::Kind::kString) in EmitMeasureInParams()
282 if (member.kind == flat::Type::Kind::kVector) { in EmitParameterSizeValidation()
284 } else if (member.kind == flat::Type::Kind::kString) { in EmitParameterSizeValidation()
299 if (member.kind == flat::Type::Kind::kVector) in EmitMeasureOutParams()
301 else if (member.kind == flat::Type::Kind::kString) in EmitMeasureOutParams()
339 case flat::Type::Kind::kArray: in EmitLinearizeMessage()
345 case flat::Type::Kind::kVector: in EmitLinearizeMessage()
351 case flat::Type::Kind::kString: in EmitLinearizeMessage()
366 case flat::Type::Kind::kHandle: in EmitLinearizeMessage()
367 case flat::Type::Kind::kRequestHandle: in EmitLinearizeMessage()
368 case flat::Type::Kind::kPrimitive: in EmitLinearizeMessage()
371 case flat::Type::Kind::kIdentifier: in EmitLinearizeMessage()
373 case flat::Decl::Kind::kConst: in EmitLinearizeMessage()
376 case flat::Decl::Kind::kEnum: in EmitLinearizeMessage()
377 case flat::Decl::Kind::kInterface: in EmitLinearizeMessage()
380 case flat::Decl::Kind::kTable: in EmitLinearizeMessage()
383 case flat::Decl::Kind::kStruct: in EmitLinearizeMessage()
384 case flat::Decl::Kind::kUnion: in EmitLinearizeMessage()
407 void EnumValue(const flat::Constant* constant, std::string* out_value) { in EnumValue()
410 const flat::ConstantValue& const_val = constant->Value(); in EnumValue()
412 case flat::ConstantValue::Kind::kInt8: { in EnumValue()
413 auto value = static_cast<const flat::NumericConstantValue<int8_t>&>(const_val); in EnumValue()
417 case flat::ConstantValue::Kind::kInt16: { in EnumValue()
418 auto value = static_cast<const flat::NumericConstantValue<int16_t>&>(const_val); in EnumValue()
422 case flat::ConstantValue::Kind::kInt32: { in EnumValue()
423 auto value = static_cast<const flat::NumericConstantValue<int32_t>&>(const_val); in EnumValue()
427 case flat::ConstantValue::Kind::kInt64: { in EnumValue()
428 auto value = static_cast<const flat::NumericConstantValue<int64_t>&>(const_val); in EnumValue()
432 case flat::ConstantValue::Kind::kUint8: { in EnumValue()
433 auto value = static_cast<const flat::NumericConstantValue<uint8_t>&>(const_val); in EnumValue()
437 case flat::ConstantValue::Kind::kUint16: { in EnumValue()
438 auto value = static_cast<const flat::NumericConstantValue<uint16_t>&>(const_val); in EnumValue()
442 case flat::ConstantValue::Kind::kUint32: { in EnumValue()
443 auto value = static_cast<const flat::NumericConstantValue<uint32_t>&>(const_val); in EnumValue()
447 case flat::ConstantValue::Kind::kUint64: { in EnumValue()
448 auto value = static_cast<const flat::NumericConstantValue<uint64_t>&>(const_val); in EnumValue()
452 case flat::ConstantValue::Kind::kBool: in EnumValue()
453 case flat::ConstantValue::Kind::kFloat32: in EnumValue()
454 case flat::ConstantValue::Kind::kFloat64: in EnumValue()
455 case flat::ConstantValue::Kind::kString: in EnumValue()
463 flat::Decl::Kind GetDeclKind(const flat::Library* library, const flat::Type* type) { in GetDeclKind()
464 if (type->kind != flat::Type::Kind::kIdentifier) in GetDeclKind()
465 return flat::Decl::Kind::kConst; in GetDeclKind()
466 auto identifier_type = static_cast<const flat::IdentifierType*>(type); in GetDeclKind()
472 void ArrayCountsAndElementTypeName(const flat::Library* library, const flat::Type* type, in ArrayCountsAndElementTypeName()
483 case flat::Type::Kind::kArray: { in ArrayCountsAndElementTypeName()
484 auto array_type = static_cast<const flat::ArrayType*>(type); in ArrayCountsAndElementTypeName()
485 auto element_count = static_cast<const flat::Size&>(array_type->element_count->Value()); in ArrayCountsAndElementTypeName()
495 CGenerator::Member CreateMember(const flat::Library* library, const T& decl) { in CreateMember()
497 const flat::Type* type = decl.type.get(); in CreateMember()
505 case flat::Type::Kind::kArray: { in CreateMember()
512 case flat::Type::Kind::kVector: { in CreateMember()
513 auto vector_type = static_cast<const flat::VectorType*>(type); in CreateMember()
514 const flat::Type* element_type = vector_type->element_type.get(); in CreateMember()
518 static_cast<const flat::Size&>(vector_type->element_count.get()->Value()).value; in CreateMember()
521 case flat::Type::Kind::kIdentifier: { in CreateMember()
523 static_cast<const flat::IdentifierType*>(type); in CreateMember()
527 case flat::Type::Kind::kString: { in CreateMember()
528 auto string_type = static_cast<const flat::StringType*>(type); in CreateMember()
531 static_cast<const flat::Size&>(string_type->max_size.get()->Value()).value; in CreateMember()
534 case flat::Type::Kind::kHandle: in CreateMember()
536 case flat::Type::Kind::kRequestHandle: in CreateMember()
538 case flat::Type::Kind::kPrimitive: in CreateMember()
554 GenerateMembers(const flat::Library* library, in GenerateMembers()
555 const std::vector<flat::Union::Member>& union_members) { in GenerateMembers()
564 void GetMethodParameters(const flat::Library* library, in GetMethodParameters()
703 std::map<const flat::Decl*, CGenerator::NamedConst>
704 CGenerator::NameConsts(const std::vector<std::unique_ptr<flat::Const>>& const_infos) { in NameConsts()
705 std::map<const flat::Decl*, NamedConst> named_consts; in NameConsts()
712 std::map<const flat::Decl*, CGenerator::NamedEnum>
713 CGenerator::NameEnums(const std::vector<std::unique_ptr<flat::Enum>>& enum_infos) { in NameEnums()
714 std::map<const flat::Decl*, NamedEnum> named_enums; in NameEnums()
722 std::map<const flat::Decl*, CGenerator::NamedInterface>
723 CGenerator::NameInterfaces(const std::vector<std::unique_ptr<flat::Interface>>& interface_infos) { in NameInterfaces()
724 std::map<const flat::Decl*, NamedInterface> named_interfaces; in NameInterfaces()
774 std::map<const flat::Decl*, CGenerator::NamedStruct>
775 CGenerator::NameStructs(const std::vector<std::unique_ptr<flat::Struct>>& struct_infos) { in NameStructs()
776 std::map<const flat::Decl*, NamedStruct> named_structs; in NameStructs()
788 std::map<const flat::Decl*, CGenerator::NamedTable>
789 CGenerator::NameTables(const std::vector<std::unique_ptr<flat::Table>>& table_infos) { in NameTables()
790 std::map<const flat::Decl*, NamedTable> named_tables; in NameTables()
800 std::map<const flat::Decl*, CGenerator::NamedUnion>
801 CGenerator::NameUnions(const std::vector<std::unique_ptr<flat::Union>>& union_infos) { in NameUnions()
802 std::map<const flat::Decl*, NamedUnion> named_unions; in NameUnions()
867 const flat::Const& ci = named_const.const_info; in ProduceConstDeclaration()
870 if (ci.value->kind != flat::Constant::Kind::kLiteral) { in ProduceConstDeclaration()
875 case flat::Type::Kind::kPrimitive: in ProduceConstDeclaration()
877 static_cast<flat::PrimitiveType*>(ci.type.get())->subtype, in ProduceConstDeclaration()
878 … static_cast<flat::LiteralConstant*>(ci.value.get())->literal->location().data()); in ProduceConstDeclaration()
880 case flat::Type::Kind::kString: in ProduceConstDeclaration()
882 … static_cast<flat::LiteralConstant*>(ci.value.get())->literal->location().data()); in ProduceConstDeclaration()
1079 if (member.kind == flat::Type::Kind::kVector) { in ProduceInterfaceClientImplementation()
1083 } else if (member.kind == flat::Type::Kind::kString) { in ProduceInterfaceClientImplementation()
1131 case flat::Type::Kind::kArray: in ProduceInterfaceClientImplementation()
1136 case flat::Type::Kind::kVector: in ProduceInterfaceClientImplementation()
1140 case flat::Type::Kind::kString: in ProduceInterfaceClientImplementation()
1144 case flat::Type::Kind::kHandle: in ProduceInterfaceClientImplementation()
1145 case flat::Type::Kind::kRequestHandle: in ProduceInterfaceClientImplementation()
1146 case flat::Type::Kind::kPrimitive: in ProduceInterfaceClientImplementation()
1149 case flat::Type::Kind::kIdentifier: in ProduceInterfaceClientImplementation()
1151 case flat::Decl::Kind::kConst: in ProduceInterfaceClientImplementation()
1154 case flat::Decl::Kind::kEnum: in ProduceInterfaceClientImplementation()
1155 case flat::Decl::Kind::kInterface: in ProduceInterfaceClientImplementation()
1158 case flat::Decl::Kind::kTable: in ProduceInterfaceClientImplementation()
1161 case flat::Decl::Kind::kStruct: in ProduceInterfaceClientImplementation()
1162 case flat::Decl::Kind::kUnion: in ProduceInterfaceClientImplementation()
1250 case flat::Type::Kind::kArray: in ProduceInterfaceServerImplementation()
1251 case flat::Type::Kind::kHandle: in ProduceInterfaceServerImplementation()
1252 case flat::Type::Kind::kRequestHandle: in ProduceInterfaceServerImplementation()
1253 case flat::Type::Kind::kPrimitive: in ProduceInterfaceServerImplementation()
1256 case flat::Type::Kind::kVector: in ProduceInterfaceServerImplementation()
1260 case flat::Type::Kind::kString: in ProduceInterfaceServerImplementation()
1264 case flat::Type::Kind::kIdentifier: in ProduceInterfaceServerImplementation()
1266 case flat::Decl::Kind::kConst: in ProduceInterfaceServerImplementation()
1269 case flat::Decl::Kind::kEnum: in ProduceInterfaceServerImplementation()
1270 case flat::Decl::Kind::kInterface: in ProduceInterfaceServerImplementation()
1273 case flat::Decl::Kind::kTable: in ProduceInterfaceServerImplementation()
1276 case flat::Decl::Kind::kStruct: in ProduceInterfaceServerImplementation()
1277 case flat::Decl::Kind::kUnion: in ProduceInterfaceServerImplementation()
1372 std::map<const flat::Decl*, NamedConst> named_consts = in ProduceHeader()
1374 std::map<const flat::Decl*, NamedEnum> named_enums = NameEnums(library_->enum_declarations_); in ProduceHeader()
1375 std::map<const flat::Decl*, NamedInterface> named_interfaces = in ProduceHeader()
1377 std::map<const flat::Decl*, NamedStruct> named_structs = in ProduceHeader()
1379 std::map<const flat::Decl*, NamedTable> named_tables = in ProduceHeader()
1381 std::map<const flat::Decl*, NamedUnion> named_unions = in ProduceHeader()
1388 case flat::Decl::Kind::kConst: { in ProduceHeader()
1395 case flat::Decl::Kind::kEnum: { in ProduceHeader()
1402 case flat::Decl::Kind::kInterface: { in ProduceHeader()
1409 case flat::Decl::Kind::kStruct: { in ProduceHeader()
1416 case flat::Decl::Kind::kTable: { in ProduceHeader()
1423 case flat::Decl::Kind::kUnion: { in ProduceHeader()
1439 case flat::Decl::Kind::kConst: in ProduceHeader()
1440 case flat::Decl::Kind::kEnum: in ProduceHeader()
1441 case flat::Decl::Kind::kStruct: in ProduceHeader()
1442 case flat::Decl::Kind::kTable: in ProduceHeader()
1443 case flat::Decl::Kind::kUnion: in ProduceHeader()
1446 case flat::Decl::Kind::kInterface: { in ProduceHeader()
1462 case flat::Decl::Kind::kConst: { in ProduceHeader()
1469 case flat::Decl::Kind::kEnum: in ProduceHeader()
1473 case flat::Decl::Kind::kInterface: { in ProduceHeader()
1480 case flat::Decl::Kind::kStruct: { in ProduceHeader()
1487 case flat::Decl::Kind::kTable: in ProduceHeader()
1491 case flat::Decl::Kind::kUnion: { in ProduceHeader()
1507 case flat::Decl::Kind::kConst: in ProduceHeader()
1508 case flat::Decl::Kind::kEnum: in ProduceHeader()
1509 case flat::Decl::Kind::kStruct: in ProduceHeader()
1510 case flat::Decl::Kind::kTable: in ProduceHeader()
1511 case flat::Decl::Kind::kUnion: in ProduceHeader()
1514 case flat::Decl::Kind::kInterface: { in ProduceHeader()
1543 std::map<const flat::Decl*, NamedInterface> named_interfaces = in ProduceClient()
1548 case flat::Decl::Kind::kConst: in ProduceClient()
1549 case flat::Decl::Kind::kEnum: in ProduceClient()
1550 case flat::Decl::Kind::kStruct: in ProduceClient()
1551 case flat::Decl::Kind::kTable: in ProduceClient()
1552 case flat::Decl::Kind::kUnion: in ProduceClient()
1555 case flat::Decl::Kind::kInterface: { in ProduceClient()
1580 std::map<const flat::Decl*, NamedInterface> named_interfaces = in ProduceServer()
1585 case flat::Decl::Kind::kConst: in ProduceServer()
1586 case flat::Decl::Kind::kEnum: in ProduceServer()
1587 case flat::Decl::Kind::kStruct: in ProduceServer()
1588 case flat::Decl::Kind::kTable: in ProduceServer()
1589 case flat::Decl::Kind::kUnion: in ProduceServer()
1592 case flat::Decl::Kind::kInterface: { in ProduceServer()