Changeset a3432c in git for Singular/subexpr.cc


Ignore:
Timestamp:
Sep 24, 1998, 2:09:26 PM (25 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', '8e0ad00ce244dfd0756200662572aef8402f13d5')
Children:
2386d98357886538fbc1e8f5e3e458fcb811ff1f
Parents:
56c52a7879fbc6de62cefba1da86b2edf2aadd4c
Message:
minor optimizations


git-svn-id: file:///usr/local/Singular/svn/trunk@2519 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/subexpr.cc

    r56c52a7 ra3432c  
    9494    if ((store!=NULL)&&(store!=this))
    9595      store->CleanUp();
    96    
     96
    9797    switch (t /*=Typ()*/)
    9898      {
     
    128128        case RESOLUTION_CMD:
    129129          syPrint((syStrategy)d);
    130           break; 
     130          break;
    131131        case STRING_CMD:
    132132          ::Print("%-*.*s%s",spaces,spaces," ",(char *)d);
     
    138138         {
    139139           procinfov pi=(procinfov)d;
    140            ::Print("%-*.*s// libname  : %s\n",spaces,spaces," ",
    141                    piProcinfo(pi, "libname"));
    142            ::Print("%-*.*s// procname : %s\n",spaces,spaces," ",
    143                    piProcinfo(pi, "procname"));
    144            ::Print("%-*.*s// type     : %s",spaces,spaces," ",
    145                    piProcinfo(pi, "type"));
    146            //      ::Print("%-*.*s// ref      : %s",spaces,spaces," ",
    147            //   piProcinfo(pi, "ref"));
    148            break;
     140           ::Print("%-*.*s// libname  : %s\n",spaces,spaces," ",
     141                   piProcinfo(pi, "libname"));
     142           ::Print("%-*.*s// procname : %s\n",spaces,spaces," ",
     143                   piProcinfo(pi, "procname"));
     144           ::Print("%-*.*s// type     : %s",spaces,spaces," ",
     145                   piProcinfo(pi, "type"));
     146           //           ::Print("%-*.*s// ref      : %s",spaces,spaces," ",
     147           //   piProcinfo(pi, "ref"));
     148           break;
    149149         }
    150150       case POINTER_CMD:
     
    213213  {
    214214    PrintLn();
    215   } 
     215  }
    216216#ifdef SIQ
    217217  if (rtyp!=COMMAND)
     
    278278        break;
    279279      case PROC_CMD:
    280         piKill((procinfov)data);
    281         break;
     280        piKill((procinfov)data);
     281        break;
    282282      case LINK_CMD:
    283283        slKill((si_link)data);
     
    313313#ifdef HAVE_RTIMER
    314314        case VRTIMER:
    315 #endif         
     315#endif
    316316      case VOICE:
    317317      case VMAXDEG:
     
    327327      default:
    328328        ::Print("CleanUp: unknown type %d\n",rtyp);  /* DEBUG */
    329 #endif         
     329#endif
    330330    } /* end switch: (rtyp) */
    331331    data=NULL;
     
    349349#ifdef HAVE_RTIMER
    350350      case VRTIMER:
    351 #endif         
     351#endif
    352352      case VOICE:
    353353      case VMAXDEG:
     
    515515          r->ref++;
    516516          data=d;
    517         } 
     517        }
    518518        else
    519519        {
    520520          WerrorS("invalid ring description");
    521         } 
     521        }
    522522        break;
    523523      }
     
    546546void * sleftv::CopyD(int t)
    547547{
    548   if (iiCheckRing(t))
    549      return NULL;
    550548  if ((rtyp!=IDHDL)&&(e==NULL))
    551549  {
     550    if (iiCheckRing(t)) return NULL;
    552551    void *x=data;
    553552    if (rtyp==VNOETHER) x=(void *)pCopy(ppNoether);
     
    559558    return x;
    560559  }
    561   void *d=Data();
    562   if (!errorreported) return slInternalCopy(this,t,d,e);
     560  void *d=Data(); // will also do a iiCheckRing
     561  if ((!errorreported) && (d!=NULL)) return slInternalCopy(this,t,d,e);
    563562  return NULL;
    564563}
     
    581580  if ((a!=NULL) && (*a!=NULL))
    582581    return (*a)->Copy();
    583   return NULL; 
     582  return NULL;
    584583}
    585584
     
    664663      {
    665664        return rString((ring)d);
    666       } 
     665      }
    667666      default:
    668667        #ifdef TEST
     
    694693#ifdef HAVE_RTIMER
    695694      case VRTIMER:
    696 #endif         
     695#endif
    697696      case VOICE:
    698697      case VMAXDEG:
     
    702701        return INT_CMD;
    703702      case LIB_CMD:
    704         return STRING_CMD; 
     703        return STRING_CMD;
    705704      case VMINPOLY:
    706705        return NUMBER_CMD;
     
    791790void * sleftv::Data()
    792791{
    793   if (iiCheckRing(rtyp))
     792  if (rtyp!=IDHDL && iiCheckRing(rtyp))
    794793     return NULL;
    795794  if (e==NULL)
     
    823822                         if(h==NULL) return (void *)sNoName;
    824823                         return IDSTRING(h);
    825                        } 
     824                       }
    826825      case IDHDL:
    827826        return IDDATA((idhdl)data);
Note: See TracChangeset for help on using the changeset viewer.