Skip to content

Commit 0a405d9

Browse files
committed
Removing ARGCHK1
1 parent 75b919d commit 0a405d9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+125
-376
lines changed

jsrc/adverbs/a.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ static DF2(swap2){DECLF; F2PREFIP; jtinplace = (J)(intptr_t)((I)jtinplace^((JTIN
1717

1818
// w~, which is either reflexive/passive or evoke
1919
F1(jtswap){A y;C*s;I n;
20-
ARGCHK1(w);
2120
if(VERB&AT(w)){
2221
// reflexive/passive. Create verb that swaps. Most flags do not apply to the derived verb
2322
I flag = FAV(w)->flag&(VIRS2|VJTFLGOK2); flag = (FAV(w)->flag&VASGSAFE)+flag+(flag>>1); // set ASGSAFE, both inplace/irs bits from dyad; ISATOMIC immaterial, since always dyad
@@ -58,7 +57,6 @@ static DF1(jtbasis1){DECLF;A z;D*x;I j;V*v;
5857
}}
5958

6059
F1(jtbdot){A b,h=0;I j=0,n,*v;
61-
ARGCHK1(w);
6260
if(VERB&AT(w))return ADERIV(CBDOT, jtbasis1,0L, 0L,0,0,0);
6361
RZ(w=vi(w));
6462
n=AN(w); v=AV(w);
@@ -137,7 +135,6 @@ static I jtint0(J jt,A w){A x;
137135
}
138136

139137
static DF1(jtmemo1){DECLF;A z;I x,y;
140-
ARGCHK1(w);
141138
x=IMIN; y=int0(w);
142139
if(y==IMIN)return CALL1(f1,w,fs);
143140
return (z=memoget(x,y,self))?z:memoput(x,y,self,CALL1(f1,w,fs));
@@ -156,7 +153,6 @@ static DF2(jtmemo2){DECLF;A z;I x,y;
156153
// 2 boxed list containing results
157154
// All these start life on the tpush stack
158155
F1(jtmemo){PROLOG(300);A h,*hv,q;I m;V*v;
159-
ARGCHK1(w);
160156
ASSERT(VERB&AT(w),EVDOMAIN);
161157
v=FAV(w); FULLHASHSIZE(30,BOXSIZE,1,0,m); // m = # items to allocate
162158
GAT0(h,BOX,3,1); hv=AAV(h);

jsrc/adverbs/af.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,12 @@
77

88

99
F1(jtunname){A x;V*v;
10-
ARGCHK1(w);
1110
v=VAV(w);
1211
if(CTILDE==v->id&&!jt->uflags.us.cx.cx_c.glock&&!(VLOCK&v->flag)){x=v->fgh[0]; if(NAME&AT(x))return symbrd(x);}
1312
RETF(w);
1413
}
1514

1615
static B jtselfq(J jt,A w){A hs,*u;V*v;
17-
ARGCHK1(w);
1816
if(AT(w)&NOUN+NAME)return 0;
1917
v=FAV(w);
2018
switch(v->id){
@@ -32,7 +30,6 @@ static B jtselfq(J jt,A w){A hs,*u;V*v;
3230

3331
// See if there are references to implicit locatives. Return 1 if so, 0 if not
3432
B jthasimploc(J jt,A w){A hs,*u;V*v;
35-
ARGCHK1(w);
3633
if(AT(w)&NOUN+NAME)return 0;
3734
v=FAV(w);
3835
switch(v->id){
@@ -73,7 +70,6 @@ EVERYFS(arofixaself,jtaro,jtfixa,0,VFLAGNONE) // create A block to be used in e
7370
// AM(a) points to the recursion name-list and must be passed to all recursion levels
7471
static A jtfixa(J jt,A a,A w){A f,g,h,wf,x,y,z=w;V*v;fauxblock(fauxself); A aa; fauxINT(aa,fauxself,1,0); AM((A)aa)=AM(a); // place to build recursion parm - make the AK field right, and pass the AM field along
7572
#define REFIXA(a,x) (IAV0(aa)[0]=(aif|(a)), fixa((A)aa,(x)))
76-
ARGCHK1(w);
7773
I ai=IAV(a)[0]; // value of a
7874
I aif=ai&(FIXALOCSONLY|FIXALOCSONLYLOWEST|FIXASTOPATINV); // extract control flags
7975
ai^=aif; // now ai = state without flags
@@ -176,7 +172,6 @@ static A jtfixa(J jt,A a,A w){A f,g,h,wf,x,y,z=w;V*v;fauxblock(fauxself); A aa;
176172

177173
// On internal calls, self is an integer whose value contains flags. Otherwise zeroionei is used
178174
DF1(jtfix){PROLOG(0005);A z;
179-
ARGCHK1(w);
180175
if(LIT&AT(w)){ASSERT(1>=AR(w),EVRANK); RZ(w=nfs(AN(w),CAV(w)));}
181176
// only verbs/noun can get in through the parser, but internally we also vet adv/conj
182177
ASSERT(AT(w)&NAME+VERB+ADV+CONJ,EVDOMAIN);

jsrc/adverbs/ai.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ static F2(jtfong){A f;C c;V*v;
2626
} // [: f g with simplifications: [: ] w -> w; [: (N/[: x y) w -> N/[: x [: y w and y omittrd if ]
2727

2828
static F1(jtinvfork){A f,fi,g,gi,h,k;B b,c;V*v;
29-
ARGCHK1(w);
3029
v=FAV(w); RZ(f=unname(v->fgh[0])); g=v->fgh[1]; RZ(h=unname(v->fgh[2]));
3130
if(CCAP==ID(f))return fong(invrecur(h),invrecur(g));
3231
c=1&&NOUN&AT(f); b=c||consf(f);
@@ -65,7 +64,6 @@ static F2(jtdiag){I d,m,p,r,t,*v;
6564
}}
6665

6766
static F1(jtbminv){A*wv,x,z=w;I i,j,m,r,*s,t=0,*u,**v,*y,wn,wr,*ws;
68-
ARGCHK1(w);
6967
ASSERT(0,EVNONCE);
7068
ASSERT(BOX&AT(w),EVDOMAIN);
7169
wn=AN(w); wr=AR(w); ws=AS(w); wv=AAV(w);
@@ -97,7 +95,6 @@ static F1(jtbminv){A*wv,x,z=w;I i,j,m,r,*s,t=0,*u,**v,*y,wn,wr,*ws;
9795

9896

9997
static F1(jtinvamp){A f,ff,g,h,x,y;B nf,ng;C c,d,*yv;I n;V*u,*v;
100-
ARGCHK1(w);
10198
v=FAV(w);
10299
f=v->fgh[0]; nf=!!(NOUN&AT(f));
103100
g=v->fgh[1]; ng=!!(NOUN&AT(g));
@@ -236,7 +233,7 @@ static const C simpleinv[128] = {
236233
// Return inverse of monad w. recur is a recursion indicator, always forced to 0 for the initial call, and
237234
// set to 1 here for recursive calls
238235
A jtinv(J jt, A w, I recur){A f,ff,g;B b,nf,ng,vf,vg;C id;I p,q;V*v;
239-
ARGCHK1(w); STACKCHKOFL // make sure we don't have a recursion loop through inv
236+
STACKCHKOFL // make sure we don't have a recursion loop through inv
240237
ASSERT(VERB&AT(w),EVDOMAIN);
241238
id=ID(w); v=FAV(w); // id=pseudochar for w, v->verb info
242239
#define simpleinvvalues(w) CCM(w,CDIV)+CCM(w,CPLUS)+CCM(w,CMINUS)+CCM(w,CLEFT)+CCM(w,CRIGHT)+CCM(w,CREV)+CCM(w,CCANT)+CCM(w,CPOLY)+ \
@@ -322,7 +319,6 @@ A jtinv(J jt, A w, I recur){A f,ff,g;B b,nf,ng,vf,vg;C id;I p,q;V*v;
322319
}
323320

324321
static F1(jtneutral){A x,y;B b;V*v;
325-
ARGCHK1(w);
326322
v=FAV(w);
327323
ASSERT(!v->lrr,EVDOMAIN);
328324
RZ(y=v2(0L,1L));

jsrc/adverbs/am.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ static A jtmerge1(J jt,A w,A ind){A z;B*b;C*wc,*zc;D*wd,*zd;I c,it,j,k,m,r,*s,t,
5757

5858
// Handle the case statement abc =: pqr} x,...,y,:z, with in-place operation if pqr is Boolean and abc appears on the right
5959
F1(jtcasev){A b,*u,*v,w1,x,y,z;B*bv,p,q;I*aa,c,*iv,j,m,n,r,*s,t;
60-
ARGCHK1(w);
6160
RZ(w1=ca(w)); u=AAV(w1); // make a copy of the input, point to its value
6261
// the input is a boxed list. The last 3 values are (name pqr);(index in which abc appeared in the x,y,... or -1 if it didn't);(original sentence queue)
6362
p=1; m=AN(w)-3; v=AAV(w); c=i0(v[m+1]); // get # items in list, and index of the matching one
@@ -190,7 +189,6 @@ static A jtmerge2(J jt,A a,A w,A ind,I cellframelen){F2PREFIP;A z;I t;
190189
// speed to validate the input, and pdt works well for a large number of short vectors - in particular it avoids the carried dependency between axes that
191190
// Horner's Rule creates. This version keeps things in registers and has less setup time; and it is much better if there are negative indexes.
192191
A jtcelloffset(J jt,AD * RESTRICT w,AD * RESTRICT ind){A z;
193-
ARGCHK1(w);
194192
if(AR(ind)<2){RZ(z=pind(AS(w)[0],ind)); // (m}only) treat a list as a list of independent indexes. pind handles that case quickly and possibly in-place.
195193
}else if(AS(ind)[AR(ind)-1]==1){RZ(z=pind(AS(w)[0],IRS1(ind,0L,2L,jtravel,z))); // if rows are 1 long, pind handles that too - remove the last axis
196194
}else{
@@ -389,7 +387,6 @@ B jtgerexact(J jt, A w){A*wv;
389387

390388
// u} handling. This is not inplaceable but the derived verb is
391389
F1(jtamend){
392-
ARGCHK1(w);
393390
if(VERB&AT(w)) return ADERIV(CRBRACE,mergv1,amccv2,VASGSAFE|VJTFLGOK2, RMAX,RMAX,RMAX); // verb}
394391
else if(ger(w))return gadv(w,CRBRACE); // v0`v1`v2}
395392
else return ADERIV(CRBRACE,mergn1,jtamendn2,VASGSAFE|VJTFLGOK2, RMAX,RMAX,RMAX); // m}

jsrc/adverbs/ao.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
// This is the derived verb for f/. y
99
static DF1(jtoblique){A x,y,z;I m,n,r;D rkblk[16];
10-
F1PREFIP;ARGCHK1(w);
10+
F1PREFIP;
1111
r=AR(w); // r = rank of w
1212
// create y= ,/ w - the _2-cells of w arranged in a list (virtual block)
1313
RZ(y=redcat(w,self)); if(1>=r){m=AN(w); n=1;}else{m=AS(w)[0]; n=AS(w)[1];}
@@ -36,7 +36,6 @@ static DF1(jtoblique){A x,y,z;I m,n,r;D rkblk[16];
3636

3737
// Derived verb for f//. y for atomic f
3838
static DF1(jtobqfslash){A y,z;B b=0,p;C er,id,*wv;I c,d,k,m,m1,mn,n,n1,r,*s,wt;
39-
ARGCHK1(w);
4039
r=AR(w); s=AS(w); wt=AT(w); wv=CAV(w);
4140
if((-AN(w)&(1-r)&-(DENSE&wt))>=0)return oblique(w,self); // revert to default if rank<2, empty, or sparse. This implies m/n below are non0
4241
y=FAV(self)->fgh[0]; y=FAV(y)->fgh[0]; id=FAV(y)->id;
@@ -637,7 +636,6 @@ const UI4 shortrange[3][4] = {{0,65536,65536,0}, {0,2,258,0}, {0,256,65536,0}};
637636
static DF2(jtkeytally);
638637

639638
static F1(jtkeytallysp){PROLOG(0015);A b,e,q,x,y,z;I c,d,j,k,*u,*v;P*p;
640-
ARGCHK1(w);
641639
RZ(q=indexof(w,w));
642640
p=PAV(q);
643641
x=SPA(p,x); u=AV(x); c=AN(x);
@@ -778,7 +776,6 @@ DF2(jtkeyheadtally){F2PREFIP;PROLOG(0017);A f,q,x,y,z;I b;I at,*av,k,n,r,*qv,*u,
778776
F1(jtsldot){A h=0;AF f1=jtoblique,f2;C c,d,e;I flag=VJTFLGOK1|VJTFLGOK2;V*v;
779777
// NOTE: u/. is processed using the code for u;.1 and passing the self for /. into the cut verb. So, the self produced
780778
// by /. and ;.1 must be the same as far as flags etc.
781-
ARGCHK1(w);
782779
if(NOUN&AT(w)){flag|=VGERL; RZ(h=fxeachv(1L,w));}
783780
v=VAV(w);
784781
switch(ID(w)){ // no default for f2: every path must set it

jsrc/adverbs/ap.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -305,13 +305,11 @@ PREFIXPFX(bw1111pfxI, UI,UI, BW1111, bw1111II,return EVOK;)
305305
// This old prefix support is needed for sparse matrices
306306

307307
static DF1(jtprefix){DECLF;I r;
308-
ARGCHK1(w);
309308
r = (RANKT)jt->ranks; RESETRANK; if(r<AR(w)){return rank1ex(w,self,r,jtprefix);}
310309
return eachl(apv(SETIC(w,r),1L,1L),w,atop(fs,ds(CTAKE)));
311310
} /* f\"r w for general f */
312311

313312
static DF1(jtgprefix){A h,*hv,z,*zv;I m,n,r;
314-
ARGCHK1(w);
315313
ASSERT(DENSE&AT(w),EVNONCE);
316314
r = (RANKT)jt->ranks; RESETRANK; if(r<AR(w)){return rank1ex(w,self,r,jtgprefix);}
317315
SETIC(w,n);
@@ -340,7 +338,6 @@ static F2(jtseg){A z;I c,k,m,n,*u,zn;
340338
// m is the infix length (x), w is the array (y)
341339
// Result is A for an nx2 table of (starting item#,length) for each infix
342340
static A jtifxi(J jt,I m,A w){A z;I d,j,k,n,p,*x;
343-
ARGCHK1(w);
344341
// p=|m, n=#items of w, d=#applications of u (depending on overlapping/nonoverlapping)
345342
p=ABS(m); SETIC(w,n);
346343
if(m>=0){d=MAX(0,1+n-m);}else{d=1+(n-1)/p; d=(n==0)?n:d;}
@@ -408,7 +405,6 @@ static DF2(jtginfix){A h,*hv,x,z,*zv;I d,m,n;
408405
static DF2(jtinfixprefix2){F2PREFIP;PROLOG(00202);A fs;I cger[128/SZI];
409406
I wt;
410407

411-
ARGCHK1(w);
412408
PREF2IP(jtinfixprefix2); // handle rank loop if needed
413409
wt=AT(w);
414410
if(unlikely((wt&SPARSE)!=0)){
@@ -592,7 +588,7 @@ static DF1(jtinfixprefix1){F1PREFIP;
592588

593589
// f/\"r y w is y, fs is in self
594590
static DF1(jtpscan){A z;I f,n,r,t,wn,wr,*ws,wt;
595-
F1PREFIP;ARGCHK1(w);
591+
F1PREFIP;
596592
wt=AT(w); // get type of w
597593
if(unlikely((SPARSE&wt)!=0))return scansp(w,self,jtpscan); // if sparse, go do it separately
598594
// wn = #atoms in w, wr=rank of w, r=effective rank, f=length of frame, ws->shape of w
@@ -841,7 +837,6 @@ static DF1(jtiota1){I j; return apv(SETIC(w,j),1L,1L);}
841837

842838
F1(jtbslash){A f;AF f1=jtinfixprefix1,f2=jtinfixprefix2;V*v;I flag=FAV(ds(CBSLASH))->flag;
843839
;
844-
ARGCHK1(w);
845840
if(NOUN&AT(w))return fdef(0,CBSLASH,VERB, jtinfixprefix1,jtinfixprefix2, w,0L,fxeachv(1L,w), VGERL|flag, RMAX,0L,RMAX);
846841
v=FAV(w); // v is the u in u\ y
847842
switch(v->id){
@@ -864,4 +859,4 @@ F1(jtbslash){A f;AF f1=jtinfixprefix1,f2=jtinfixprefix2;V*v;I flag=FAV(ds(CBSLAS
864859
return f;
865860
}
866861

867-
A jtascan(J jt,C c,A w){ARGCHK1(w); A z; return df1(z,w,bslash(slash(ds(c))));}
862+
A jtascan(J jt,C c,A w){A z; return df1(z,w,bslash(slash(ds(c))));}

jsrc/adverbs/ar.c

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,6 @@ static DF1(jtred0){DECLF;A x,z;I f,r,wr,*s;
200200

201201
// general reduce. We inplace the results into the next iteration. This routine cannot inplace its inputs.
202202
static DF1(jtredg){F1PREFIP;PROLOG(0020);DECLF;AD * RESTRICT a;I i,n,r,wr;
203-
ARGCHK1(w);
204203
ASSERT(DENSE&AT(w),EVNONCE);
205204
// loop over rank
206205
wr=AR(w); r=(RANKT)jt->ranks; r=wr<r?wr:r; RESETRANK;
@@ -271,7 +270,6 @@ static A jtredsp1a(J jt,C id,A z,A e,I n,I r,I*s){A t;B b,p=0;D d=1;
271270
}} /* f/w on sparse vector w, post processing */
272271

273272
static A jtredsp1(J jt,A w,A self,C id,VARPSF ado,I cv,I f,I r,I zt){A e,x,z;I m,n;P*wp;
274-
ARGCHK1(w);
275273
wp=PAV(w); e=SPA(wp,e); x=SPA(wp,x); n=AN(x); m=*AS(w);
276274
GA(z,zt,1,0,0);
277275
if(n){I rc=((AHDRRFN*)ado)(1L,n,1L,AV(x),AV(z),jt); if(255&rc)jsignal(rc); RE(0); if(m==n)return z;}
@@ -280,7 +278,6 @@ static A jtredsp1(J jt,A w,A self,C id,VARPSF ado,I cv,I f,I r,I zt){A e,x,z;I m
280278

281279
DF1(jtredravel){A f,x,z;I n;P*wp;
282280
F1PREFIP;
283-
ARGCHK1(w);
284281
f=FAV(self)->fgh[0]; // f/
285282
if(likely(!(SPARSE&AT(w))))return reduce(jtravel(jtinplace,w),f);
286283
// The rest is sparse
@@ -296,7 +293,6 @@ DF1(jtredravel){A f,x,z;I n;P*wp;
296293
} /* f/@, w */
297294

298295
static A jtredspd(J jt,A w,A self,C id,VARPSF ado,I cv,I f,I r,I zt){A a,e,x,z,zx;I c,m,n,*s,t,*v,wr,*ws,xf,xr;P*wp,*zp;
299-
ARGCHK1(w);
300296
ASSERT(strchr(fca,id),EVNONCE);
301297
wp=PAV(w); a=SPA(wp,a); e=SPA(wp,e); x=SPA(wp,x); s=AS(x);
302298
xr=r; v=AV(a); DO(AN(a), if(f<v[i])--xr;); xf=AR(x)-xr;
@@ -367,7 +363,6 @@ static B jtredspse(J jt,C id,I wm,I xt,A e,A zx,A sn,A*ze,A*zzx){A b;B nz;I t,zt
367363

368364
static A jtredsps(J jt,A w,A self,C id,VARPSF ado,I cv,I f,I r,I zt){A a,a1,e,sn,x,x1=0,y,z,zx,zy;B*pv;
369365
C*xv,*xxv,*zv;I*dv,i,m,n,*qv,*sv,*v,wr,xk,xt,wm,*ws,xc,yc,yr,*yu,*yv,zk;P*wp,*zp;
370-
ARGCHK1(w);
371366
ASSERT(strchr(fca,id),EVNONCE);
372367
wr=AR(w); ws=AS(w); wm=ws[f];
373368
wp=PAV(w); a=SPA(wp,a); e=SPA(wp,e);
@@ -398,7 +393,7 @@ static A jtredsps(J jt,A w,A self,C id,VARPSF ado,I cv,I f,I r,I zt){A a,a1,e,sn
398393
} /* f/"r w for sparse w, rank > 1, sparse axis */
399394

400395
static DF1(jtreducesp){A a,g,z;B b;I f,n,r,*v,wn,wr,*ws,wt,zt;P*wp;
401-
ARGCHK1(w);J jtinplace=jt;
396+
J jtinplace=jt;
402397
wr=AR(w); r=(RANKT)jt->ranks; r=wr<r?wr:r; f=wr-r; // no RESETRANK
403398
wn=AN(w); ws=AS(w); n=r?ws[f]:1;
404399
wt=AT(w); wt=wn?DTYPE(wt):B01;
@@ -495,7 +490,7 @@ static B jtreduce2(J jt,A w,C id,I f,I r,A*zz){A z=0;B b=0,btab[258],*zv;I c,d,m
495490
} /* f/"r for dense w over an axis of length 2 */
496491

497492
static DF1(jtreduce){A z;I d,f,m,n,r,t,wr,*ws,zt;
498-
F1PREFIP;ARGCHK1(w);
493+
F1PREFIP;
499494
if(unlikely((SPARSE&AT(w))!=0))return reducesp(w,self); // If sparse, go handle it
500495
wr=AR(w); ws=AS(w);
501496
// Create r: the effective rank; f: length of frame; n: # items in a CELL of w
@@ -577,7 +572,7 @@ static A jtredcatsp(J jt,A w,A z,I r){A a,q,x,y;B*b;I c,d,e,f,j,k,m,n,n1,p,*u,*v
577572
// ,&.:(<"r) run together all axes above the last r. r must not exceed AR(w)-1
578573
// w must not be sparse or empty
579574
A jtredcatcell(J jt,A w,I r){A z;
580-
F1PREFIP;ARGCHK1(w);
575+
F1PREFIP;
581576
I wr=AR(w); // get original rank, which may change if we inplace into the same block
582577
if(r>=wr-1)return RETARG(w); // if only 1 axis left to run together, return the input
583578
if((ASGNINPLACESGN(SGNIF((I)jtinplace,JTINPLACEWX)&(-r),w) && !(AFLAG(w)&AFUNINCORPABLE))){ // inplace allowed, usecount is right
@@ -595,7 +590,7 @@ A jtredcatcell(J jt,A w,I r){A z;
595590

596591

597592
DF1(jtredcat){A z;B b;I f,r,*s,*v,wr;
598-
F1PREFIP;ARGCHK1(w);
593+
F1PREFIP;
599594
wr=AR(w); r=(RANKT)jt->ranks; r=wr<r?wr:r; f=wr-r; s=AS(w); RESETRANK;
600595
b=1==r&&1==s[f]; // special case: ,/ on last axis which has length 1: in that case, the rules say the axis disappears (because of the way ,/ works on length-1 lists)
601596
if(2>r&&!b)RCA(w); // in all OTHER cases, result=input for ranks<2
@@ -612,15 +607,13 @@ DF1(jtredcat){A z;B b;I f,r,*s,*v,wr;
612607
} /* ,/"r w */
613608

614609
static DF1(jtredsemi){I f,n,r,*s,wr;
615-
ARGCHK1(w);
616610
wr=AR(w); r=(RANKT)jt->ranks; r=wr<r?wr:r; f=wr-r; s=AS(w); SETICFR(w,f,r,n); // let the rank run into tail n=#items in a cell of w
617611
if(2>n){ASSERT(n!=0,EVDOMAIN); return tail(w);} // rank still set
618612
if(BOX&AT(w))return jtredg(jt,w,self); // the old way failed because it did not mimic scalar replication; revert to the long way. ranks are still set
619613
else{A z; return IRS1(w,0L,r-1,jtbox,z);} // unboxed, just box the cells
620614
} /* ;/"r w */
621615

622616
static DF1(jtredstitch){A c,y;I f,n,r,*s,*v,wr;
623-
ARGCHK1(w);
624617
wr=AR(w); r=(RANKT)jt->ranks; r=wr<r?wr:r; f=wr-r; RESETRANK;
625618
s=AS(w); SETICFR(w,f,r,n);
626619
ASSERT(n!=0,EVDOMAIN);
@@ -640,7 +633,6 @@ static DF1(jtredstitch){A c,y;I f,n,r,*s,*v,wr;
640633
}} /* ,./"r w */
641634

642635
static DF1(jtredstiteach){A*wv,y;I n,p,r,t;
643-
ARGCHK1(w);
644636
n=AN(w);
645637
if(!(2<n&&1==AR(w)&&BOX&AT(w)))return reduce(w,self);
646638
wv=AAV(w); y=wv[0]; SETIC(y,p); t=AT(y);
@@ -649,7 +641,6 @@ static DF1(jtredstiteach){A*wv,y;I n,p,r,t;
649641
} /* ,.&.>/ w */
650642

651643
static DF1(jtredcateach){A*u,*v,*wv,x,*xv,z,*zv;I f,m,mn,n,r,wr,*ws,zm,zn;I n1=0,n2=0;
652-
ARGCHK1(w);
653644
wr=AR(w); ws=AS(w); r=(RANKT)jt->ranks; r=wr<r?wr:r; f=wr-r; RESETRANK;
654645
SETICFR(w,f,r,n);
655646
if(!r||1>=n)return reshape(repeat(ne(sc(f),IX(wr)),shape(w)),n?w:ds(CACE));
@@ -668,7 +659,6 @@ static DF2(jtoprod){A z; return df2(z,a,w,FAV(self)->fgh[2]);} // x u/ y - tran
668659

669660

670661
F1(jtslash){A h;AF f1;C c;V*v;I flag=0;
671-
ARGCHK1(w);
672662
if(NOUN&AT(w))return evger(w,sc(GINSERT)); // treat m/ as m;.6. This means that a node with CSLASH never contains gerund u
673663
v=FAV(w);
674664
switch(v->id){ // select the monadic case
@@ -690,7 +680,6 @@ A jtaslash1(J jt,C c, A w){RZ( w); A z; return df1(z, w,qq(slash(ds(c)),ze
690680
A jtatab (J jt,C c,A a,A w){ARGCHK2(a,w); A z; return df2(z,a,w, slash(ds(c)) );}
691681

692682
DF1(jtmean){
693-
ARGCHK1(w);
694683
I wr=AR(w); I r=(RANKT)jt->ranks; r=wr<r?wr:r;
695684
I n=AS(w)[wr-r]; n=r?n:1;
696685
// leave jt->ranks unchanged to pass into +/

jsrc/adverbs/as.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -169,13 +169,11 @@ SUFFIXPFX(bw1111sfxI, UI,UI, BW1111, bw1111II,return EVOK;)
169169

170170

171171
static DF1(jtsuffix){DECLF;I r;
172-
ARGCHK1(w);
173172
r=(RANKT)jt->ranks; RESETRANK; if(r<AR(w))return rank1ex(w,self,r,jtsuffix);
174173
return eachl(IX(SETIC(w,r)),w,atop(fs,ds(CDROP)));
175174
} /* f\."r w for general f */
176175

177176
static DF1(jtgsuffix){A h,*hv,z,*zv;I m,n,r;
178-
ARGCHK1(w);
179177
r=(RANKT)jt->ranks; RESETRANK; if(r<AR(w))return rank1ex(w,self,r,jtgsuffix);
180178
SETIC(w,n);
181179
h=VAV(self)->fgh[2]; hv=AAV(h); m=AN(h);
@@ -193,7 +191,6 @@ static DF1(jtgsuffix){A h,*hv,z,*zv;I m,n,r;
193191
}}
194192

195193
static DF1(jtssg){F1PREFIP;PROLOG(0020);A a,z;I i,n,r,wr;
196-
ARGCHK1(w);
197194
ASSERT(DENSE&AT(w),EVNONCE);
198195
// loop over rank - we claim to handle IRS
199196
wr=AR(w); r=(RANKT)jt->ranks; r=wr<r?wr:r; RESETRANK; if(r<wr)return rank1ex(w,self,r,jtssg);
@@ -299,7 +296,7 @@ A jtscansp(J jt,A w,A self,AF sf){A e,ee,x,z;B*b;I f,m,j,r,t,wr;P*wp,*zp;
299296
} /* f/\"r or f/\."r on sparse w */
300297

301298
static DF1(jtsscan){A y,z;I d,f,m,n,r,t,wn,wr,*ws,wt;
302-
F1PREFIP;ARGCHK1(w);
299+
F1PREFIP;
303300
wt=AT(w);
304301
if(unlikely((SPARSE&wt)!=0))return scansp(w,self,jtsscan);
305302
wn=AN(w); wr=AR(w); r=(RANKT)jt->ranks; r=wr<r?wr:r; f=wr-r; ws=AS(w); RESETRANK;
@@ -383,7 +380,6 @@ static DF2(jtofxassoc){A f,i,j,p,s,x,z;C id,*zv;I c,d,k,kc,m,r,t;V*v;VA2 adocv;
383380
static DF1(jtiota1rev){I j; SETIC(w,j); return apv(j,j,-1L);}
384381

385382
F1(jtbsdot){A f;AF f1=jtsuffix,f2=jtoutfix;I flag=FAV(ds(CBSDOT))->flag;C id;V*v; // init flag is IRS1
386-
ARGCHK1(w);
387383
if(NOUN&AT(w))return fdef(0,CBSLASH,VERB, jtgsuffix,jtgoutfix, w,0L,fxeachv(1L,w), VGERL|VAV(ds(CBSLASH))->flag, RMAX,0L,RMAX);
388384
v=FAV(w); // verb info for w
389385
switch(v->id){

0 commit comments

Comments
 (0)