Skip to content

Commit

Permalink
basic: cosmetic no-op changes preparing the merge of macroexpand into…
Browse files Browse the repository at this point in the history
… EVAL
  • Loading branch information
asarhaddon committed Nov 15, 2024
1 parent 8833932 commit fe075d0
Show file tree
Hide file tree
Showing 9 changed files with 48 additions and 13 deletions.
18 changes: 15 additions & 3 deletions impls/basic/step2_eval.in.bas
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ SUB EVAL
GOTO EVAL_RETURN

APPLY_LIST:

GOSUB EMPTY_Q
IF R THEN R=A:GOSUB INC_REF_R:GOTO EVAL_RETURN

Expand All @@ -116,11 +117,22 @@ SUB EVAL
F=Z%(R+2)

GOSUB TYPE_F
IF T<>9 THEN R=-1:ER=-1:E$="apply of non-function":GOTO EVAL_INVOKE_DONE
GOSUB DO_FUNCTION

REM ON .. GOTO here reduces the diff with later steps.
T=T-8
IF 0<T THEN ON T GOTO EVAL_DO_FUNCTION

REM if error, pop and return f/args for release by caller
R=-1:ER=-1:E$="apply of non-function":GOTO EVAL_INVOKE_DONE

EVAL_DO_FUNCTION:
REM regular function

GOSUB DO_FUNCTION

EVAL_INVOKE_DONE:
REM pop and release f/args
AY=W:GOSUB RELEASE
GOTO EVAL_RETURN

EVAL_RETURN:
REM AZ=R: B=1: GOSUB PR_STR
Expand Down
18 changes: 15 additions & 3 deletions impls/basic/step3_env.in.bas
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ SUB EVAL
GOTO EVAL_RETURN

APPLY_LIST:

GOSUB EMPTY_Q
IF R THEN R=A:GOSUB INC_REF_R:GOTO EVAL_RETURN

Expand Down Expand Up @@ -182,11 +183,22 @@ SUB EVAL
F=Z%(R+2)

GOSUB TYPE_F
IF T<>9 THEN R=-1:ER=-1:E$="apply of non-function":GOTO EVAL_INVOKE_DONE
GOSUB DO_FUNCTION

REM ON .. GOTO here reduces the diff with later steps.
T=T-8
IF 0<T THEN ON T GOTO EVAL_DO_FUNCTION

REM if error, pop and return f/args for release by caller
R=-1:ER=-1:E$="apply of non-function":GOTO EVAL_INVOKE_DONE

EVAL_DO_FUNCTION:
REM regular function

GOSUB DO_FUNCTION

EVAL_INVOKE_DONE:
REM pop and release f/args
AY=W:GOSUB RELEASE
GOTO EVAL_RETURN

EVAL_RETURN:
REM AZ=R: B=1: GOSUB PR_STR
Expand Down
4 changes: 3 additions & 1 deletion impls/basic/step4_if_fn_do.in.bas
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ SUB EVAL
GOTO EVAL_RETURN

APPLY_LIST:

GOSUB EMPTY_Q
IF R THEN R=A:GOSUB INC_REF_R:GOTO EVAL_RETURN

Expand Down Expand Up @@ -228,7 +229,8 @@ SUB EVAL
GOSUB TYPE_F
IF T=14 THEN F=Z%(F+1):GOSUB TYPE_F

ON T-8 GOTO EVAL_DO_FUNCTION,EVAL_DO_MAL_FUNCTION,EVAL_DO_MAL_FUNCTION
T=T-8
IF 0<T THEN ON T GOTO EVAL_DO_FUNCTION,EVAL_DO_MAL_FUNCTION

REM if error, pop and return f/args for release by caller
GOSUB POP_R
Expand Down
4 changes: 3 additions & 1 deletion impls/basic/step5_tco.in.bas
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ SUB EVAL
GOTO EVAL_RETURN

APPLY_LIST:

GOSUB EMPTY_Q
IF R THEN R=A:GOSUB INC_REF_R:GOTO EVAL_RETURN

Expand Down Expand Up @@ -252,7 +253,8 @@ SUB EVAL
GOSUB TYPE_F
IF T=14 THEN F=Z%(F+1):GOSUB TYPE_F

ON T-8 GOTO EVAL_DO_FUNCTION,EVAL_DO_MAL_FUNCTION,EVAL_DO_MAL_FUNCTION
T=T-8
IF 0<T THEN ON T GOTO EVAL_DO_FUNCTION,EVAL_DO_MAL_FUNCTION

REM if error, pop and return f/args for release by caller
GOSUB POP_R
Expand Down
4 changes: 3 additions & 1 deletion impls/basic/step6_file.in.bas
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ SUB EVAL
GOTO EVAL_RETURN

APPLY_LIST:

GOSUB EMPTY_Q
IF R THEN R=A:GOSUB INC_REF_R:GOTO EVAL_RETURN

Expand Down Expand Up @@ -252,7 +253,8 @@ SUB EVAL
GOSUB TYPE_F
IF T=14 THEN F=Z%(F+1):GOSUB TYPE_F

ON T-8 GOTO EVAL_DO_FUNCTION,EVAL_DO_MAL_FUNCTION,EVAL_DO_MAL_FUNCTION
T=T-8
IF 0<T THEN ON T GOTO EVAL_DO_FUNCTION,EVAL_DO_MAL_FUNCTION

REM if error, pop and return f/args for release by caller
GOSUB POP_R
Expand Down
4 changes: 3 additions & 1 deletion impls/basic/step7_quote.in.bas
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ SUB EVAL
GOTO EVAL_RETURN

APPLY_LIST:

GOSUB EMPTY_Q
IF R THEN R=A:GOSUB INC_REF_R:GOTO EVAL_RETURN

Expand Down Expand Up @@ -380,7 +381,8 @@ SUB EVAL
GOSUB TYPE_F
IF T=14 THEN F=Z%(F+1):GOSUB TYPE_F

ON T-8 GOTO EVAL_DO_FUNCTION,EVAL_DO_MAL_FUNCTION,EVAL_DO_MAL_FUNCTION
T=T-8
IF 0<T THEN ON T GOTO EVAL_DO_FUNCTION,EVAL_DO_MAL_FUNCTION

REM if error, pop and return f/args for release by caller
GOSUB POP_R
Expand Down
3 changes: 2 additions & 1 deletion impls/basic/step8_macros.in.bas
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,8 @@ SUB EVAL
GOSUB TYPE_F
IF T=14 THEN F=Z%(F+1):GOSUB TYPE_F

ON T-8 GOTO EVAL_DO_FUNCTION,EVAL_DO_MAL_FUNCTION,EVAL_DO_MAL_FUNCTION
T=T-8
IF 0<T THEN ON T GOTO EVAL_DO_FUNCTION,EVAL_DO_MAL_FUNCTION

REM if error, pop and return f/args for release by caller
GOSUB POP_R
Expand Down
3 changes: 2 additions & 1 deletion impls/basic/step9_try.in.bas
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,8 @@ SUB EVAL
GOSUB TYPE_F
IF T=14 THEN F=Z%(F+1):GOSUB TYPE_F

ON T-8 GOTO EVAL_DO_FUNCTION,EVAL_DO_MAL_FUNCTION,EVAL_DO_MAL_FUNCTION
T=T-8
IF 0<T THEN ON T GOTO EVAL_DO_FUNCTION,EVAL_DO_MAL_FUNCTION

REM if error, pop and return f/args for release by caller
GOSUB POP_R
Expand Down
3 changes: 2 additions & 1 deletion impls/basic/stepA_mal.in.bas
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,8 @@ SUB EVAL
GOSUB TYPE_F
IF T=14 THEN F=Z%(F+1):GOSUB TYPE_F

ON T-8 GOTO EVAL_DO_FUNCTION,EVAL_DO_MAL_FUNCTION,EVAL_DO_MAL_FUNCTION
T=T-8
IF 0<T THEN ON T GOTO EVAL_DO_FUNCTION,EVAL_DO_MAL_FUNCTION

REM if error, pop and return f/args for release by caller
GOSUB POP_R
Expand Down

0 comments on commit fe075d0

Please sign in to comment.