Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/CodeGen/CodeGenerator.cpp

    r7959e56 rf070ea8  
    130130        // TODO: Which means the ast::Pass is just providing a default no visit?
    131131        visit_children = false;
    132         changeState_ArgToIntrinsic(false);
    133132}
    134133
     
    467466                if ( var->var->linkage == ast::Linkage::Intrinsic &&
    468467                                ( opInfo = operatorLookup( var->var->name ) ) ) {
    469                         changeState_ArgToIntrinsic(true);
    470468                        auto arg = expr->args.begin();
    471469                        switch ( opInfo->type ) {
     
    560558        if ( auto name = expr->func.as<ast::NameExpr>() ) {
    561559                if ( const OperatorInfo * opInfo = operatorLookup( name->name ) ) {
    562                         changeState_ArgToIntrinsic(true);
    563560                        auto arg = expr->args.begin();
    564561                        switch ( opInfo->type ) {
     
    746743        extension( expr );
    747744        const OperatorInfo * opInfo;
    748         if ( visitingArgToIntrinsic
    749                         && options.genC
    750                         && dynamic_cast<ast::ZeroType const *>( expr->var->get_type() ) ) {
    751                 // int * p; p = 0;               ==>  ?=?( p, (zero_t){} );  ==>  p = 0;
    752                 // void f( zero_t z ) { g(z); }  ==>  g(z);                  ==>  g(z);
    753                 // (we are at the last '==>')
    754                 output << "0";
    755         } else if ( expr->var->linkage == ast::Linkage::Intrinsic
     745        if ( expr->var->linkage == ast::Linkage::Intrinsic
    756746                        && ( opInfo = operatorLookup( expr->var->name ) )
    757747                        && opInfo->type == OT_CONSTANT ) {
Note: See TracChangeset for help on using the changeset viewer.