MCPcopy Create free account
hub / github.com/Singular/Singular / killlocals

Function killlocals

Singular/ipshell.cc:386–423  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

384 return changed;
385}
386void killlocals(int v)
387{
388 BOOLEAN changed=FALSE;
389 idhdl sh=currRingHdl;
390 ring cr=currRing;
391 if (sh!=NULL) changed=((IDLEV(sh)<v) || (IDRING(sh)->ref>0));
392 //if (changed) Print("currRing=%s(%x), lev=%d,ref=%d\n",IDID(sh),IDRING(sh),IDLEV(sh),IDRING(sh)->ref);
393
394 killlocals_rec(&(basePack->idroot),v,currRing);
395
396 if (iiRETURNEXPR_len > myynest)
397 {
398 int t=iiRETURNEXPR.Typ();
399 if (/*iiRETURNEXPR.Typ()*/ t==RING_CMD)
400 {
401 leftv h=&iiRETURNEXPR;
402 if (((ring)h->data)->idroot!=NULL)
403 killlocals0(v,&(((ring)h->data)->idroot),(ring)h->data);
404 }
405 else if (/*iiRETURNEXPR.Typ()*/ t==LIST_CMD)
406 {
407 leftv h=&iiRETURNEXPR;
408 changed |=killlocals_list(v,(lists)h->data);
409 }
410 }
411 if (changed)
412 {
413 currRingHdl=rFindHdl(cr,NULL);
414 if (currRingHdl==NULL)
415 currRing=NULL;
416 else if(cr!=currRing)
417 rChangeCurrRing(cr);
418 }
419
420 if (myynest<=1) iiNoKeepRing=TRUE;
421 //Print("end killlocals >= %d\n",v);
422 //listall();
423}
424
425void list_cmd(int typ, const char* what, const char *prefix,BOOLEAN iterate, BOOLEAN fullname)
426{

Callers 4

jjRESTARTFunction · 0.85
iiPStartFunction · 0.85
iiEStartFunction · 0.85
iiBranchToFunction · 0.85

Calls 6

killlocals_recFunction · 0.85
killlocals0Function · 0.85
killlocals_listFunction · 0.85
rFindHdlFunction · 0.85
rChangeCurrRingFunction · 0.85
TypMethod · 0.45

Tested by

no test coverage detected