source: src/ResolvExpr/CommonType.cc@ 85d44c6

ADT aaron-thesis arm-eh ast-experimental cleanup-dtors enum forall-pointer-decay jacob/cs343-translation jenkins-sandbox new-ast new-ast-unique-expr persistent-indexer pthread-emulation qualifiedEnum
Last change on this file since 85d44c6 was e15853c, checked in by Peter A. Buhr <pabuhr@…>, 7 years ago

remove leading underscores in enums for _FloatNN and _Bool

  • Property mode set to 100644
File size: 79.6 KB
Line 
1//
2// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
3//
4// The contents of this file are covered under the licence agreement in the
5// file "LICENCE" distributed with Cforall.
6//
7// CommonType.cc --
8//
9// Author : Richard C. Bilson
10// Created On : Sun May 17 06:59:27 2015
11// Last Modified By : Peter A. Buhr
12// Last Modified On : Wed Feb 13 22:30:32 2019
13// Update Count : 22
14//
15
16#include <cassert> // for strict_dynamic_cast
17#include <map> // for _Rb_tree_const_iterator
18#include <utility> // for pair
19
20#include "Common/PassVisitor.h"
21#include "ResolvExpr/TypeEnvironment.h" // for OpenVarSet, AssertionSet
22#include "SymTab/Indexer.h" // for Indexer
23#include "SynTree/Declaration.h" // for TypeDecl, NamedTypeDecl (ptr...
24#include "SynTree/Type.h" // for BasicType, BasicType::Kind::...
25#include "SynTree/Visitor.h" // for Visitor
26#include "Unify.h" // for unifyExact, WidenMode
27#include "typeops.h" // for isFtype
28
29// #define DEBUG
30#ifdef DEBUG
31#define PRINT(x) x
32#else
33#define PRINT(x)
34#endif
35
36namespace ResolvExpr {
37 struct CommonType : public WithShortCircuiting {
38 CommonType( Type *type2, bool widenFirst, bool widenSecond, const SymTab::Indexer &indexer, TypeEnvironment &env, const OpenVarSet &openVars );
39 Type *get_result() const { return result; }
40
41 void previsit( BaseSyntaxNode * ) { visit_children = false; }
42
43 void postvisit( VoidType * voidType );
44 void postvisit( BasicType * basicType );
45 void postvisit( PointerType * pointerType );
46 void postvisit( ArrayType * arrayType );
47 void postvisit( ReferenceType * refType );
48 void postvisit( FunctionType * functionType );
49 void postvisit( StructInstType * aggregateUseType );
50 void postvisit( UnionInstType * aggregateUseType );
51 void postvisit( EnumInstType * aggregateUseType );
52 void postvisit( TraitInstType * aggregateUseType );
53 void postvisit( TypeInstType * aggregateUseType );
54 void postvisit( TupleType * tupleType );
55 void postvisit( VarArgsType * varArgsType );
56 void postvisit( ZeroType * zeroType );
57 void postvisit( OneType * oneType );
58
59 private:
60 template< typename Pointer > void getCommonWithVoidPointer( Pointer* voidPointer, Pointer* otherPointer );
61 template< typename RefType > void handleRefType( RefType *inst, Type *other );
62
63 Type *result;
64 Type *type2; // inherited
65 bool widenFirst, widenSecond;
66 const SymTab::Indexer &indexer;
67 TypeEnvironment &env;
68 const OpenVarSet &openVars;
69 };
70
71 Type * handleReference( Type * t1, Type * t2, bool widenFirst, bool widenSecond, const SymTab::Indexer &indexer, TypeEnvironment & env, const OpenVarSet &openVars ) {
72 Type * common = nullptr;
73 AssertionSet have, need;
74 OpenVarSet newOpen( openVars );
75 // need unify to bind type variables
76 if ( unify( t1, t2, env, have, need, newOpen, indexer, common ) ) {
77 PRINT(
78 std::cerr << "unify success: " << widenFirst << " " << widenSecond << std::endl;
79 )
80 if ( (widenFirst || t2->get_qualifiers() <= t1->get_qualifiers()) && (widenSecond || t1->get_qualifiers() <= t2->get_qualifiers()) ) {
81 PRINT(
82 std::cerr << "widen okay" << std::endl;
83 )
84 common->get_qualifiers() |= t1->get_qualifiers();
85 common->get_qualifiers() |= t2->get_qualifiers();
86 return common;
87 }
88 }
89 PRINT(
90 std::cerr << "exact unify failed: " << t1 << " " << t2 << std::endl;
91 )
92 return nullptr;
93 }
94
95 Type *commonType( Type *type1, Type *type2, bool widenFirst, bool widenSecond, const SymTab::Indexer &indexer, TypeEnvironment &env, const OpenVarSet &openVars ) {
96 PassVisitor<CommonType> visitor( type2, widenFirst, widenSecond, indexer, env, openVars );
97
98 int depth1 = type1->referenceDepth();
99 int depth2 = type2->referenceDepth();
100 if ( depth1 > 0 || depth2 > 0 ) {
101 int diff = depth1-depth2;
102 // TODO: should it be possible for commonType to generate complicated conversions? I would argue no, only conversions that involve types of the same reference level or a difference of 1 should be allowed.
103 // if ( diff > 1 || diff < -1 ) return nullptr;
104
105 // special case where one type has a reference depth of 1 larger than the other
106 if ( diff > 0 || diff < 0 ) {
107 PRINT(
108 std::cerr << "reference depth diff: " << diff << std::endl;
109 )
110 Type * result = nullptr;
111 ReferenceType * ref1 = dynamic_cast< ReferenceType * >( type1 );
112 ReferenceType * ref2 = dynamic_cast< ReferenceType * >( type2 );
113 if ( diff > 0 ) {
114 // deeper on the left
115 assert( ref1 );
116 result = handleReference( ref1->base, type2, widenFirst, widenSecond, indexer, env, openVars );
117 } else {
118 // deeper on the right
119 assert( ref2 );
120 result = handleReference( type1, ref2->base, widenFirst, widenSecond, indexer, env, openVars );
121 }
122 if ( result && ref1 ) {
123 // formal is reference, so result should be reference
124 PRINT(
125 std::cerr << "formal is reference; result should be reference" << std::endl;
126 )
127 result = new ReferenceType( ref1->get_qualifiers(), result );
128 }
129 PRINT(
130 std::cerr << "common type of reference [" << type1 << "] and [" << type2 << "] is [" << result << "]" << std::endl;
131 )
132 return result;
133 }
134 // otherwise, both are reference types of the same depth and this is handled by the CommonType visitor.
135 }
136
137 type1->accept( visitor );
138 Type *result = visitor.pass.get_result();
139 if ( ! result ) {
140 // this appears to be handling for opaque type declarations
141 if ( widenSecond ) {
142 if ( TypeInstType *inst = dynamic_cast< TypeInstType* >( type2 ) ) {
143 if ( NamedTypeDecl *nt = indexer.lookupType( inst->get_name() ) ) {
144 TypeDecl *type = strict_dynamic_cast< TypeDecl* >( nt );
145 if ( type->get_base() ) {
146 Type::Qualifiers tq1 = type1->get_qualifiers(), tq2 = type2->get_qualifiers();
147 AssertionSet have, need;
148 OpenVarSet newOpen( openVars );
149 type1->get_qualifiers() = Type::Qualifiers();
150 type->get_base()->get_qualifiers() = tq1;
151 if ( unifyExact( type1, type->get_base(), env, have, need, newOpen, indexer ) ) {
152 result = type1->clone();
153 result->get_qualifiers() = tq1 | tq2;
154 } // if
155 type1->get_qualifiers() = tq1;
156 type->get_base()->get_qualifiers() = Type::Qualifiers();
157 } // if
158 } // if
159 } // if
160 } // if
161 } // if
162#ifdef DEBUG
163 std::cerr << "============= commonType" << std::endl << "type1 is ";
164 type1->print( std::cerr );
165 std::cerr << " type2 is ";
166 type2->print( std::cerr );
167 if ( result ) {
168 std::cerr << " common type is ";
169 result->print( std::cerr );
170 } else {
171 std::cerr << " no common type";
172 } // if
173 std::cerr << std::endl;
174#endif
175 return result;
176 }
177#if 0
178 #define BT BasicType::
179 static const BasicType::Kind combinedType[][ BasicType::NUMBER_OF_BASIC_TYPES ] =
180 {
181/* Bool Char SignedChar UnsignedChar ShortSignedInt ShortUnsignedInt SignedInt UnsignedInt LongSignedInt LongUnsignedInt LongLongSignedInt LongLongUnsignedInt Float Double LongDouble FloatComplex DoubleComplex LongDoubleComplex FloatImaginary DoubleImaginary LongDoubleImaginary SignedInt128 UnsignedInt128 Float80 Float128 */
182 /* Bool */ { BT Bool, BT Char, BT SignedChar, BT UnsignedChar, BT ShortSignedInt, BT ShortUnsignedInt, BT SignedInt, BT UnsignedInt, BT LongSignedInt, BT LongUnsignedInt, BT LongLongSignedInt, BT LongLongUnsignedInt, BT Float, BT Double, BT LongDouble, BT FloatComplex, BT DoubleComplex, BT LongDoubleComplex, BT FloatComplex, BT DoubleComplex, BT LongDoubleComplex, BT SignedInt128, BT UnsignedInt128, BT Float80, BT Float128, BT _Float16, BT _Float32, BT _Float32x, BT _Float64, BT _Float64x, BT _Float128, BT _Float128x, BT _Float16Complex, BT _Float32Complex, BT _Float32xComplex, BT _Float64Complex, BT _Float64xComplex, BT _Float128Complex, BT _Float128xComplex },
183 /* Char */ { BT Char, BT Char, BT UnsignedChar, BT UnsignedChar, BT ShortSignedInt, BT ShortUnsignedInt, BT SignedInt, BT UnsignedInt, BT LongSignedInt, BT LongUnsignedInt, BT LongLongSignedInt, BT LongLongUnsignedInt, BT Float, BT Double, BT LongDouble, BT FloatComplex, BT DoubleComplex, BT LongDoubleComplex, BT FloatComplex, BT DoubleComplex, BT LongDoubleComplex, BT SignedInt128, BT UnsignedInt128, BT Float80, BT Float128, BT _Float16, BT _Float32, BT _Float32x, BT _Float64, BT _Float64x, BT _Float128, BT _Float128x, BT _Float16Complex, BT _Float32Complex, BT _Float32xComplex, BT _Float64Complex, BT _Float64xComplex, BT _Float128Complex, BT _Float128xComplex },
184 /* SignedChar */ { BT SignedChar, BT UnsignedChar, BT SignedChar, BT UnsignedChar, BT ShortSignedInt, BT ShortUnsignedInt, BT SignedInt, BT UnsignedInt, BT LongSignedInt, BT LongUnsignedInt, BT LongLongSignedInt, BT LongLongUnsignedInt, BT Float, BT Double, BT LongDouble, BT FloatComplex, BT DoubleComplex, BT LongDoubleComplex, BT FloatComplex, BT DoubleComplex, BT LongDoubleComplex, BT SignedInt128, BT UnsignedInt128, BT Float80, BT Float128, BT _Float16, BT _Float32, BT _Float32x, BT _Float64, BT _Float64x, BT _Float128, BT _Float128x, BT _Float16Complex, BT _Float32Complex, BT _Float32xComplex, BT _Float64Complex, BT _Float64xComplex, BT _Float128Complex, BT _Float128xComplex },
185 /* UnsignedChar */ { BT UnsignedChar, BT UnsignedChar, BT UnsignedChar, BT UnsignedChar, BT ShortSignedInt, BT ShortUnsignedInt, BT SignedInt, BT UnsignedInt, BT LongSignedInt, BT LongUnsignedInt, BT LongLongSignedInt, BT LongLongUnsignedInt, BT Float, BT Double, BT LongDouble, BT FloatComplex, BT DoubleComplex, BT LongDoubleComplex, BT FloatComplex, BT DoubleComplex, BT LongDoubleComplex, BT SignedInt128, BT UnsignedInt128, BT Float80, BT Float128, BT _Float16, BT _Float32, BT _Float32x, BT _Float64, BT _Float64x, BT _Float128, BT _Float128x, BT _Float16Complex, BT _Float32Complex, BT _Float32xComplex, BT _Float64Complex, BT _Float64xComplex, BT _Float128Complex, BT _Float128xComplex },
186 /* ShortSignedInt */ { BT ShortSignedInt, BT ShortSignedInt, BT ShortSignedInt, BT ShortSignedInt, BT ShortSignedInt, BT ShortUnsignedInt, BT SignedInt, BT UnsignedInt, BT LongSignedInt, BT LongUnsignedInt, BT LongLongSignedInt, BT LongLongUnsignedInt, BT Float, BT Double, BT LongDouble, BT FloatComplex, BT DoubleComplex, BT LongDoubleComplex, BT FloatComplex, BT DoubleComplex, BT LongDoubleComplex, BT SignedInt128, BT UnsignedInt128, BT Float80, BT Float128, BT _Float16, BT _Float32, BT _Float32x, BT _Float64, BT _Float64x, BT _Float128, BT _Float128x, BT _Float16Complex, BT _Float32Complex, BT _Float32xComplex, BT _Float64Complex, BT _Float64xComplex, BT _Float128Complex, BT _Float128xComplex },
187 /* ShortUnsignedInt */ { BT ShortUnsignedInt, BT ShortUnsignedInt, BT ShortUnsignedInt, BT ShortUnsignedInt, BT ShortUnsignedInt, BT ShortUnsignedInt, BT SignedInt, BT UnsignedInt, BT LongSignedInt, BT LongUnsignedInt, BT LongLongSignedInt, BT LongLongUnsignedInt, BT Float, BT Double, BT LongDouble, BT FloatComplex, BT DoubleComplex, BT LongDoubleComplex, BT FloatComplex, BT DoubleComplex, BT LongDoubleComplex, BT SignedInt128, BT UnsignedInt128, BT Float80, BT Float128, BT _Float16, BT _Float32, BT _Float32x, BT _Float64, BT _Float64x, BT _Float128, BT _Float128x, BT _Float16Complex, BT _Float32Complex, BT _Float32xComplex, BT _Float64Complex, BT _Float64xComplex, BT _Float128Complex, BT _Float128xComplex },
188 /* SignedInt */ { BT SignedInt, BT SignedInt, BT SignedInt, BT SignedInt, BT SignedInt, BT SignedInt, BT SignedInt, BT UnsignedInt, BT LongSignedInt, BT LongUnsignedInt, BT LongLongSignedInt, BT LongLongUnsignedInt, BT Float, BT Double, BT LongDouble, BT FloatComplex, BT DoubleComplex, BT LongDoubleComplex, BT FloatComplex, BT DoubleComplex, BT LongDoubleComplex, BT SignedInt128, BT UnsignedInt128, BT Float80, BT Float128, BT _Float16, BT _Float32, BT _Float32x, BT _Float64, BT _Float64x, BT _Float128, BT _Float128x, BT _Float16Complex, BT _Float32Complex, BT _Float32xComplex, BT _Float64Complex, BT _Float64xComplex, BT _Float128Complex, BT _Float128xComplex },
189 /* UnsignedInt */ { BT UnsignedInt, BT UnsignedInt, BT UnsignedInt, BT UnsignedInt, BT UnsignedInt, BT UnsignedInt, BT UnsignedInt, BT UnsignedInt, BT LongUnsignedInt, BT LongUnsignedInt, BT LongLongSignedInt, BT LongLongUnsignedInt, BT Float, BT Double, BT LongDouble, BT FloatComplex, BT DoubleComplex, BT LongDoubleComplex, BT FloatComplex, BT DoubleComplex, BT LongDoubleComplex, BT SignedInt128, BT UnsignedInt128, BT Float80, BT Float128, BT _Float16, BT _Float32, BT _Float32x, BT _Float64, BT _Float64x, BT _Float128, BT _Float128x, BT _Float16Complex, BT _Float32Complex, BT _Float32xComplex, BT _Float64Complex, BT _Float64xComplex, BT _Float128Complex, BT _Float128xComplex },
190 /* LongSignedInt */ { BT LongSignedInt, BT LongSignedInt, BT LongSignedInt, BT LongSignedInt, BT LongSignedInt, BT LongSignedInt, BT LongSignedInt, BT LongUnsignedInt, BT LongSignedInt, BT LongUnsignedInt, BT LongLongSignedInt, BT LongLongUnsignedInt, BT Float, BT Double, BT LongDouble, BT FloatComplex, BT DoubleComplex, BT LongDoubleComplex, BT FloatComplex, BT DoubleComplex, BT LongDoubleComplex, BT SignedInt128, BT UnsignedInt128, BT Float80, BT Float128, BT _Float16, BT _Float32, BT _Float32x, BT _Float64, BT _Float64x, BT _Float128, BT _Float128x, BT _Float16Complex, BT _Float32Complex, BT _Float32xComplex, BT _Float64Complex, BT _Float64xComplex, BT _Float128Complex, BT _Float128xComplex },
191 /* LongUnsignedInt */ { BT LongUnsignedInt, BT LongUnsignedInt, BT LongUnsignedInt, BT LongUnsignedInt, BT LongUnsignedInt, BT LongUnsignedInt, BT LongUnsignedInt, BT LongUnsignedInt, BT LongUnsignedInt, BT LongUnsignedInt, BT LongLongSignedInt, BT LongLongUnsignedInt, BT Float, BT Double, BT LongDouble, BT FloatComplex, BT DoubleComplex, BT LongDoubleComplex, BT FloatComplex, BT DoubleComplex, BT LongDoubleComplex, BT SignedInt128, BT UnsignedInt128, BT Float80, BT Float128, BT _Float16, BT _Float32, BT _Float32x, BT _Float64, BT _Float64x, BT _Float128, BT _Float128x, BT _Float16Complex, BT _Float32Complex, BT _Float32xComplex, BT _Float64Complex, BT _Float64xComplex, BT _Float128Complex, BT _Float128xComplex },
192 /* LongLongSignedInt */ { BT LongLongSignedInt, BT LongLongSignedInt, BT LongLongSignedInt, BT LongLongSignedInt, BT LongLongSignedInt, BT LongLongSignedInt, BT LongLongSignedInt, BT LongLongSignedInt, BT LongLongSignedInt, BT LongLongSignedInt, BT LongLongSignedInt, BT LongLongUnsignedInt, BT Float, BT Double, BT LongDouble, BT FloatComplex, BT DoubleComplex, BT LongDoubleComplex, BT FloatComplex, BT DoubleComplex, BT LongDoubleComplex, BT SignedInt128, BT UnsignedInt128, BT Float80, BT Float128, BT _Float16, BT _Float32, BT _Float32x, BT _Float64, BT _Float64x, BT _Float128, BT _Float128x, BT _Float16Complex, BT _Float32Complex, BT _Float32xComplex, BT _Float64Complex, BT _Float64xComplex, BT _Float128Complex, BT _Float128xComplex },
193 /* LongLongUnsignedInt */ { BT LongLongUnsignedInt, BT LongLongUnsignedInt, BT LongLongUnsignedInt, BT LongLongUnsignedInt, BT LongLongUnsignedInt, BT LongLongUnsignedInt, BT LongLongUnsignedInt, BT LongLongUnsignedInt, BT LongLongUnsignedInt, BT LongLongUnsignedInt, BT LongLongUnsignedInt, BT LongLongUnsignedInt, BT Float, BT Double, BT LongDouble, BT FloatComplex, BT DoubleComplex, BT LongDoubleComplex, BT FloatComplex, BT DoubleComplex, BT LongDoubleComplex, BT SignedInt128, BT UnsignedInt128, BT Float80, BT Float128, BT _Float16, BT _Float32, BT _Float32x, BT _Float64, BT _Float64x, BT _Float128, BT _Float128x, BT _Float16Complex, BT _Float32Complex, BT _Float32xComplex, BT _Float64Complex, BT _Float64xComplex, BT _Float128Complex, BT _Float128xComplex },
194
195 /* Float */ { BT Float, BT Float, BT Float, BT Float, BT Float, BT Float, BT Float, BT Float, BT Float, BT Float, BT Float, BT Float, BT Float, BT Double, BT LongDouble, BT FloatComplex, BT DoubleComplex, BT LongDoubleComplex, BT FloatComplex, BT DoubleComplex, BT LongDoubleComplex, BT Float, BT Float, BT Float80, BT Float128, BT Float, BT Float, BT _Float32x, BT _Float64, BT _Float64x, BT _Float128, BT _Float128x, BT FloatComplex, BT FloatComplex, BT _Float32xComplex, BT _Float64Complex, BT _Float64xComplex, BT _Float128Complex, BT _Float128xComplex },
196 /* Double */ { BT Double, BT Double, BT Double, BT Double, BT Double, BT Double, BT Double, BT Double, BT Double, BT Double, BT Double, BT Double, BT Double, BT Double, BT LongDouble, BT DoubleComplex, BT DoubleComplex, BT LongDoubleComplex, BT DoubleComplex, BT DoubleComplex, BT LongDoubleComplex, BT Double, BT Double, BT Float80, BT Float128, BT Double, BT Double, BT Double, BT _Float64, BT _Float64x, BT _Float128, BT _Float128x, BT DoubleComplex, BT DoubleComplex, BT DoubleComplex, BT DoubleComplex, BT _Float64xComplex, BT _Float128Complex, BT _Float128xComplex },
197 /* LongDouble */ { BT LongDouble, BT LongDouble, BT LongDouble, BT LongDouble, BT LongDouble, BT LongDouble, BT LongDouble, BT LongDouble, BT LongDouble, BT LongDouble, BT LongDouble, BT LongDouble, BT LongDouble, BT LongDouble, BT LongDouble, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDouble, BT LongDouble, BT BT LongDouble, BT Float128, BT LongDouble, BT LongDouble, BT LongDouble, BT LongDouble, BT LongDouble, BT LongDouble, BT _Float128x, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT _Float128xComplex },
198 /* FloatComplex */ { BT FloatComplex, BT FloatComplex, BT FloatComplex, BT FloatComplex, BT FloatComplex, BT FloatComplex, BT FloatComplex, BT FloatComplex, BT FloatComplex, BT FloatComplex, BT FloatComplex, BT FloatComplex, BT FloatComplex, BT DoubleComplex, BT LongDoubleComplex, BT FloatComplex, BT DoubleComplex, BT LongDoubleComplex, BT FloatComplex, BT DoubleComplex, BT LongDoubleComplex, BT FloatComplex, BT FloatComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT FloatComplex, BT FloatComplex, BT _Float32xComplex, BT _Float64Complex, BT _Float64xComplex, BT _Float128Complex, BT _Float128xComplex, BT FloatComplex, BT FloatComplex, BT _Float32xComplex, BT _Float64Complex, BT _Float64xComplex, BT _Float128Complex, BT _Float128xComplex },
199 /* DoubleComplex */ { BT DoubleComplex, BT DoubleComplex, BT DoubleComplex, BT DoubleComplex, BT DoubleComplex, BT DoubleComplex, BT DoubleComplex, BT DoubleComplex, BT DoubleComplex, BT DoubleComplex, BT DoubleComplex, BT DoubleComplex, BT DoubleComplex, BT DoubleComplex, BT LongDoubleComplex, BT DoubleComplex, BT DoubleComplex, BT LongDoubleComplex, BT DoubleComplex, BT DoubleComplex, BT LongDoubleComplex, BT DoubleComplex, BT DoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT DoubleComplex, BT DoubleComplex, BT DoubleComplex, BT _Float64Complex, BT _Float64xComplex, BT _Float128Complex, BT _Float128xComplex, BT DoubleComplex, BT DoubleComplex, BT DoubleComplex, BT DoubleComplex, BT _Float64xComplex, BT _Float128Complex, BT _Float128xComplex },
200 /* LongDoubleComplex */ { BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT _Float128xComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT _Float128xComplex },
201 /* FloatImaginary */ { BT FloatComplex, BT FloatComplex, BT FloatComplex, BT FloatComplex, BT FloatComplex, BT FloatComplex, BT FloatComplex, BT FloatComplex, BT FloatComplex, BT FloatComplex, BT FloatComplex, BT FloatComplex, BT FloatComplex, BT DoubleComplex, BT LongDoubleComplex, BT FloatComplex, BT DoubleComplex, BT LongDoubleComplex, BT FloatImaginary, BT DoubleImaginary, BT LongDoubleImaginary, BT FloatImaginary, BT FloatImaginary, BT LongDoubleImaginary, BT LongDoubleImaginary, BT FloatComplex, BT FloatComplex, BT _Float32xComplex, BT _Float64Complex, BT _Float64xComplex, BT _Float128Complex, BT _Float128xComplex, BT FloatComplex, BT FloatComplex, BT _Float32xComplex, BT _Float64Complex, BT _Float64xComplex, BT _Float128Complex, BT _Float128xComplex },
202 /* DoubleImaginary */ { BT DoubleComplex, BT DoubleComplex, BT DoubleComplex, BT DoubleComplex, BT DoubleComplex, BT DoubleComplex, BT DoubleComplex, BT DoubleComplex, BT DoubleComplex, BT DoubleComplex, BT DoubleComplex, BT DoubleComplex, BT DoubleComplex, BT DoubleComplex, BT LongDoubleComplex, BT DoubleComplex, BT DoubleComplex, BT LongDoubleComplex, BT DoubleImaginary, BT DoubleImaginary, BT LongDoubleImaginary, BT DoubleImaginary, BT DoubleImaginary, BT LongDoubleImaginary, BT LongDoubleImaginary, BT DoubleComplex, BT DoubleComplex, BT DoubleComplex, BT _Float64Complex, BT _Float64xComplex, BT _Float128Complex, BT _Float128xComplex, BT DoubleComplex, BT DoubleComplex, BT DoubleComplex, BT DoubleComplex, BT _Float64xComplex, BT _Float128Complex, BT _Float128xComplex },
203 /* LongDoubleImaginary */ { BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleImaginary, BT LongDoubleImaginary, BT LongDoubleImaginary, BT LongDoubleImaginary, BT LongDoubleImaginary, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT _Float128xComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT _Float128xComplex },
204
205 /* SignedInt128 */ { BT SignedInt128, BT SignedInt128, BT SignedInt128, BT SignedInt128, BT SignedInt128, BT SignedInt128, BT SignedInt128, BT SignedInt128, BT SignedInt128, BT SignedInt128, BT SignedInt128, BT SignedInt128, BT Float, BT Double, BT LongDouble, BT FloatComplex, BT DoubleComplex, BT LongDoubleComplex, BT FloatComplex, BT DoubleComplex, BT LongDoubleComplex, BT SignedInt128, BT UnsignedInt128, BT Float80, BT Float128, BT _Float16, BT _Float32, BT _Float32x, BT _Float64, BT _Float64x, BT _Float128, BT _Float128x, BT _Float16Complex, BT _Float32Complex, BT _Float32xComplex, BT _Float64Complex, BT _Float64xComplex, BT _Float128Complex, BT _Float128xComplex },
206 /* UnsignedInt128 */ { BT UnsignedInt128, BT UnsignedInt128, BT UnsignedInt128, BT UnsignedInt128, BT UnsignedInt128, BT UnsignedInt128, BT UnsignedInt128, BT UnsignedInt128, BT UnsignedInt128, BT UnsignedInt128, BT UnsignedInt128, BT UnsignedInt128, BT Float, BT Double, BT LongDouble, BT FloatComplex, BT DoubleComplex, BT LongDoubleComplex, BT FloatComplex, BT DoubleComplex, BT LongDoubleComplex, BT UnsignedInt128, BT UnsignedInt128, BT Float80, BT Float128, BT _Float16, BT _Float32, BT _Float32x, BT _Float64, BT _Float64x, BT _Float128, BT _Float128x, BT _Float16Complex, BT _Float32Complex, BT _Float32xComplex, BT _Float64Complex, BT _Float64xComplex, BT _Float128Complex, BT _Float128xComplex },
207 /* Float80 */ { BT Float80, BT Float80, BT Float80, BT Float80, BT Float80, BT Float80, BT Float80, BT Float80, BT Float80, BT Float80, BT Float80, BT Float80, BT Float80, BT Float80, BT LongDouble, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT Float80, BT Float80, BT Float80, BT Float128, BT Float80, BT Float80, BT Float80, BT Float80, BT Float80, BT _Float128, BT _Float128x, BT _Float64xComplex, BT _Float64xComplex, BT _Float64xComplex, BT _Float64xComplex, BT _Float64xComplex, BT _Float128Complex, BT _Float128xComplex },
208 /* Float128 */ { BT Float128, BT Float128, BT Float128, BT Float128, BT Float128, BT Float128, BT Float128, BT Float128, BT Float128, BT Float128, BT Float128, BT Float128, BT Float128, BT Float128, BT Float128, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT Float128, BT Float128, BT Float128, BT Float128, BT Float128, BT Float128, BT Float128, BT Float128, BT Float128, BT Float128, BT _Float128x, BT _Float128Complex, BT _Float128Complex, BT _Float128Complex, BT _Float128Complex, BT _Float128Complex, BT _Float128Complex, BT _Float128xComplex },
209
210 /* _Float16 */ { BT _Float16, BT _Float16, BT _Float16, BT _Float16, BT _Float16, BT _Float16, BT _Float16, BT _Float16, BT _Float16, BT _Float16, BT _Float16, BT _Float16, BT Float, BT Double, BT LongDouble, BT FloatComplex, BT DoubleComplex, BT LongDoubleComplex, BT FloatComplex, BT DoubleComplex, BT LongDoubleComplex, BT _Float16, BT _Float16, BT Float80, BT Float128, BT _Float16, BT _Float32, BT _Float32x, BT _Float64, BT _Float64x, BT _Float128, BT _Float128x, BT _Float16Complex, BT _Float32Complex, BT _Float32xComplex, BT _Float64Complex, BT _Float64xComplex, BT _Float128Complex, BT _Float128xComplex },
211 /* _Float32 */ { BT _Float32, BT _Float32, BT _Float32, BT _Float32, BT _Float32, BT _Float32, BT _Float32, BT _Float32, BT _Float32, BT _Float32, BT _Float32, BT _Float32, BT _Float32, BT Double, BT LongDouble, BT FloatComplex, BT DoubleComplex, BT LongDoubleComplex, BT FloatComplex, BT DoubleComplex, BT LongDoubleComplex, BT _Float32, BT _Float32, BT Float80, BT Float128, BT _Float32, BT _Float32, BT _Float32x, BT _Float64, BT _Float64x, BT _Float128, BT _Float128x, BT _Float32Complex, BT _Float32Complex, BT _Float32xComplex, BT _Float64Complex, BT _Float64xComplex, BT _Float128Complex, BT _Float128xComplex },
212 /* _Float32x */ { BT _Float32x, BT _Float32x, BT _Float32x, BT _Float32x, BT _Float32x, BT _Float32x, BT _Float32x, BT _Float32x, BT _Float32x, BT _Float32x, BT _Float32x, BT _Float32x, BT _Float32x, BT Double, BT LongDouble, BT _Float32xComplex, BT DoubleComplex, BT LongDoubleComplex, BT _Float32xComplex, BT DoubleComplex, BT LongDoubleComplex, BT _Float32x, BT _Float32x, BT Float80, BT Float128, BT _Float32x, BT _Float32x, BT _Float32x, BT _Float64, BT _Float64x, BT _Float128, BT _Float128x, BT _Float32xComplex, BT _Float32xComplex, BT _Float32xComplex, BT _Float64Complex, BT _Float64xComplex, BT _Float128Complex, BT _Float128xComplex },
213 /* _Float64 */ { BT _Float64, BT _Float64, BT _Float64, BT _Float64, BT _Float64, BT _Float64, BT _Float64, BT _Float64, BT _Float64, BT _Float64, BT _Float64, BT _Float64, BT _Float64, BT Double, BT LongDouble, BT _Float64Complex, BT DoubleComplex, BT LongDoubleComplex, BT _Float64Complex, BT DoubleComplex, BT LongDoubleComplex, BT _Float64, BT _Float64, BT Float80, BT Float128, BT _Float64, BT _Float64, BT _Float64, BT _Float64, BT _Float64x, BT _Float128, BT _Float128x, BT _Float64Complex, BT _Float64Complex, BT _Float64Complex, BT _Float64Complex, BT _Float64xComplex, BT _Float128Complex, BT _Float128xComplex },
214 /* _Float64x */ { BT _Float64x, BT _Float64x, BT _Float64x, BT _Float64x, BT _Float64x, BT _Float64x, BT _Float64x, BT _Float64x, BT _Float64x, BT _Float64x, BT _Float64x, BT _Float64x, BT _Float64x, BT _Float64x, BT LongDouble, BT _Float64xComplex, BT _Float64xComplex, BT LongDoubleComplex, BT _Float64xComplex, BT _Float64xComplex, BT LongDoubleComplex, BT _Float64x, BT _Float64x, BT Float80, BT Float128, BT _Float64x, BT _Float64x, BT _Float64x, BT _Float64x, BT _Float64x, BT _Float128, BT _Float128x, BT _Float64xComplex, BT _Float64xComplex, BT _Float64xComplex, BT _Float64xComplex, BT _Float64xComplex, BT _Float128Complex, BT _Float128xComplex },
215 /* _Float128 */ { BT _Float128, BT _Float128, BT _Float128, BT _Float128, BT _Float128, BT _Float128, BT _Float128, BT _Float128, BT _Float128, BT _Float128, BT _Float128, BT _Float128, BT _Float128, BT _Float128, BT LongDouble, BT _Float128Complex, BT _Float128Complex, BT LongDoubleComplex, BT _Float128Complex, BT _Float128Complex, BT LongDoubleComplex, BT _Float128, BT _Float128, BT _Float128, BT Float128, BT _Float128, BT _Float128, BT _Float128, BT _Float128, BT _Float128, BT _Float128, BT _Float128x, BT _Float128Complex, BT _Float128Complex, BT _Float128Complex, BT _Float128Complex, BT _Float128Complex, BT _Float128Complex, BT _Float128xComplex },
216 /* _Float128x */ { BT _Float128x, BT _Float128x, BT _Float128x, BT _Float128x, BT _Float128x, BT _Float128x, BT _Float128x, BT _Float128x, BT _Float128x, BT _Float128x, BT _Float128x, BT _Float128x, BT _Float128x, BT _Float128x, BT _Float128x, BT _Float128xComplex, BT _Float128xComplex, BT _Float128xComplex, BT _Float128xComplex, BT _Float128xComplex, BT _Float128xComplex, BT _Float128x, BT _Float128x, BT _Float128x, BT _Float128x, BT _Float128x, BT _Float128x, BT _Float128x, BT _Float128x, BT _Float128x, BT _Float128x, BT _Float128x, BT _Float128xComplex, BT _Float128xComplex, BT _Float128xComplex, BT _Float128xComplex, BT _Float128xComplex, BT _Float128xComplex, BT _Float128xComplex },
217
218 /* _Float16Complex */ { BT _Float16Complex, BT _Float16Complex, BT _Float16Complex, BT _Float16Complex, BT _Float16Complex, BT _Float16Complex, BT _Float16Complex, BT _Float16Complex, BT _Float16Complex, BT _Float16Complex, BT _Float16Complex, BT _Float16Complex, BT FloatComplex, BT DoubleComplex, BT LongDoubleComplex, BT FloatComplex, BT DoubleComplex, BT LongDoubleComplex, BT FloatComplex, BT DoubleComplex, BT LongDoubleComplex, BT _Float16Complex, BT _Float16Complex, BT _Float64xComplex, BT _Float128Complex, BT _Float16Complex, BT _Float32Complex, BT _Float32xComplex, BT _Float64Complex, BT _Float64xComplex, BT _Float128Complex, BT _Float128xComplex, BT _Float16Complex, BT _Float32Complex, BT _Float32xComplex, BT _Float64Complex, BT _Float64xComplex, BT _Float128Complex, BT _Float128xComplex },
219 /* _Float32Complex */ { BT _Float32Complex, BT _Float32Complex, BT _Float32Complex, BT _Float32Complex, BT _Float32Complex, BT _Float32Complex, BT _Float32Complex, BT _Float32Complex, BT _Float32Complex, BT _Float32Complex, BT _Float32Complex, BT _Float32Complex, BT _Float32Complex, BT DoubleComplex, BT LongDoubleComplex, BT FloatComplex, BT DoubleComplex, BT LongDoubleComplex, BT FloatComplex, BT DoubleComplex, BT LongDoubleComplex, BT _Float32Complex, BT _Float32Complex, BT _Float64xComplex, BT _Float128Complex, BT _Float32Complex, BT _Float32Complex, BT _Float32xComplex, BT _Float64Complex, BT _Float64xComplex, BT _Float128Complex, BT _Float128xComplex, BT _Float32Complex, BT _Float32Complex, BT _Float32xComplex, BT _Float64Complex, BT _Float64xComplex, BT _Float128Complex, BT _Float128xComplex },
220 /* _Float32xComplex */ { BT _Float32xComplex, BT _Float32xComplex, BT _Float32xComplex, BT _Float32xComplex, BT _Float32xComplex, BT _Float32xComplex, BT _Float32xComplex, BT _Float32xComplex, BT _Float32xComplex, BT _Float32xComplex, BT _Float32xComplex, BT _Float32xComplex, BT _Float32xComplex, BT DoubleComplex, BT LongDoubleComplex, BT _Float32xComplex, BT DoubleComplex, BT LongDoubleComplex, BT _Float32xComplex, BT DoubleComplex, BT LongDoubleComplex, BT _Float32xComplex, BT _Float32xComplex, BT _Float64xComplex, BT _Float128Complex, BT _Float32xComplex, BT _Float32xComplex, BT _Float32xComplex, BT _Float64Complex, BT _Float64xComplex, BT _Float128Complex, BT _Float128xComplex, BT _Float32xComplex, BT _Float32xComplex, BT _Float32xComplex, BT _Float64Complex, BT _Float64xComplex, BT _Float128Complex, BT _Float128xComplex },
221 /* _Float64Complex */ { BT _Float64Complex, BT _Float64Complex, BT _Float64Complex, BT _Float64Complex, BT _Float64Complex, BT _Float64Complex, BT _Float64Complex, BT _Float64Complex, BT _Float64Complex, BT _Float64Complex, BT _Float64Complex, BT _Float64Complex, BT _Float64Complex, BT DoubleComplex, BT LongDoubleComplex, BT _Float64Complex, BT DoubleComplex, BT LongDoubleComplex, BT _Float64Complex, BT DoubleComplex, BT LongDoubleComplex, BT _Float64Complex, BT _Float64Complex, BT _Float64xComplex, BT _Float128Complex, BT _Float64Complex, BT _Float64Complex, BT _Float64Complex, BT _Float64Complex, BT _Float64xComplex, BT _Float128Complex, BT _Float128xComplex, BT _Float64Complex, BT _Float64Complex, BT _Float64Complex, BT _Float64Complex, BT _Float64xComplex, BT _Float128Complex, BT _Float128xComplex },
222 /* _Float64xComplex */ { BT _Float64xComplex, BT _Float64xComplex, BT _Float64xComplex, BT _Float64xComplex, BT _Float64xComplex, BT _Float64xComplex, BT _Float64xComplex, BT _Float64xComplex, BT _Float64xComplex, BT _Float64xComplex, BT _Float64xComplex, BT _Float64xComplex, BT _Float64xComplex, BT _Float64xComplex, BT LongDoubleComplex, BT _Float64xComplex, BT _Float64xComplex, BT LongDoubleComplex, BT _Float64xComplex, BT _Float64xComplex, BT LongDoubleComplex, BT _Float64xComplex, BT _Float64xComplex, BT _Float64xComplex, BT _Float128Complex, BT _Float64xComplex, BT _Float64xComplex, BT _Float64xComplex, BT _Float64xComplex, BT _Float64xComplex, BT _Float128Complex, BT _Float128xComplex, BT _Float64xComplex, BT _Float64xComplex, BT _Float64xComplex, BT _Float64xComplex, BT _Float64xComplex, BT _Float128Complex, BT _Float128xComplex },
223 /* _Float128Complex */ { BT _Float128Complex, BT _Float128Complex, BT _Float128Complex, BT _Float128Complex, BT _Float128Complex, BT _Float128Complex, BT _Float128Complex, BT _Float128Complex, BT _Float128Complex, BT _Float128Complex, BT _Float128Complex, BT _Float128Complex, BT _Float128Complex, BT _Float128Complex, BT LongDoubleComplex, BT _Float128Complex, BT _Float128Complex, BT LongDoubleComplex, BT _Float128Complex, BT _Float128Complex, BT LongDoubleComplex, BT _Float128Complex, BT _Float128Complex, BT _Float128Complex, BT _Float128Complex, BT _Float128Complex, BT _Float128Complex, BT _Float128Complex, BT _Float128Complex, BT _Float128Complex, BT _Float128Complex, BT _Float128xComplex, BT _Float128Complex, BT _Float128Complex, BT _Float128Complex, BT _Float128Complex, BT _Float128Complex, BT _Float128Complex, BT _Float128xComplex },
224 /* _Float128xComplex */ { BT _Float128xComplex, BT _Float128xComplex, BT _Float128xComplex, BT _Float128xComplex, BT _Float128xComplex, BT _Float128xComplex, BT _Float128xComplex, BT _Float128xComplex, BT _Float128xComplex, BT _Float128xComplex, BT _Float128xComplex, BT _Float128xComplex, BT _Float128xComplex, BT _Float128xComplex, BT _Float128xComplex, BT _Float128xComplex, BT _Float128xComplex, BT _Float128xComplex, BT _Float128xComplex, BT _Float128xComplex, BT _Float128xComplex, BT _Float128xComplex, BT _Float128xComplex, BT _Float128xComplex, BT _Float128xComplex, BT _Float128xComplex, BT _Float128xComplex, BT _Float128xComplex, BT _Float128xComplex, BT _Float128xComplex, BT _Float128xComplex, BT _Float128xComplex, BT _Float128xComplex, BT _Float128xComplex, BT _Float128xComplex, BT _Float128xComplex, BT _Float128xComplex, BT _Float128xComplex, BT _Float128xComplex },
225 };
226 #undef BT
227#endif
228
229 // GENERATED START, DO NOT EDIT
230 #define BT BasicType::
231 static const BasicType::Kind commonTypes[BasicType::NUMBER_OF_BASIC_TYPES][BasicType::NUMBER_OF_BASIC_TYPES] = { // nearest common ancestor
232 /* B C SC UC SI SUI
233 I UI LI LUI LLI LLUI
234 IB UIB _FH _FH _F _FC
235 F FC _FX _FXC FD _FDC
236 D DC F80X _FDXC F80 _FB
237 _FLDC FB LD LDC _FBX _FLDXC
238 */
239 /* B*/ BT Bool, BT Char, BT SignedChar, BT UnsignedChar, BT ShortSignedInt, BT ShortUnsignedInt,
240 BT SignedInt, BT UnsignedInt, BT LongSignedInt, BT LongUnsignedInt, BT LongLongSignedInt, BT LongLongUnsignedInt,
241 BT SignedInt128, BT UnsignedInt128, BT uFloat16, BT uFloat16Complex, BT uFloat32, BT uFloat32Complex,
242 BT Float, BT FloatComplex, BT uFloat32x, BT uFloat32xComplex, BT uFloat64, BT uFloat64Complex,
243 BT Double, BT DoubleComplex, BT uFloat64x, BT uFloat64xComplex, BT uuFloat80, BT uFloat128,
244 BT uFloat128Complex, BT uuFloat128, BT LongDouble, BT LongDoubleComplex, BT uFloat128x, BT uFloat128xComplex,
245
246 /* C*/ BT Char, BT Char, BT SignedChar, BT UnsignedChar, BT ShortSignedInt, BT ShortUnsignedInt,
247 BT SignedInt, BT UnsignedInt, BT LongSignedInt, BT LongUnsignedInt, BT LongLongSignedInt, BT LongLongUnsignedInt,
248 BT SignedInt128, BT UnsignedInt128, BT uFloat16, BT uFloat16Complex, BT uFloat32, BT uFloat32Complex,
249 BT Float, BT FloatComplex, BT uFloat32x, BT uFloat32xComplex, BT uFloat64, BT uFloat64Complex,
250 BT Double, BT DoubleComplex, BT uFloat64x, BT uFloat64xComplex, BT uuFloat80, BT uFloat128,
251 BT uFloat128Complex, BT uuFloat128, BT LongDouble, BT LongDoubleComplex, BT uFloat128x, BT uFloat128xComplex,
252
253 /* SC*/ BT SignedChar, BT SignedChar, BT SignedChar, BT UnsignedChar, BT ShortSignedInt, BT ShortUnsignedInt,
254 BT SignedInt, BT UnsignedInt, BT LongSignedInt, BT LongUnsignedInt, BT LongLongSignedInt, BT LongLongUnsignedInt,
255 BT SignedInt128, BT UnsignedInt128, BT uFloat16, BT uFloat16Complex, BT uFloat32, BT uFloat32Complex,
256 BT Float, BT FloatComplex, BT uFloat32x, BT uFloat32xComplex, BT uFloat64, BT uFloat64Complex,
257 BT Double, BT DoubleComplex, BT uFloat64x, BT uFloat64xComplex, BT uuFloat80, BT uFloat128,
258 BT uFloat128Complex, BT uuFloat128, BT LongDouble, BT LongDoubleComplex, BT uFloat128x, BT uFloat128xComplex,
259
260 /* UC*/ BT UnsignedChar, BT UnsignedChar, BT UnsignedChar, BT UnsignedChar, BT ShortSignedInt, BT ShortUnsignedInt,
261 BT SignedInt, BT UnsignedInt, BT LongSignedInt, BT LongUnsignedInt, BT LongLongSignedInt, BT LongLongUnsignedInt,
262 BT SignedInt128, BT UnsignedInt128, BT uFloat16, BT uFloat16Complex, BT uFloat32, BT uFloat32Complex,
263 BT Float, BT FloatComplex, BT uFloat32x, BT uFloat32xComplex, BT uFloat64, BT uFloat64Complex,
264 BT Double, BT DoubleComplex, BT uFloat64x, BT uFloat64xComplex, BT uuFloat80, BT uFloat128,
265 BT uFloat128Complex, BT uuFloat128, BT LongDouble, BT LongDoubleComplex, BT uFloat128x, BT uFloat128xComplex,
266
267 /* SI*/ BT ShortSignedInt, BT ShortSignedInt, BT ShortSignedInt, BT ShortSignedInt, BT ShortSignedInt, BT ShortUnsignedInt,
268 BT SignedInt, BT UnsignedInt, BT LongSignedInt, BT LongUnsignedInt, BT LongLongSignedInt, BT LongLongUnsignedInt,
269 BT SignedInt128, BT UnsignedInt128, BT uFloat16, BT uFloat16Complex, BT uFloat32, BT uFloat32Complex,
270 BT Float, BT FloatComplex, BT uFloat32x, BT uFloat32xComplex, BT uFloat64, BT uFloat64Complex,
271 BT Double, BT DoubleComplex, BT uFloat64x, BT uFloat64xComplex, BT uuFloat80, BT uFloat128,
272 BT uFloat128Complex, BT uuFloat128, BT LongDouble, BT LongDoubleComplex, BT uFloat128x, BT uFloat128xComplex,
273
274 /* SUI*/ BT ShortUnsignedInt, BT ShortUnsignedInt, BT ShortUnsignedInt, BT ShortUnsignedInt, BT ShortUnsignedInt, BT ShortUnsignedInt,
275 BT SignedInt, BT UnsignedInt, BT LongSignedInt, BT LongUnsignedInt, BT LongLongSignedInt, BT LongLongUnsignedInt,
276 BT SignedInt128, BT UnsignedInt128, BT uFloat16, BT uFloat16Complex, BT uFloat32, BT uFloat32Complex,
277 BT Float, BT FloatComplex, BT uFloat32x, BT uFloat32xComplex, BT uFloat64, BT uFloat64Complex,
278 BT Double, BT DoubleComplex, BT uFloat64x, BT uFloat64xComplex, BT uuFloat80, BT uFloat128,
279 BT uFloat128Complex, BT uuFloat128, BT LongDouble, BT LongDoubleComplex, BT uFloat128x, BT uFloat128xComplex,
280
281 /* I*/ BT SignedInt, BT SignedInt, BT SignedInt, BT SignedInt, BT SignedInt, BT SignedInt,
282 BT SignedInt, BT UnsignedInt, BT LongSignedInt, BT LongUnsignedInt, BT LongLongSignedInt, BT LongLongUnsignedInt,
283 BT SignedInt128, BT UnsignedInt128, BT uFloat16, BT uFloat16Complex, BT uFloat32, BT uFloat32Complex,
284 BT Float, BT FloatComplex, BT uFloat32x, BT uFloat32xComplex, BT uFloat64, BT uFloat64Complex,
285 BT Double, BT DoubleComplex, BT uFloat64x, BT uFloat64xComplex, BT uuFloat80, BT uFloat128,
286 BT uFloat128Complex, BT uuFloat128, BT LongDouble, BT LongDoubleComplex, BT uFloat128x, BT uFloat128xComplex,
287
288 /* UI*/ BT UnsignedInt, BT UnsignedInt, BT UnsignedInt, BT UnsignedInt, BT UnsignedInt, BT UnsignedInt,
289 BT UnsignedInt, BT UnsignedInt, BT LongSignedInt, BT LongUnsignedInt, BT LongLongSignedInt, BT LongLongUnsignedInt,
290 BT SignedInt128, BT UnsignedInt128, BT uFloat16, BT uFloat16Complex, BT uFloat32, BT uFloat32Complex,
291 BT Float, BT FloatComplex, BT uFloat32x, BT uFloat32xComplex, BT uFloat64, BT uFloat64Complex,
292 BT Double, BT DoubleComplex, BT uFloat64x, BT uFloat64xComplex, BT uuFloat80, BT uFloat128,
293 BT uFloat128Complex, BT uuFloat128, BT LongDouble, BT LongDoubleComplex, BT uFloat128x, BT uFloat128xComplex,
294
295 /* LI*/ BT LongSignedInt, BT LongSignedInt, BT LongSignedInt, BT LongSignedInt, BT LongSignedInt, BT LongSignedInt,
296 BT LongSignedInt, BT LongSignedInt, BT LongSignedInt, BT LongUnsignedInt, BT LongLongSignedInt, BT LongLongUnsignedInt,
297 BT SignedInt128, BT UnsignedInt128, BT uFloat16, BT uFloat16Complex, BT uFloat32, BT uFloat32Complex,
298 BT Float, BT FloatComplex, BT uFloat32x, BT uFloat32xComplex, BT uFloat64, BT uFloat64Complex,
299 BT Double, BT DoubleComplex, BT uFloat64x, BT uFloat64xComplex, BT uuFloat80, BT uFloat128,
300 BT uFloat128Complex, BT uuFloat128, BT LongDouble, BT LongDoubleComplex, BT uFloat128x, BT uFloat128xComplex,
301
302 /* LUI*/ BT LongUnsignedInt, BT LongUnsignedInt, BT LongUnsignedInt, BT LongUnsignedInt, BT LongUnsignedInt, BT LongUnsignedInt,
303 BT LongUnsignedInt, BT LongUnsignedInt, BT LongUnsignedInt, BT LongUnsignedInt, BT LongLongSignedInt, BT LongLongUnsignedInt,
304 BT SignedInt128, BT UnsignedInt128, BT uFloat16, BT uFloat16Complex, BT uFloat32, BT uFloat32Complex,
305 BT Float, BT FloatComplex, BT uFloat32x, BT uFloat32xComplex, BT uFloat64, BT uFloat64Complex,
306 BT Double, BT DoubleComplex, BT uFloat64x, BT uFloat64xComplex, BT uuFloat80, BT uFloat128,
307 BT uFloat128Complex, BT uuFloat128, BT LongDouble, BT LongDoubleComplex, BT uFloat128x, BT uFloat128xComplex,
308
309 /* LLI*/ BT LongLongSignedInt, BT LongLongSignedInt, BT LongLongSignedInt, BT LongLongSignedInt, BT LongLongSignedInt, BT LongLongSignedInt,
310 BT LongLongSignedInt, BT LongLongSignedInt, BT LongLongSignedInt, BT LongLongSignedInt, BT LongLongSignedInt, BT LongLongUnsignedInt,
311 BT SignedInt128, BT UnsignedInt128, BT uFloat16, BT uFloat16Complex, BT uFloat32, BT uFloat32Complex,
312 BT Float, BT FloatComplex, BT uFloat32x, BT uFloat32xComplex, BT uFloat64, BT uFloat64Complex,
313 BT Double, BT DoubleComplex, BT uFloat64x, BT uFloat64xComplex, BT uuFloat80, BT uFloat128,
314 BT uFloat128Complex, BT uuFloat128, BT LongDouble, BT LongDoubleComplex, BT uFloat128x, BT uFloat128xComplex,
315
316 /* LLUI*/ BT LongLongUnsignedInt, BT LongLongUnsignedInt, BT LongLongUnsignedInt, BT LongLongUnsignedInt, BT LongLongUnsignedInt, BT LongLongUnsignedInt,
317 BT LongLongUnsignedInt, BT LongLongUnsignedInt, BT LongLongUnsignedInt, BT LongLongUnsignedInt, BT LongLongUnsignedInt, BT LongLongUnsignedInt,
318 BT SignedInt128, BT UnsignedInt128, BT uFloat16, BT uFloat16Complex, BT uFloat32, BT uFloat32Complex,
319 BT Float, BT FloatComplex, BT uFloat32x, BT uFloat32xComplex, BT uFloat64, BT uFloat64Complex,
320 BT Double, BT DoubleComplex, BT uFloat64x, BT uFloat64xComplex, BT uuFloat80, BT uFloat128,
321 BT uFloat128Complex, BT uuFloat128, BT LongDouble, BT LongDoubleComplex, BT uFloat128x, BT uFloat128xComplex,
322
323 /* IB*/ BT SignedInt128, BT SignedInt128, BT SignedInt128, BT SignedInt128, BT SignedInt128, BT SignedInt128,
324 BT SignedInt128, BT SignedInt128, BT SignedInt128, BT SignedInt128, BT SignedInt128, BT SignedInt128,
325 BT SignedInt128, BT UnsignedInt128, BT uFloat16, BT uFloat16Complex, BT uFloat32, BT uFloat32Complex,
326 BT Float, BT FloatComplex, BT uFloat32x, BT uFloat32xComplex, BT uFloat64, BT uFloat64Complex,
327 BT Double, BT DoubleComplex, BT uFloat64x, BT uFloat64xComplex, BT uuFloat80, BT uFloat128,
328 BT uFloat128Complex, BT uuFloat128, BT LongDouble, BT LongDoubleComplex, BT uFloat128x, BT uFloat128xComplex,
329
330 /* UIB*/ BT UnsignedInt128, BT UnsignedInt128, BT UnsignedInt128, BT UnsignedInt128, BT UnsignedInt128, BT UnsignedInt128,
331 BT UnsignedInt128, BT UnsignedInt128, BT UnsignedInt128, BT UnsignedInt128, BT UnsignedInt128, BT UnsignedInt128,
332 BT UnsignedInt128, BT UnsignedInt128, BT uFloat16, BT uFloat16Complex, BT uFloat32, BT uFloat32Complex,
333 BT Float, BT FloatComplex, BT uFloat32x, BT uFloat32xComplex, BT uFloat64, BT uFloat64Complex,
334 BT Double, BT DoubleComplex, BT uFloat64x, BT uFloat64xComplex, BT uuFloat80, BT uFloat128,
335 BT uFloat128Complex, BT uuFloat128, BT LongDouble, BT LongDoubleComplex, BT uFloat128x, BT uFloat128xComplex,
336
337 /* _FH*/ BT uFloat16, BT uFloat16, BT uFloat16, BT uFloat16, BT uFloat16, BT uFloat16,
338 BT uFloat16, BT uFloat16, BT uFloat16, BT uFloat16, BT uFloat16, BT uFloat16,
339 BT uFloat16, BT uFloat16, BT uFloat16, BT uFloat16Complex, BT uFloat32, BT uFloat32Complex,
340 BT Float, BT FloatComplex, BT uFloat32x, BT uFloat32xComplex, BT uFloat64, BT uFloat64Complex,
341 BT Double, BT DoubleComplex, BT uFloat64x, BT uFloat64xComplex, BT uuFloat80, BT uFloat128,
342 BT uFloat128Complex, BT uuFloat128, BT LongDouble, BT LongDoubleComplex, BT uFloat128x, BT uFloat128xComplex,
343
344 /* _FH*/ BT uFloat16Complex, BT uFloat16Complex, BT uFloat16Complex, BT uFloat16Complex, BT uFloat16Complex, BT uFloat16Complex,
345 BT uFloat16Complex, BT uFloat16Complex, BT uFloat16Complex, BT uFloat16Complex, BT uFloat16Complex, BT uFloat16Complex,
346 BT uFloat16Complex, BT uFloat16Complex, BT uFloat16Complex, BT uFloat16Complex, BT uFloat32Complex, BT uFloat32Complex,
347 BT FloatComplex, BT FloatComplex, BT uFloat32xComplex, BT uFloat32xComplex, BT uFloat64Complex, BT uFloat64Complex,
348 BT DoubleComplex, BT DoubleComplex, BT uFloat64xComplex, BT uFloat64xComplex, BT uFloat64xComplex, BT uFloat128Complex,
349 BT uFloat128Complex, BT uFloat128Complex, BT LongDoubleComplex, BT LongDoubleComplex, BT uFloat128xComplex, BT uFloat128xComplex,
350
351 /* _F*/ BT uFloat32, BT uFloat32, BT uFloat32, BT uFloat32, BT uFloat32, BT uFloat32,
352 BT uFloat32, BT uFloat32, BT uFloat32, BT uFloat32, BT uFloat32, BT uFloat32,
353 BT uFloat32, BT uFloat32, BT uFloat32, BT uFloat32Complex, BT uFloat32, BT uFloat32Complex,
354 BT Float, BT FloatComplex, BT uFloat32x, BT uFloat32xComplex, BT uFloat64, BT uFloat64Complex,
355 BT Double, BT DoubleComplex, BT uFloat64x, BT uFloat64xComplex, BT uuFloat80, BT uFloat128,
356 BT uFloat128Complex, BT uuFloat128, BT LongDouble, BT LongDoubleComplex, BT uFloat128x, BT uFloat128xComplex,
357
358 /* _FC*/ BT uFloat32Complex, BT uFloat32Complex, BT uFloat32Complex, BT uFloat32Complex, BT uFloat32Complex, BT uFloat32Complex,
359 BT uFloat32Complex, BT uFloat32Complex, BT uFloat32Complex, BT uFloat32Complex, BT uFloat32Complex, BT uFloat32Complex,
360 BT uFloat32Complex, BT uFloat32Complex, BT uFloat32Complex, BT uFloat32Complex, BT uFloat32Complex, BT uFloat32Complex,
361 BT FloatComplex, BT FloatComplex, BT uFloat32xComplex, BT uFloat32xComplex, BT uFloat64Complex, BT uFloat64Complex,
362 BT DoubleComplex, BT DoubleComplex, BT uFloat64xComplex, BT uFloat64xComplex, BT uFloat64xComplex, BT uFloat128Complex,
363 BT uFloat128Complex, BT uFloat128Complex, BT LongDoubleComplex, BT LongDoubleComplex, BT uFloat128xComplex, BT uFloat128xComplex,
364
365 /* F*/ BT Float, BT Float, BT Float, BT Float, BT Float, BT Float,
366 BT Float, BT Float, BT Float, BT Float, BT Float, BT Float,
367 BT Float, BT Float, BT Float, BT FloatComplex, BT Float, BT FloatComplex,
368 BT Float, BT FloatComplex, BT uFloat32x, BT uFloat32xComplex, BT uFloat64, BT uFloat64Complex,
369 BT Double, BT DoubleComplex, BT uFloat64x, BT uFloat64xComplex, BT uuFloat80, BT uFloat128,
370 BT uFloat128Complex, BT uuFloat128, BT LongDouble, BT LongDoubleComplex, BT uFloat128x, BT uFloat128xComplex,
371
372 /* FC*/ BT FloatComplex, BT FloatComplex, BT FloatComplex, BT FloatComplex, BT FloatComplex, BT FloatComplex,
373 BT FloatComplex, BT FloatComplex, BT FloatComplex, BT FloatComplex, BT FloatComplex, BT FloatComplex,
374 BT FloatComplex, BT FloatComplex, BT FloatComplex, BT FloatComplex, BT FloatComplex, BT FloatComplex,
375 BT FloatComplex, BT FloatComplex, BT uFloat32xComplex, BT uFloat32xComplex, BT uFloat64Complex, BT uFloat64Complex,
376 BT DoubleComplex, BT DoubleComplex, BT uFloat64xComplex, BT uFloat64xComplex, BT uFloat64xComplex, BT uFloat128Complex,
377 BT uFloat128Complex, BT uFloat128Complex, BT LongDoubleComplex, BT LongDoubleComplex, BT uFloat128xComplex, BT uFloat128xComplex,
378
379 /* _FX*/ BT uFloat32x, BT uFloat32x, BT uFloat32x, BT uFloat32x, BT uFloat32x, BT uFloat32x,
380 BT uFloat32x, BT uFloat32x, BT uFloat32x, BT uFloat32x, BT uFloat32x, BT uFloat32x,
381 BT uFloat32x, BT uFloat32x, BT uFloat32x, BT uFloat32xComplex, BT uFloat32x, BT uFloat32xComplex,
382 BT uFloat32x, BT uFloat32xComplex, BT uFloat32x, BT uFloat32xComplex, BT uFloat64, BT uFloat64Complex,
383 BT Double, BT DoubleComplex, BT uFloat64x, BT uFloat64xComplex, BT uuFloat80, BT uFloat128,
384 BT uFloat128Complex, BT uuFloat128, BT LongDouble, BT LongDoubleComplex, BT uFloat128x, BT uFloat128xComplex,
385
386 /* _FXC*/ BT uFloat32xComplex, BT uFloat32xComplex, BT uFloat32xComplex, BT uFloat32xComplex, BT uFloat32xComplex, BT uFloat32xComplex,
387 BT uFloat32xComplex, BT uFloat32xComplex, BT uFloat32xComplex, BT uFloat32xComplex, BT uFloat32xComplex, BT uFloat32xComplex,
388 BT uFloat32xComplex, BT uFloat32xComplex, BT uFloat32xComplex, BT uFloat32xComplex, BT uFloat32xComplex, BT uFloat32xComplex,
389 BT uFloat32xComplex, BT uFloat32xComplex, BT uFloat32xComplex, BT uFloat32xComplex, BT uFloat64Complex, BT uFloat64Complex,
390 BT DoubleComplex, BT DoubleComplex, BT uFloat64xComplex, BT uFloat64xComplex, BT uFloat64xComplex, BT uFloat128Complex,
391 BT uFloat128Complex, BT uFloat128Complex, BT LongDoubleComplex, BT LongDoubleComplex, BT uFloat128xComplex, BT uFloat128xComplex,
392
393 /* FD*/ BT uFloat64, BT uFloat64, BT uFloat64, BT uFloat64, BT uFloat64, BT uFloat64,
394 BT uFloat64, BT uFloat64, BT uFloat64, BT uFloat64, BT uFloat64, BT uFloat64,
395 BT uFloat64, BT uFloat64, BT uFloat64, BT uFloat64Complex, BT uFloat64, BT uFloat64Complex,
396 BT uFloat64, BT uFloat64Complex, BT uFloat64, BT uFloat64Complex, BT uFloat64, BT uFloat64Complex,
397 BT Double, BT DoubleComplex, BT uFloat64x, BT uFloat64xComplex, BT uuFloat80, BT uFloat128,
398 BT uFloat128Complex, BT uuFloat128, BT LongDouble, BT LongDoubleComplex, BT uFloat128x, BT uFloat128xComplex,
399
400 /* _FDC*/ BT uFloat64Complex, BT uFloat64Complex, BT uFloat64Complex, BT uFloat64Complex, BT uFloat64Complex, BT uFloat64Complex,
401 BT uFloat64Complex, BT uFloat64Complex, BT uFloat64Complex, BT uFloat64Complex, BT uFloat64Complex, BT uFloat64Complex,
402 BT uFloat64Complex, BT uFloat64Complex, BT uFloat64Complex, BT uFloat64Complex, BT uFloat64Complex, BT uFloat64Complex,
403 BT uFloat64Complex, BT uFloat64Complex, BT uFloat64Complex, BT uFloat64Complex, BT uFloat64Complex, BT uFloat64Complex,
404 BT DoubleComplex, BT DoubleComplex, BT uFloat64xComplex, BT uFloat64xComplex, BT uFloat64xComplex, BT uFloat128Complex,
405 BT uFloat128Complex, BT uFloat128Complex, BT LongDoubleComplex, BT LongDoubleComplex, BT uFloat128xComplex, BT uFloat128xComplex,
406
407 /* D*/ BT Double, BT Double, BT Double, BT Double, BT Double, BT Double,
408 BT Double, BT Double, BT Double, BT Double, BT Double, BT Double,
409 BT Double, BT Double, BT Double, BT DoubleComplex, BT Double, BT DoubleComplex,
410 BT Double, BT DoubleComplex, BT Double, BT DoubleComplex, BT Double, BT DoubleComplex,
411 BT Double, BT DoubleComplex, BT uFloat64x, BT uFloat64xComplex, BT uuFloat80, BT uFloat128,
412 BT uFloat128Complex, BT uuFloat128, BT LongDouble, BT LongDoubleComplex, BT uFloat128x, BT uFloat128xComplex,
413
414 /* DC*/ BT DoubleComplex, BT DoubleComplex, BT DoubleComplex, BT DoubleComplex, BT DoubleComplex, BT DoubleComplex,
415 BT DoubleComplex, BT DoubleComplex, BT DoubleComplex, BT DoubleComplex, BT DoubleComplex, BT DoubleComplex,
416 BT DoubleComplex, BT DoubleComplex, BT DoubleComplex, BT DoubleComplex, BT DoubleComplex, BT DoubleComplex,
417 BT DoubleComplex, BT DoubleComplex, BT DoubleComplex, BT DoubleComplex, BT DoubleComplex, BT DoubleComplex,
418 BT DoubleComplex, BT DoubleComplex, BT uFloat64xComplex, BT uFloat64xComplex, BT uFloat64xComplex, BT uFloat128Complex,
419 BT uFloat128Complex, BT uFloat128Complex, BT LongDoubleComplex, BT LongDoubleComplex, BT uFloat128xComplex, BT uFloat128xComplex,
420
421 /* F80X*/ BT uFloat64x, BT uFloat64x, BT uFloat64x, BT uFloat64x, BT uFloat64x, BT uFloat64x,
422 BT uFloat64x, BT uFloat64x, BT uFloat64x, BT uFloat64x, BT uFloat64x, BT uFloat64x,
423 BT uFloat64x, BT uFloat64x, BT uFloat64x, BT uFloat64xComplex, BT uFloat64x, BT uFloat64xComplex,
424 BT uFloat64x, BT uFloat64xComplex, BT uFloat64x, BT uFloat64xComplex, BT uFloat64x, BT uFloat64xComplex,
425 BT uFloat64x, BT uFloat64xComplex, BT uFloat64x, BT uFloat64xComplex, BT uuFloat80, BT uFloat128,
426 BT uFloat128Complex, BT uuFloat128, BT LongDouble, BT LongDoubleComplex, BT uFloat128x, BT uFloat128xComplex,
427
428 /* _FDXC*/ BT uFloat64xComplex, BT uFloat64xComplex, BT uFloat64xComplex, BT uFloat64xComplex, BT uFloat64xComplex, BT uFloat64xComplex,
429 BT uFloat64xComplex, BT uFloat64xComplex, BT uFloat64xComplex, BT uFloat64xComplex, BT uFloat64xComplex, BT uFloat64xComplex,
430 BT uFloat64xComplex, BT uFloat64xComplex, BT uFloat64xComplex, BT uFloat64xComplex, BT uFloat64xComplex, BT uFloat64xComplex,
431 BT uFloat64xComplex, BT uFloat64xComplex, BT uFloat64xComplex, BT uFloat64xComplex, BT uFloat64xComplex, BT uFloat64xComplex,
432 BT uFloat64xComplex, BT uFloat64xComplex, BT uFloat64xComplex, BT uFloat64xComplex, BT uFloat64xComplex, BT uFloat128Complex,
433 BT uFloat128Complex, BT uFloat128Complex, BT LongDoubleComplex, BT LongDoubleComplex, BT uFloat128xComplex, BT uFloat128xComplex,
434
435 /* F80*/ BT uuFloat80, BT uuFloat80, BT uuFloat80, BT uuFloat80, BT uuFloat80, BT uuFloat80,
436 BT uuFloat80, BT uuFloat80, BT uuFloat80, BT uuFloat80, BT uuFloat80, BT uuFloat80,
437 BT uuFloat80, BT uuFloat80, BT uuFloat80, BT uFloat64xComplex, BT uuFloat80, BT uFloat64xComplex,
438 BT uuFloat80, BT uFloat64xComplex, BT uuFloat80, BT uFloat64xComplex, BT uuFloat80, BT uFloat64xComplex,
439 BT uuFloat80, BT uFloat64xComplex, BT uuFloat80, BT uFloat64xComplex, BT uuFloat80, BT uFloat128,
440 BT uFloat128Complex, BT uuFloat128, BT LongDouble, BT LongDoubleComplex, BT uFloat128x, BT uFloat128xComplex,
441
442 /* _FB*/ BT uFloat128, BT uFloat128, BT uFloat128, BT uFloat128, BT uFloat128, BT uFloat128,
443 BT uFloat128, BT uFloat128, BT uFloat128, BT uFloat128, BT uFloat128, BT uFloat128,
444 BT uFloat128, BT uFloat128, BT uFloat128, BT uFloat128Complex, BT uFloat128, BT uFloat128Complex,
445 BT uFloat128, BT uFloat128Complex, BT uFloat128, BT uFloat128Complex, BT uFloat128, BT uFloat128Complex,
446 BT uFloat128, BT uFloat128Complex, BT uFloat128, BT uFloat128Complex, BT uFloat128, BT uFloat128,
447 BT uFloat128Complex, BT uuFloat128, BT LongDouble, BT LongDoubleComplex, BT uFloat128x, BT uFloat128xComplex,
448
449 /* _FLDC*/ BT uFloat128Complex, BT uFloat128Complex, BT uFloat128Complex, BT uFloat128Complex, BT uFloat128Complex, BT uFloat128Complex,
450 BT uFloat128Complex, BT uFloat128Complex, BT uFloat128Complex, BT uFloat128Complex, BT uFloat128Complex, BT uFloat128Complex,
451 BT uFloat128Complex, BT uFloat128Complex, BT uFloat128Complex, BT uFloat128Complex, BT uFloat128Complex, BT uFloat128Complex,
452 BT uFloat128Complex, BT uFloat128Complex, BT uFloat128Complex, BT uFloat128Complex, BT uFloat128Complex, BT uFloat128Complex,
453 BT uFloat128Complex, BT uFloat128Complex, BT uFloat128Complex, BT uFloat128Complex, BT uFloat128Complex, BT uFloat128Complex,
454 BT uFloat128Complex, BT uFloat128Complex, BT LongDoubleComplex, BT LongDoubleComplex, BT uFloat128xComplex, BT uFloat128xComplex,
455
456 /* FB*/ BT uuFloat128, BT uuFloat128, BT uuFloat128, BT uuFloat128, BT uuFloat128, BT uuFloat128,
457 BT uuFloat128, BT uuFloat128, BT uuFloat128, BT uuFloat128, BT uuFloat128, BT uuFloat128,
458 BT uuFloat128, BT uuFloat128, BT uuFloat128, BT uFloat128Complex, BT uuFloat128, BT uFloat128Complex,
459 BT uuFloat128, BT uFloat128Complex, BT uuFloat128, BT uFloat128Complex, BT uuFloat128, BT uFloat128Complex,
460 BT uuFloat128, BT uFloat128Complex, BT uuFloat128, BT uFloat128Complex, BT uuFloat128, BT uuFloat128,
461 BT uFloat128Complex, BT uuFloat128, BT LongDouble, BT LongDoubleComplex, BT uFloat128x, BT uFloat128xComplex,
462
463 /* LD*/ BT LongDouble, BT LongDouble, BT LongDouble, BT LongDouble, BT LongDouble, BT LongDouble,
464 BT LongDouble, BT LongDouble, BT LongDouble, BT LongDouble, BT LongDouble, BT LongDouble,
465 BT LongDouble, BT LongDouble, BT LongDouble, BT LongDoubleComplex, BT LongDouble, BT LongDoubleComplex,
466 BT LongDouble, BT LongDoubleComplex, BT LongDouble, BT LongDoubleComplex, BT LongDouble, BT LongDoubleComplex,
467 BT LongDouble, BT LongDoubleComplex, BT LongDouble, BT LongDoubleComplex, BT LongDouble, BT LongDouble,
468 BT LongDoubleComplex, BT LongDouble, BT LongDouble, BT LongDoubleComplex, BT uFloat128x, BT uFloat128xComplex,
469
470 /* LDC*/ BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex,
471 BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex,
472 BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex,
473 BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex,
474 BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex,
475 BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT LongDoubleComplex, BT uFloat128xComplex, BT uFloat128xComplex,
476
477 /* _FBX*/ BT uFloat128x, BT uFloat128x, BT uFloat128x, BT uFloat128x, BT uFloat128x, BT uFloat128x,
478 BT uFloat128x, BT uFloat128x, BT uFloat128x, BT uFloat128x, BT uFloat128x, BT uFloat128x,
479 BT uFloat128x, BT uFloat128x, BT uFloat128x, BT uFloat128xComplex, BT uFloat128x, BT uFloat128xComplex,
480 BT uFloat128x, BT uFloat128xComplex, BT uFloat128x, BT uFloat128xComplex, BT uFloat128x, BT uFloat128xComplex,
481 BT uFloat128x, BT uFloat128xComplex, BT uFloat128x, BT uFloat128xComplex, BT uFloat128x, BT uFloat128x,
482 BT uFloat128xComplex, BT uFloat128x, BT uFloat128x, BT uFloat128xComplex, BT uFloat128x, BT uFloat128xComplex,
483
484 /*_FLDXC*/ BT uFloat128xComplex, BT uFloat128xComplex, BT uFloat128xComplex, BT uFloat128xComplex, BT uFloat128xComplex, BT uFloat128xComplex,
485 BT uFloat128xComplex, BT uFloat128xComplex, BT uFloat128xComplex, BT uFloat128xComplex, BT uFloat128xComplex, BT uFloat128xComplex,
486 BT uFloat128xComplex, BT uFloat128xComplex, BT uFloat128xComplex, BT uFloat128xComplex, BT uFloat128xComplex, BT uFloat128xComplex,
487 BT uFloat128xComplex, BT uFloat128xComplex, BT uFloat128xComplex, BT uFloat128xComplex, BT uFloat128xComplex, BT uFloat128xComplex,
488 BT uFloat128xComplex, BT uFloat128xComplex, BT uFloat128xComplex, BT uFloat128xComplex, BT uFloat128xComplex, BT uFloat128xComplex,
489 BT uFloat128xComplex, BT uFloat128xComplex, BT uFloat128xComplex, BT uFloat128xComplex, BT uFloat128xComplex, BT uFloat128xComplex,
490
491 };
492 #undef BT
493 // GENERATED END
494
495 static_assert(
496 sizeof(commonTypes)/sizeof(commonTypes[0][0]) == BasicType::NUMBER_OF_BASIC_TYPES*BasicType::NUMBER_OF_BASIC_TYPES,
497 "Each basic type kind should have a corresponding row in the combined type matrix"
498 );
499
500 CommonType::CommonType( Type *type2, bool widenFirst, bool widenSecond, const SymTab::Indexer &indexer, TypeEnvironment &env, const OpenVarSet &openVars )
501 : result( 0 ), type2( type2 ), widenFirst( widenFirst ), widenSecond( widenSecond ), indexer( indexer ), env( env ), openVars( openVars ) {
502 }
503
504 void CommonType::postvisit( VoidType * ) {}
505
506 void CommonType::postvisit( BasicType *basicType ) {
507 if ( BasicType *otherBasic = dynamic_cast< BasicType* >( type2 ) ) {
508 BasicType::Kind newType = commonTypes[ basicType->get_kind() ][ otherBasic->get_kind() ];
509 if ( ( ( newType == basicType->get_kind() && basicType->get_qualifiers() >= otherBasic->get_qualifiers() ) || widenFirst ) && ( ( newType == otherBasic->get_kind() && basicType->get_qualifiers() <= otherBasic->get_qualifiers() ) || widenSecond ) ) {
510 result = new BasicType( basicType->get_qualifiers() | otherBasic->get_qualifiers(), newType );
511 } // if
512 } else if ( dynamic_cast< EnumInstType * > ( type2 ) || dynamic_cast< ZeroType* >( type2 ) || dynamic_cast< OneType* >( type2 ) ) {
513 // use signed int in lieu of the enum/zero/one type
514 BasicType::Kind newType = commonTypes[ basicType->get_kind() ][ BasicType::SignedInt ];
515 if ( ( ( newType == basicType->get_kind() && basicType->get_qualifiers() >= type2->get_qualifiers() ) || widenFirst ) && ( ( newType != basicType->get_kind() && basicType->get_qualifiers() <= type2->get_qualifiers() ) || widenSecond ) ) {
516 result = new BasicType( basicType->get_qualifiers() | type2->get_qualifiers(), newType );
517 } // if
518 } // if
519 }
520
521 template< typename Pointer >
522 void CommonType::getCommonWithVoidPointer( Pointer* voidPointer, Pointer* otherPointer ) {
523 if ( TypeInstType* var = dynamic_cast< TypeInstType* >( otherPointer->get_base() ) ) {
524 OpenVarSet::const_iterator entry = openVars.find( var->get_name() );
525 if ( entry != openVars.end() ) {
526 AssertionSet need, have;
527 WidenMode widen( widenFirst, widenSecond );
528 if ( entry != openVars.end() && ! env.bindVar(var, voidPointer->get_base(), entry->second, need, have, openVars, widen, indexer ) ) return;
529 }
530 }
531 result = voidPointer->clone();
532 result->get_qualifiers() |= otherPointer->get_qualifiers();
533 }
534
535 void CommonType::postvisit( PointerType *pointerType ) {
536 if ( PointerType *otherPointer = dynamic_cast< PointerType* >( type2 ) ) {
537 // std::cerr << "commonType: two pointers: " << pointerType << " / " << otherPointer << std::endl;
538 if ( widenFirst && dynamic_cast< VoidType* >( otherPointer->get_base() ) && ! isFtype(pointerType->get_base()) ) {
539 getCommonWithVoidPointer( otherPointer, pointerType );
540 } else if ( widenSecond && dynamic_cast< VoidType* >( pointerType->get_base() ) && ! isFtype(otherPointer->get_base()) ) {
541 getCommonWithVoidPointer( pointerType, otherPointer );
542 } else if ( ( pointerType->get_base()->get_qualifiers() >= otherPointer->get_base()->get_qualifiers() || widenFirst )
543 && ( pointerType->get_base()->get_qualifiers() <= otherPointer->get_base()->get_qualifiers() || widenSecond ) ) {
544 // std::cerr << "middle case" << std::endl;
545 Type::Qualifiers tq1 = pointerType->get_base()->get_qualifiers(), tq2 = otherPointer->get_base()->get_qualifiers();
546 pointerType->get_base()->get_qualifiers() = Type::Qualifiers();
547 otherPointer->get_base()->get_qualifiers() = Type::Qualifiers();
548 AssertionSet have, need;
549 OpenVarSet newOpen( openVars );
550 if ( unifyExact( pointerType->get_base(), otherPointer->get_base(), env, have, need, newOpen, indexer ) ) {
551 // std::cerr << "unifyExact success" << std::endl;
552 if ( tq1 < tq2 ) {
553 result = pointerType->clone();
554 } else {
555 result = otherPointer->clone();
556 } // if
557 strict_dynamic_cast<PointerType*>(result)->base->get_qualifiers() = tq1 | tq2;
558 } else {
559 /// std::cerr << "place for ptr-to-type" << std::endl;
560 } // if
561 pointerType->get_base()->get_qualifiers() = tq1;
562 otherPointer->get_base()->get_qualifiers() = tq2;
563 } // if
564 } else if ( widenSecond && dynamic_cast< ZeroType* >( type2 ) ) {
565 result = pointerType->clone();
566 result->get_qualifiers() |= type2->get_qualifiers();
567 } // if
568 }
569
570 void CommonType::postvisit( ArrayType * ) {}
571
572 void CommonType::postvisit( ReferenceType *refType ) {
573 if ( ReferenceType *otherRef = dynamic_cast< ReferenceType* >( type2 ) ) {
574 // std::cerr << "commonType: both references: " << refType << " / " << otherRef << std::endl;
575 // std::cerr << ( refType->get_base()->get_qualifiers() >= otherRef->get_base()->get_qualifiers() || widenFirst ) << (refType->get_base()->get_qualifiers() <= otherRef->get_base()->get_qualifiers() || widenSecond) << std::endl;
576 if ( widenFirst && dynamic_cast< VoidType* >( otherRef->get_base() ) && ! isFtype(refType->get_base()) ) {
577 getCommonWithVoidPointer( otherRef, refType );
578 } else if ( widenSecond && dynamic_cast< VoidType* >( refType->get_base() ) && ! isFtype(otherRef->get_base()) ) {
579 getCommonWithVoidPointer( refType, otherRef );
580 } else if ( ( refType->get_base()->get_qualifiers() >= otherRef->get_base()->get_qualifiers() || widenFirst )
581 && ( refType->get_base()->get_qualifiers() <= otherRef->get_base()->get_qualifiers() || widenSecond ) ) {
582 // std::cerr << "middle case" << std::endl;
583 Type::Qualifiers tq1 = refType->get_base()->get_qualifiers(), tq2 = otherRef->get_base()->get_qualifiers();
584 refType->get_base()->get_qualifiers() = Type::Qualifiers();
585 otherRef->get_base()->get_qualifiers() = Type::Qualifiers();
586 AssertionSet have, need;
587 OpenVarSet newOpen( openVars );
588 if ( unifyExact( refType->get_base(), otherRef->get_base(), env, have, need, newOpen, indexer ) ) {
589 if ( tq1 < tq2 ) {
590 result = refType->clone();
591 } else {
592 result = otherRef->clone();
593 } // if
594 strict_dynamic_cast<ReferenceType*>(result)->base->get_qualifiers() = tq1 | tq2;
595 } else {
596 /// std::cerr << "place for ptr-to-type" << std::endl;
597 } // if
598 refType->get_base()->get_qualifiers() = tq1;
599 otherRef->get_base()->get_qualifiers() = tq2;
600 } // if
601 } else if ( widenSecond && dynamic_cast< ZeroType* >( type2 ) ) {
602 result = refType->clone();
603 result->get_qualifiers() |= type2->get_qualifiers();
604 } // if
605 }
606
607 void CommonType::postvisit( FunctionType * ) {}
608 void CommonType::postvisit( StructInstType * ) {}
609 void CommonType::postvisit( UnionInstType * ) {}
610
611 void CommonType::postvisit( EnumInstType *enumInstType ) {
612 if ( dynamic_cast< BasicType * >( type2 ) || dynamic_cast< ZeroType* >( type2 ) || dynamic_cast< OneType* >( type2 ) ) {
613 // reuse BasicType, EnumInstType code by swapping type2 with enumInstType
614 result = commonType( type2, enumInstType, widenSecond, widenFirst, indexer, env, openVars );
615 } // if
616 }
617
618 void CommonType::postvisit( TraitInstType * ) {
619 }
620
621 void CommonType::postvisit( TypeInstType *inst ) {
622 if ( widenFirst ) {
623 NamedTypeDecl *nt = indexer.lookupType( inst->get_name() );
624 if ( nt ) {
625 TypeDecl *type = strict_dynamic_cast< TypeDecl* >( nt );
626 if ( type->get_base() ) {
627 Type::Qualifiers tq1 = inst->get_qualifiers(), tq2 = type2->get_qualifiers();
628 AssertionSet have, need;
629 OpenVarSet newOpen( openVars );
630 type2->get_qualifiers() = Type::Qualifiers();
631 type->get_base()->get_qualifiers() = tq1;
632 if ( unifyExact( type->get_base(), type2, env, have, need, newOpen, indexer ) ) {
633 result = type2->clone();
634 result->get_qualifiers() = tq1 | tq2;
635 } // if
636 type2->get_qualifiers() = tq2;
637 type->get_base()->get_qualifiers() = Type::Qualifiers();
638 } // if
639 } // if
640 } // if
641 }
642
643 void CommonType::postvisit( TupleType * ) {}
644 void CommonType::postvisit( VarArgsType * ) {}
645
646 void CommonType::postvisit( ZeroType *zeroType ) {
647 if ( widenFirst ) {
648 if ( dynamic_cast< BasicType* >( type2 ) || dynamic_cast< PointerType* >( type2 ) || dynamic_cast< EnumInstType* >( type2 ) ) {
649 if ( widenSecond || zeroType->get_qualifiers() <= type2->get_qualifiers() ) {
650 result = type2->clone();
651 result->get_qualifiers() |= zeroType->get_qualifiers();
652 }
653 } else if ( widenSecond && dynamic_cast< OneType* >( type2 ) ) {
654 result = new BasicType( zeroType->get_qualifiers(), BasicType::SignedInt );
655 result->get_qualifiers() |= type2->get_qualifiers();
656 }
657 }
658 }
659
660 void CommonType::postvisit( OneType *oneType ) {
661 if ( widenFirst ) {
662 if ( dynamic_cast< BasicType* >( type2 ) || dynamic_cast< EnumInstType* >( type2 ) ) {
663 if ( widenSecond || oneType->get_qualifiers() <= type2->get_qualifiers() ) {
664 result = type2->clone();
665 result->get_qualifiers() |= oneType->get_qualifiers();
666 }
667 } else if ( widenSecond && dynamic_cast< ZeroType* >( type2 ) ) {
668 result = new BasicType( oneType->get_qualifiers(), BasicType::SignedInt );
669 result->get_qualifiers() |= type2->get_qualifiers();
670 }
671 }
672 }
673} // namespace ResolvExpr
674
675// Local Variables: //
676// tab-width: 4 //
677// mode: c++ //
678// compile-command: "make install" //
679// End: //
Note: See TracBrowser for help on using the repository browser.