Skip to content

Commit

Permalink
Turn inlining back to normal, but disable call optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
dolio committed Nov 20, 2024
1 parent 8d3761f commit 58e64e2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 0 additions & 4 deletions unison-runtime/src/Unison/Runtime/ANF.hs
Original file line number Diff line number Diff line change
Expand Up @@ -667,10 +667,6 @@ inline inls (Rec bs entry) = Rec (fmap go0 <$> bs) (go0 entry)
go n | n <= 0 = id
go n = ABTN.visitPure \case
TApp (FComb r) args
| Just (arity, _) <- Map.lookup r inls,
arity >= 0 ->
-- identity substitution
Just $ TApp (FComb r) args
| Just (arity, expr) <- Map.lookup r inls ->
go (n-1) <$> tweak expr args arity
_ -> Nothing
Expand Down
2 changes: 1 addition & 1 deletion unison-runtime/src/Unison/Runtime/Machine.hs
Original file line number Diff line number Diff line change
Expand Up @@ -2025,7 +2025,7 @@ cacheAdd0 ntys0 termSuperGroups sands cc = do
ntm <- stateTVar (freshTm cc) $ \i -> (i, i + sz)
rtm <- updateMap (M.fromList $ zip rs [ntm ..]) (refTm cc)
-- check for missing references
let arities = fmap (head . ANF.arities) int <> builtinArities
let arities = M.empty -- fmap (head . ANF.arities) int <> builtinArities
inlinfo = ANF.buildInlineMap int <> builtinInlineInfo
rns = RN (refLookup "ty" rty) (refLookup "tm" rtm) (flip M.lookup arities)
combinate :: Word64 -> (Reference, SuperGroup Symbol) -> (Word64, EnumMap Word64 Comb)
Expand Down

0 comments on commit 58e64e2

Please sign in to comment.