Skip to content

Commit

Permalink
Eliminate always-inline functions/continuations when inlining
Browse files Browse the repository at this point in the history
  • Loading branch information
minoki committed Sep 17, 2024
1 parent d092af4 commit a3629d2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/cps/inline.sml
Original file line number Diff line number Diff line change
Expand Up @@ -770,7 +770,8 @@ struct
)
val dec = C.ValDec {exp = exp, results = [SOME result]}
in
(env, cenv, subst, csubst, dec :: acc)
if alwaysInline then (env, cenv, subst, csubst, acc)
else (env, cenv, subst, csubst, dec :: acc)
end
| _ =>
(case (C.isDiscardable exp, results) of
Expand Down Expand Up @@ -825,7 +826,8 @@ struct
val dec = C.ContDec
{name = name, params = params, body = body, attr = attr}
in
(env, cenv, subst, csubst, dec :: acc)
if alwaysInline then (env, cenv, subst, csubst, acc)
else (env, cenv, subst, csubst, dec :: acc)
end
| C.RecContDec defs =>
let
Expand Down

0 comments on commit a3629d2

Please sign in to comment.