codereport / jsource

J Language Source Code. Livestream links ⬇️
https://www.youtube.com/playlist?list=PLVFrD1dmDdvfVhYLU_iKkV67X9XqCJLWe
Other
38 stars 20 forks source link

Many function argument macros removal 20/30 #71

Closed Sebanisu closed 3 years ago

Sebanisu commented 3 years ago

https://github.com/codereport/jsource/issues/60 <- 20 of 30 done. I'm working 12 hour days next 3 days so I might not get the other 10 done till monday. Though that last few haven't had many instances of use. The F1 and F2 were like 1000+ instances combined. I rebased on the upstream/main so I don't think we should have any conflicts.

I basically used regex to replace the macro with the result of the macro. These macros were mostly just function argument lists.

Summary:

Macro Definition Removed File
#define F1(f) A f(J jt, A w) :heavy_check_mark: j.h
#define F2(f) A f(J jt,A a,A w) :heavy_check_mark: j.h
#define DF1(f) A f(J jt, A w,A self) :heavy_check_mark: j.h
#define DF2(f) A f(J jt,A a,A w,A self) :heavy_check_mark: j.h
#define FPREF :heavy_check_mark: j.h
#define FMTF(f,T) void f(J jt,C*s,T*v) :heavy_check_mark: f.c
#define KF1(f) B f(J jt,A w,void*yv) :heavy_check_mark: k.c
#define KF1F(f) B f(J jt,A w,void*yv,D fuzz) :heavy_check_mark: k.c
#define KF2(f) B f(J jt,A w,void*yv,I mode) :heavy_check_mark: k.c
#define TACT(f) TA f(J jt,I b,I e,TA*stack,A locsyms,I tmonad,I tsubst ...) :heavy_check_mark: p.h
#define F1X(f) A f(J jt,A w,A *ltext) :heavy_check_mark: rl.c
#define DF1X(f) A f(J jt,A w,A self,A *ltext) :heavy_check_mark: rl.c
#define F2X(f) A f(J jt,A a,A w,A *ltext) :heavy_check_mark: rl.c
Sebanisu commented 3 years ago

I sent in pull request as I figured I could do the other 10 macros at a later date on my day off. If you'd rather I wait till it's all done we can. Though I figured your stream would cause many conflicts.

codereport commented 3 years ago

I sent in pull request as I figured I could do the other 10 macros at a later date on my day off. If you'd rather I wait till it's all done we can. Though I figured your stream would cause many conflicts.

No this is awesome! I am just updating the description and reviewing each of the macros so I can recognize code that has been replaced by one in the future. Will merge either today/tmo.