Add loop operator in fcode #889

Open
zxq9 wants to merge 27 commits from loop-op into master
Showing only changes of commit 89afa9ec8f - Show all commits

View File

@ -654,7 +654,7 @@ expr_to_fcode(Env, _Type, {list, _, Es}) ->
nil, Es);
expr_to_fcode(Env, _Type, {app, _, {'..', _}, [A, B]}) ->
AV = fresh_name(), % var to keep B
WithA = fun(X) -> {'let', AV, expr_to_fcode(Env, B), X} end,
WithA = fun(X) -> {'let', AV, expr_to_fcode(Env, A), X} end,
St = fresh_name(), % loop state
ItProj = {proj, {var, St}, 1},
AcProj = {proj, {var, St}, 0},