/system/tools/hidl/ |
D | ScalarType.cpp | 27 ScalarType::ScalarType(Kind kind, Scope* parent) in ScalarType() function in android::ScalarType 30 const ScalarType *ScalarType::resolveToScalarType() const { in resolveToScalarType() 34 bool ScalarType::isValidEnumStorageType() const { in isValidEnumStorageType() 39 bool ScalarType::isScalar() const { in isScalar() 43 bool ScalarType::isElidableType() const { in isElidableType() 47 bool ScalarType::deepCanCheckEquality(std::unordered_set<const Type*>* /* visited */) const { in deepCanCheckEquality() 51 std::string ScalarType::typeName() const { in typeName() 55 std::string ScalarType::getCppType(StorageMode, bool) const { in getCppType() 73 std::string ScalarType::getJavaType(bool /* forInitializer */) const { in getJavaType() 91 std::string ScalarType::getJavaTypeClass() const { in getJavaTypeClass() [all …]
|
D | ConstantExpression.h | 45 static std::unique_ptr<ConstantExpression> Zero(ScalarType::Kind kind); 46 static std::unique_ptr<ConstantExpression> One(ScalarType::Kind kind); 47 static std::unique_ptr<ConstantExpression> ValueOf(ScalarType::Kind kind, uint64_t value); 112 std::string value(ScalarType::Kind castKind) const; 114 std::string cppValue(ScalarType::Kind castKind) const; 116 std::string javaValue(ScalarType::Kind castKind) const; 122 std::unique_ptr<ConstantExpression> addOne(ScalarType::Kind baseKind); 136 std::string rawValue(ScalarType::Kind castKind) const; 144 ScalarType::Kind mValueKind; 174 LiteralConstantExpression(ScalarType::Kind kind, uint64_t value); [all …]
|
D | ScalarType.h | 25 struct ScalarType : public Type { struct 40 ScalarType(Kind kind, Scope* parent); argument 45 const ScalarType *resolveToScalarType() const override; 112 DISALLOW_COPY_AND_ASSIGN(ScalarType);
|
D | ConstantExpression.cpp | 41 #define SK(__x__) ScalarType::Kind::KIND_##__x__ 61 static inline bool isSupported(ScalarType::Kind kind) { in isSupported() 62 return SK(BOOL) == kind || ScalarType(kind, nullptr /* parent */).isValidEnumStorageType(); in isSupported() 66 ScalarType::Kind integralPromotion(ScalarType::Kind in) { in integralPromotion() 71 ScalarType::Kind usualArithmeticConversion(ScalarType::Kind lft, in usualArithmeticConversion() 72 ScalarType::Kind rgt) { in usualArithmeticConversion() 83 ScalarType::Kind unsignedRank = isLftSigned ? rgt : lft; in usualArithmeticConversion() 84 ScalarType::Kind signedRank = isLftSigned ? lft : rgt; in usualArithmeticConversion() 160 std::unique_ptr<ConstantExpression> ConstantExpression::Zero(ScalarType::Kind kind) { in Zero() 164 std::unique_ptr<ConstantExpression> ConstantExpression::One(ScalarType::Kind kind) { in One() [all …]
|
D | EnumType.h | 49 const ScalarType *resolveToScalarType() const override; 155 std::string rawValue(ScalarType::Kind castKind) const; 156 std::string cppValue(ScalarType::Kind castKind) const; 157 std::string javaValue(ScalarType::Kind castKind) const; 158 void autofill(const EnumType* prevType, EnumValue* prevValue, const ScalarType* type); 190 const ScalarType *resolveToScalarType() const override;
|
D | EnumType.cpp | 167 const ScalarType *EnumType::resolveToScalarType() const { in resolveToScalarType() 246 const ScalarType *scalarType = mStorageType->resolveToScalarType(); in emitReaderWriter() 297 const ScalarType *scalarType = mStorageType->resolveToScalarType(); in emitTypeDeclarations() 327 const ScalarType* scalarType = mStorageType->resolveToScalarType(); in emitTypeForwardDeclaration() 364 const ScalarType *scalarType = mStorageType->resolveToScalarType(); in emitEnumBitwiseOperator() 408 const ScalarType *scalarType = mStorageType->resolveToScalarType(); in emitBitFieldBitwiseAssignmentOperator() 457 const ScalarType *scalarType = mStorageType->resolveToScalarType(); in emitPackageTypeHeaderDefinitions() 513 const ScalarType *scalarType = mStorageType->resolveToScalarType(); in emitJavaTypeDeclarations() 588 const ScalarType *scalarType = mStorageType->resolveToScalarType(); in emitVtsTypeDeclarations() 710 const ScalarType *scalarType = mStorageType->resolveToScalarType(); in emitExportedHeader() [all …]
|
D | TypeDef.h | 31 const ScalarType *resolveToScalarType() const override;
|
D | TypeDef.cpp | 29 const ScalarType *TypeDef::resolveToScalarType() const { in resolveToScalarType()
|
D | hidl-gen_l.ll | 44 #include "ScalarType.h" 61 yylval->type = new ScalarType(ScalarType::kind, *scope); \
|
D | Method.h | 40 struct ScalarType;
|
D | Type.h | 37 struct ScalarType; 133 virtual const ScalarType *resolveToScalarType() const;
|
D | CompoundType.cpp | 2029 std::unique_ptr<ScalarType> CompoundType::getUnionDiscriminatorType() const { in getUnionDiscriminatorType() 2030 static const std::vector<std::pair<int, ScalarType::Kind> > scalars { in getUnionDiscriminatorType() 2031 {8, ScalarType::Kind::KIND_UINT8}, in getUnionDiscriminatorType() 2032 {16, ScalarType::Kind::KIND_UINT16}, in getUnionDiscriminatorType() 2033 {32, ScalarType::Kind::KIND_UINT32}, in getUnionDiscriminatorType() 2037 auto kind = ScalarType::Kind::KIND_UINT64; in getUnionDiscriminatorType() 2045 return std::unique_ptr<ScalarType>(new ScalarType(kind, nullptr)); in getUnionDiscriminatorType()
|
D | CompoundType.h | 166 std::unique_ptr<ScalarType> getUnionDiscriminatorType() const;
|
D | Interface.cpp | 44 std::make_unique<LiteralConstantExpression>(ScalarType::KIND_UINT32, 47 std::make_unique<LiteralConstantExpression>(ScalarType::KIND_UINT32, 281 out << byteToString(ConstantExpression::ValueOf(ScalarType::Kind::KIND_UINT8, e)); in emitDigestChain()
|
D | Android.bp | 98 "ScalarType.cpp",
|
D | Type.cpp | 325 const ScalarType *Type::resolveToScalarType() const { in resolveToScalarType() 330 const ScalarType *scalarType = resolveToScalarType(); in isValidEnumStorageType()
|
D | hidl-gen_y.yy | 811 $$ = ConstantExpression::Zero(ScalarType::KIND_INT32).release(); 1028 ScalarType* scalar = new ScalarType(ScalarType::KIND_INT64, *scope);
|
/system/tools/hidl/hidl2aidl/ |
D | AidlTranslate.cpp | 154 static const std::map<ScalarType::Kind, std::pair<std::string, size_t>> kSignedMaxSize{ in h2aScalarChecks() 155 {ScalarType::KIND_UINT8, in h2aScalarChecks() 157 {ScalarType::KIND_UINT16, {"", 0}}, in h2aScalarChecks() 158 {ScalarType::KIND_INT16, {"", 0}}, in h2aScalarChecks() 159 {ScalarType::KIND_UINT32, in h2aScalarChecks() 161 {ScalarType::KIND_UINT64, in h2aScalarChecks() 163 const ScalarType* scalarType = type.resolveToScalarType(); in h2aScalarChecks() 168 if (backend != AidlBackend::JAVA && scalarType->getKind() == ScalarType::KIND_UINT16) { in h2aScalarChecks() 174 if (scalarType->getKind() == ScalarType::KIND_UINT16 || in h2aScalarChecks() 175 scalarType->getKind() == ScalarType::KIND_INT16) { in h2aScalarChecks() [all …]
|
D | AidlNamedType.cpp | 42 const ScalarType* scalar = enumType.storageType()->resolveToScalarType(); in emitEnumAidlDefinition()
|