Changeset af746cc for src/GenPoly


Ignore:
Timestamp:
Apr 15, 2024, 12:03:53 PM (2 months ago)
Author:
JiadaL <j82liang@…>
Branches:
master
Children:
dc58e5d
Parents:
d9bad51
Message:

Reimplement the resolution of Enum instance type

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/GenPoly/Lvalue.cpp

    rd9bad51 raf746cc  
    133133                        return func->linkage == ast::Linkage::Intrinsic
    134134                                && lvalueFunctions.count( func->name );
    135                 }
    136         }
    137         return false;
    138 }
    139 
    140 bool isGeneratedInstrinct( ast::Expr const * expr ) {
    141         if ( auto app = dynamic_cast<ast::ApplicationExpr const *>( expr ) ) {
    142                 if ( app->args.size() == 2 && ast::getFunction( app )->name == "?[?]" ) {
    143                         auto param_1 = dynamic_cast<ast::VariableExpr const *>(app->args.front().get());
    144                         if ( param_1 ) {
    145                                 auto param_1_as_obj = param_1->var.as<ast::ObjectDecl>();
    146                                 return ( param_1_as_obj->name.find( "values_") != std::string::npos
    147                                         ||  param_1_as_obj->name.find( "labels_" ) != std::string::npos );
    148                         }
    149135                }
    150136        }
     
    176162                ast::ApplicationExpr const * expr ) {
    177163
    178         if ( skip == SkipInProgress || !isIntrinsicReference( expr ) || isGeneratedInstrinct( expr ) ) {
     164        if ( skip == SkipInProgress || !isIntrinsicReference( expr ) ) {
    179165                return expr;
    180166        }
Note: See TracChangeset for help on using the changeset viewer.