Changeset 8a9a3ab for src/ResolvExpr/CurrentObject.cc
- Timestamp:
- Sep 1, 2023, 3:54:42 PM (2 years ago)
- Branches:
- master
- Children:
- 4b30318b
- Parents:
- 4269d1b (diff), 4c0fa03 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/CurrentObject.cc
r4269d1b r8a9a3ab 1045 1045 PRINT( std::cerr << "____untyped: " << expr << std::endl; ) 1046 1046 auto dit = desigAlts.begin(); 1047 if ( auto nexpr = dynamic_cast< const NameExpr * >( expr ) ) { 1048 1049 1050 1051 DesignatorChain & d = *dit;1047 1048 for ( const Type * t : curTypes ) { 1049 assert( dit != desigAlts.end() ); 1050 DesignatorChain & d = *dit; 1051 if ( auto nexpr = dynamic_cast< const NameExpr *>( expr ) ) { 1052 1052 PRINT( std::cerr << "____actual: " << t << std::endl; ) 1053 1053 if ( auto refType = dynamic_cast< const BaseInstType * >( t ) ) { … … 1062 1062 } 1063 1063 } 1064 } else if ( auto at = dynamic_cast< const ArrayType * >( t ) ) { 1065 auto nexpr = dynamic_cast< const NameExpr *>( expr ); 1066 auto res = eval( nexpr ); 1067 for ( const Decl * mem : refType->lookup( nexpr->name ) ) { 1068 if ( auto field = dynamic_cast< const ObjectDecl * >( mem ) ) { 1069 DesignatorChain d2 = d; 1070 d2.emplace_back( new VariableExpr{ expr->location, field } ); 1071 newDesigAlts.emplace_back( std::move( d2 ) ); 1072 // newTypes.emplace_back( field->type ); 1073 newTypes.emplace_back( at->base ); 1074 } 1075 } 1076 1077 // d.emplace_back( expr ); 1078 // newDesigAlts.emplace_back( d ); 1079 // newTypes.emplace_back( at->base ); 1064 1080 } 1065 1081 1066 1082 ++dit; 1067 } 1068 } else { 1069 for ( const Type * t : curTypes ) { 1070 assert( dit != desigAlts.end() ); 1071 1072 DesignatorChain & d = *dit; 1083 } else { 1073 1084 if ( auto at = dynamic_cast< const ArrayType * >( t ) ) { 1074 1085 PRINT( std::cerr << "____alt: " << at->get_base() << std::endl; )
Note:
See TracChangeset
for help on using the changeset viewer.