Changes in src/CodeGen/CodeGenerator.cpp [7959e56:f070ea8]
- File:
-
- 1 edited
-
src/CodeGen/CodeGenerator.cpp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/CodeGen/CodeGenerator.cpp
r7959e56 rf070ea8 130 130 // TODO: Which means the ast::Pass is just providing a default no visit? 131 131 visit_children = false; 132 changeState_ArgToIntrinsic(false);133 132 } 134 133 … … 467 466 if ( var->var->linkage == ast::Linkage::Intrinsic && 468 467 ( opInfo = operatorLookup( var->var->name ) ) ) { 469 changeState_ArgToIntrinsic(true);470 468 auto arg = expr->args.begin(); 471 469 switch ( opInfo->type ) { … … 560 558 if ( auto name = expr->func.as<ast::NameExpr>() ) { 561 559 if ( const OperatorInfo * opInfo = operatorLookup( name->name ) ) { 562 changeState_ArgToIntrinsic(true);563 560 auto arg = expr->args.begin(); 564 561 switch ( opInfo->type ) { … … 746 743 extension( expr ); 747 744 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 756 746 && ( opInfo = operatorLookup( expr->var->name ) ) 757 747 && opInfo->type == OT_CONSTANT ) {
Note:
See TracChangeset
for help on using the changeset viewer.