You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if(ISSPARSE(AT(e))){ep=PAV(e); ASSERT(all1(eq(SPA(ep,e),SPA(ep,x))),EVSPARSE); q=SPA(ep,e);}// 'sparse' sparse element comes from boxing. If all elements identical, replace with sparse atom
// we also have to isolate the user's a/w/m so that we do not disturb any flags or usecounts. We build headers for the nouns
254
254
// The headers are like virtual blocks but they don't increment the usecount of the backer. That means that if further execution frees the backer
255
255
// the header is left pointing to garbage. To avoid trouble we zap the headers here and free them by hand after we call eformat
256
+
// Since we can't gah() for sparse blocks, we abort eformatting if we encounter one.
256
257
Aawm=0; // place to build the arg list for eformat
257
-
if(m){Am1; rnk=mtv; if((m1=m1ah=gahzap(jt,AR(m),m))==0)goto noeformat; MCISH(AS(m1),AS(m),AR(m)) if((awm=box(m1))==0)goto noeformat; // if m exists, make it the last arg, and set rank to ''
258
+
if(m&&!ISSPARSE(AT(m))){Am1; rnk=mtv; if((m1=m1ah=gahzap(jt,AR(m),m))==0)goto noeformat; MCISH(AS(m1),AS(m),AR(m)) if((awm=box(m1))==0)goto noeformat; // if m exists, make it the last arg, and set rank to ''
258
259
}elseif(e==EVASSEMBLY){
259
260
// assembly errors are special. They require an info vector, which has been stored in jt->etxinfo. We pass this vector as m
Copy file name to clipboardExpand all lines: jsrc/j.h
+5-1Lines changed: 5 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -2292,7 +2292,11 @@ if(unlikely(!_mm256_testz_pd(sgnbit,mantis0))){ /* if mantissa exactly 0, must
2292
2292
C _e=jt->emsgstate; jt->emsgstate|=EMSGSTATENOTEXT|EMSGSTATENOLINE|EMSGSTATENOEFORMAT|EMSGSTATETRAPPING; \
2293
2293
stmt jt->uflags.trace=_d|(jt->uflags.trace&~TRACEDB); jt->emsgstate=_e;} // execute stmt with debug/eformat turned off; restore at end. Sets jt->jerr if error, and should be used when calling possible user code
#defineWITHEFORMATDEFERRED(stmt) {WITHDEBUGOFF(stmt) if(unlikely(jt->jerr!=0)){UC _d=jt->jerr; RESETERR ASSERT(0,_d)}} // execute stmt with debug/eformat turned off; at end, if there is an error, re-signal it
2295
+
// obsolete #define WITHEFORMATDEFERRED(stmt) {WITHDEBUGOFF(stmt) if(unlikely(jt->jerr!=0)&&likely(jt->jerr!=0)){UC _d=jt->jerr; RESETERR ASSERT(0,_d)}} // execute stmt with debug/eformat turned off; at end, if there is an error, re-signal it
C _e=jt->emsgstate; jt->emsgstate|=EMSGSTATENOTEXT|EMSGSTATENOLINE|EMSGSTATENOEFORMAT|EMSGSTATETRAPPING; \
2298
+
stmt jt->uflags.trace=_d|(jt->uflags.trace&~TRACEDB); _d=jt->emsgstate; jt->emsgstate=_e; if(unlikely(jt->jerr!=0)&&likely(_d&EMSGSTATENOTEXT)){_d=jt->jerr; RESETERR ASSERT(0,_d)}} // WITHDEBUGOFF, but resignal any error so as to use caller's eformat.
2299
+
// Exception: in EMSGSTATENOTEXT was turned off (and not restored), we figure that user used 13!:8, which we don't eformat, so we don't resignal it
2296
2300
// If the abandoned value we want to ra is likely the last thing on the tstack, look to see if it is. If so, just back up the tstack (if that backs over to the chain field, that will never match
2297
2301
// the ZAP pointer and we will not modify tpushnext). Otherwise ZAP the block
2298
2302
// It would be a disaster to back the tstack to in front of a valid 'old' pointer held somewhere. The subsequent tpop would never end. The case cannot occur, because we set 'old'
if(JT(jt,peekdata))addbuf(jt,z); // add to allocated list
1444
1444
#endif
1445
1445
Rz;
@@ -1628,7 +1628,7 @@ printf("%p-\n",w);
1628
1628
#ifPYXES
1629
1629
if(unlikely(w->origin!=(US)THREADID1(jt))){jtrepat1(jt,w,allocsize); R;} // if block was allocated from a different thread, pass it back to that thread where it can be garbage collected
1630
1630
#endif
1631
-
#if ((MEMAUDIT&5)==5) &&SY_64
1631
+
#if0&&((MEMAUDIT&5)==5) &&SY_64// obsolete
1632
1632
if(JT(jt,peekdata))rembuf(jt,w); // remove from allocated list
1633
1633
#endif
1634
1634
AFCHAIN(w)=jt->mempool[blockx]; // append free list to the new addition...
@@ -1640,7 +1640,7 @@ if(JT(jt,peekdata))rembuf(jt,w); // remove from allocated list
1640
1640
}
1641
1641
}elseif(unlikely(blockx==FHRHBINISGMP)){jtmfgmp(jt,w); // if GMP allocation, free it through GMP
1642
1642
}else{ // buffer allocated from malloc
1643
-
#if ((MEMAUDIT&5)==5) &&SY_64
1643
+
#if0&&((MEMAUDIT&5)==5) &&SY_64// obsolete
1644
1644
if(JT(jt,peekdata))rembuf(jt,w); // remove from allocated list
0 commit comments