Changeset ada4575 for src/ResolvExpr
- Timestamp:
- Feb 15, 2019, 2:37:56 PM (6 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, persistent-indexer, pthread-emulation, qualifiedEnum
- Children:
- ee06e41b
- Parents:
- fba51ab
- Location:
- src/ResolvExpr
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/CommonType.cc
rfba51ab rada4575 10 10 // Created On : Sun May 17 06:59:27 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Feb 13 22:30:32201913 // Update Count : 2 212 // Last Modified On : Thu Feb 14 17:10:10 2019 13 // Update Count : 24 14 14 // 15 15 … … 175 175 return result; 176 176 } 177 #if 0178 #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 BT227 #endif228 177 229 178 // GENERATED START, DO NOT EDIT 179 // GENERATED BY BasicTypes-gen.cc 230 180 #define BT BasicType:: 231 181 static const BasicType::Kind commonTypes[BasicType::NUMBER_OF_BASIC_TYPES][BasicType::NUMBER_OF_BASIC_TYPES] = { // nearest common ancestor … … 492 442 #undef BT 493 443 // GENERATED END 494 495 444 static_assert( 496 445 sizeof(commonTypes)/sizeof(commonTypes[0][0]) == BasicType::NUMBER_OF_BASIC_TYPES*BasicType::NUMBER_OF_BASIC_TYPES, -
src/ResolvExpr/ConversionCost.cc
rfba51ab rada4575 10 10 // Created On : Sun May 17 07:06:19 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Feb 13 23:04:51 201913 // Update Count : 2 212 // Last Modified On : Thu Feb 14 17:04:31 2019 13 // Update Count : 23 14 14 // 15 15 … … 43 43 #define PRINT(x) 44 44 #endif 45 45 46 Cost conversionCost( Type *src, Type *dest, const SymTab::Indexer &indexer, const TypeEnvironment &env ) { 46 47 if ( TypeInstType *destAsTypeInst = dynamic_cast< TypeInstType* >( dest ) ) { … … 179 180 : dest( dest ), indexer( indexer ), cost( Cost::infinity ), env( env ), costFunc( costFunc ) { 180 181 } 181 #if 0182 /*183 Old184 ===185 Double186 |187 Float188 |189 ULong190 / \191 UInt Long192 \ /193 Int194 |195 Ushort196 |197 Short198 |199 Uchar200 / \201 Schar Char202 203 New204 ===205 +-----LongDoubleComplex--+206 LongDouble--+ | +-LongDoubleImag207 | +---DoubleComplex---+ |208 Double------+ | +----DoubleImag209 | +-FloatComplex-+ |210 Float---------+ +-------FloatImag211 |212 ULongLong213 |214 LongLong215 |216 ULong217 / \218 UInt Long219 \ /220 Int221 |222 Ushort223 |224 Short225 |226 Uchar227 / \228 Schar Char229 \ /230 Bool231 */232 233 static const int costMatrix[][ BasicType::NUMBER_OF_BASIC_TYPES ] = {234 /* Src \ Dest: Bool Char SChar UChar Short UShort Int UInt Long ULong LLong ULLong Float Double LDbl FCplex DCplex LDCplex FImag DImag LDImag I128, U128, F80, F128 */235 /* Bool */ { 0, 1, 1, 2, 3, 4, 5, 6, 6, 7, 8, 9, 12, 13, 14, 12, 13, 14, -1, -1, -1, 10, 11, 14, 15},236 /* Char */ { -1, 0, -1, 1, 2, 3, 4, 5, 5, 6, 7, 8, 11, 12, 13, 11, 12, 13, -1, -1, -1, 9, 10, 13, 14},237 /* SChar */ { -1, -1, 0, 1, 2, 3, 4, 5, 5, 6, 7, 8, 11, 12, 13, 11, 12, 13, -1, -1, -1, 9, 10, 13, 14},238 /* UChar */ { -1, -1, -1, 0, 1, 2, 3, 4, 4, 5, 6, 7, 10, 11, 12, 10, 11, 12, -1, -1, -1, 8, 9, 12, 13},239 /* Short */ { -1, -1, -1, -1, 0, 1, 2, 3, 3, 4, 5, 6, 9, 10, 11, 9, 10, 11, -1, -1, -1, 7, 8, 11, 12},240 /* UShort */{ -1, -1, -1, -1, -1, 0, 1, 2, 2, 3, 4, 5, 8, 9, 10, 8, 9, 10, -1, -1, -1, 6, 7, 10, 11},241 /* Int */ { -1, -1, -1, -1, -1, -1, 0, 1, 1, 2, 3, 4, 7, 8, 9, 7, 8, 9, -1, -1, -1, 5, 6, 9, 10},242 /* UInt */ { -1, -1, -1, -1, -1, -1, -1, 0, -1, 1, 2, 3, 6, 7, 8, 6, 7, 8, -1, -1, -1, 4, 5, 8, 9},243 /* Long */ { -1, -1, -1, -1, -1, -1, -1, -1, 0, 1, 2, 3, 6, 7, 8, 6, 7, 8, -1, -1, -1, 4, 5, 8, 9},244 /* ULong */ { -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 1, 2, 5, 6, 7, 5, 6, 7, -1, -1, -1, 3, 4, 7, 8},245 /* LLong */ { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 1, 4, 5, 6, 4, 5, 6, -1, -1, -1, 2, 3, 6, 7},246 /* ULLong */{ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 3, 4, 5, 3, 4, 5, -1, -1, -1, 1, 2, 5, 6},247 248 /* Float */ { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 1, 2, 1, 2, 3, -1, -1, -1, -1, -1, 2, 3},249 /* Double */{ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 1, -1, 1, 2, -1, -1, -1, -1, -1, 1, 2},250 /* LDbl */ { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, -1, 1, -1, -1, -1, -1, -1, -1, 1},251 /* FCplex */{ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 1, 2, -1, -1, -1, -1, -1, -1, -1},252 /* DCplex */{ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 1, -1, -1, -1, -1, -1, -1, -1},253 /* LDCplex */{ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, -1, -1, -1, -1, -1, -1},254 /* FImag */ { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, 2, 3, 0, 1, 2, -1, -1, -1, -1},255 /* DImag */ { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, 2, -1, 0, 1, -1, -1, -1, -1},256 /* LDImag */{ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, -1, -1, 0, -1, -1, -1, -1},257 258 /* I128 */ { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2, 3, 4, 3, 4, 5, -1, -1, -1, 0, 1, 4, 4},259 /* U128 */ { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, 2, 3, 2, 3, 4, -1, -1, -1, -1, 0, 3, 3},260 261 /* F80 */ { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, -1, -1, 1, -1, -1, -1, -1, -1, 0, 1},262 /* F128 */ { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, -1, -1, -1, -1, -1, -1, 0},263 };264 static_assert(265 sizeof(costMatrix)/sizeof(costMatrix[0][0]) == BasicType::NUMBER_OF_BASIC_TYPES*BasicType::NUMBER_OF_BASIC_TYPES,266 "Each basic type kind should have a corresponding row in the cost matrix"267 );268 #endif269 182 270 183 // GENERATED START, DO NOT EDIT 184 // GENERATED BY BasicTypes-gen.cc 271 185 /* EXTENDED INTEGRAL RANK HIERARCHY (root to leaves) 272 186 _Bool … … 293 207 294 208 // GENERATED START, DO NOT EDIT 209 // GENERATED BY BasicTypes-gen.cc 295 210 static const int costMatrix[BasicType::NUMBER_OF_BASIC_TYPES][BasicType::NUMBER_OF_BASIC_TYPES] = { // path length from root to node 296 211 /* B C SC UC SI SUI I UI LI LUI LLI LLUI IB UIB _FH _FH _F _FC F FC _FX _FXC FD _FDC D DC F80X _FDXC F80 _FB _FLDC FB LD LDC _FBX _FLDXC */ … … 339 254 340 255 // GENERATED START, DO NOT EDIT 256 // GENERATED BY BasicTypes-gen.cc 341 257 static const int signMatrix[BasicType::NUMBER_OF_BASIC_TYPES][BasicType::NUMBER_OF_BASIC_TYPES] = { // number of sign changes in safe conversion 342 258 /* B C SC UC SI SUI I UI LI LUI LLI LLUI IB UIB _FH _FH _F _FC F FC _FX _FXC FD _FDC D DC F80X _FDXC F80 _FB _FLDC FB LD LDC _FBX _FLDXC */
Note: See TracChangeset
for help on using the changeset viewer.