Changeset ba01b14 for src/Parser/TypeData.cc
- Timestamp:
- Feb 11, 2019, 6:46:56 PM (5 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:
- cdcddfe1
- Parents:
- 0e66857
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/TypeData.cc
r0e66857 rba01b14 10 10 // Created On : Sat May 16 15:12:51 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Nov 2 07:54:26 201813 // Update Count : 6 2412 // Last Modified On : Fri Feb 8 09:36:26 2019 13 // Update Count : 645 14 14 // 15 15 … … 629 629 } // if 630 630 631 ret = BasicType:: Bool;631 ret = BasicType::_Bool; 632 632 break; 633 633 … … 666 666 667 667 case DeclarationNode::Float: 668 case DeclarationNode::Double: 669 case DeclarationNode::LongDouble: // not set until below 668 670 case DeclarationNode::Float80: 669 671 case DeclarationNode::Float128: 670 case DeclarationNode::Double: 671 case DeclarationNode::LongDouble: // not set until below 672 static BasicType::Kind floattype[3][3] = { 673 { BasicType::FloatComplex, BasicType::DoubleComplex, BasicType::LongDoubleComplex }, 674 { BasicType::FloatImaginary, BasicType::DoubleImaginary, BasicType::LongDoubleImaginary }, 675 { BasicType::Float, BasicType::Double, BasicType::LongDouble }, 672 case DeclarationNode::_Float16: 673 case DeclarationNode::_Float32: 674 case DeclarationNode::_Float32x: 675 case DeclarationNode::_Float64: 676 case DeclarationNode::_Float64x: 677 case DeclarationNode::_Float128: 678 case DeclarationNode::_Float128x: 679 static BasicType::Kind floattype[2][12] = { 680 { BasicType::FloatComplex, BasicType::DoubleComplex, BasicType::LongDoubleComplex, (BasicType::Kind)-1, (BasicType::Kind)-1, BasicType::_Float16Complex, BasicType::_Float32Complex, BasicType::_Float32xComplex, BasicType::_Float64Complex, BasicType::_Float64xComplex, BasicType::_Float128Complex, BasicType::_Float128xComplex, }, 681 { BasicType::Float, BasicType::Double, BasicType::LongDouble, BasicType::__float80, BasicType::__float128, BasicType::_Float16, BasicType::_Float32, BasicType::_Float32x, BasicType::_Float64, BasicType::_Float64x, BasicType::_Float128, BasicType::_Float128x, }, 676 682 }; 677 683 … … 686 692 genTSError( DeclarationNode::lengthNames[ td->length ], td->basictype ); 687 693 } // if 694 if ( td->complextype == DeclarationNode::Imaginary ) { 695 genTSError( DeclarationNode::complexTypeNames[ td->complextype ], td->basictype ); 696 } // if 697 if ( (td->basictype == DeclarationNode::Float80 || td->basictype == DeclarationNode::Float128) && td->complextype == DeclarationNode::Complex ) { // gcc unsupported 698 genTSError( DeclarationNode::complexTypeNames[ td->complextype ], td->basictype ); 699 } // if 688 700 if ( td->length == DeclarationNode::Long ) { 689 701 const_cast<TypeData *>(td)->basictype = DeclarationNode::LongDouble; 690 702 } // if 691 703 692 if ( td->basictype == DeclarationNode::Float80 || td->basictype == DeclarationNode::Float128 ) {693 // if ( td->complextype != DeclarationNode::NoComplexType ) {694 // genTSError( DeclarationNode::complexTypeNames[ td->complextype ], td->basictype );695 // }696 if ( td->basictype == DeclarationNode::Float80 ) ret = BasicType::Float80;697 else ret = BasicType::Float128;698 break;699 }700 701 704 ret = floattype[ td->complextype ][ td->basictype - DeclarationNode::Float ]; 705 //printf( "XXXX %d %d %d %d\n", td->complextype, td->basictype, DeclarationNode::Float, ret ); 702 706 break; 703 707
Note: See TracChangeset
for help on using the changeset viewer.