Skip to content

Commit fd416eb

Browse files
committed
New let float pass using PIR.freevars
Forgot to recurse the removeLets inside the rhs bindings WIP: separated depth and scope reader WIP: fixed remaining bugs NewLetFloat: fixed accumulating letholes, fixed depth-calc of mark Fixed floatBack to recurse inside the floated-lets rhs'es Don't store the Recursivity for LetHoles NewLetFloat: when calculating freevars look into bindings' types
1 parent 58228dd commit fd416eb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+40117
-43130
lines changed

nix/pkgs/haskell/materialized-darwin/.plan.nix/plutus-core.nix

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

nix/pkgs/haskell/materialized-darwin/default.nix

Lines changed: 0 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

nix/pkgs/haskell/materialized-linux/.plan.nix/plutus-core.nix

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

nix/pkgs/haskell/materialized-linux/default.nix

Lines changed: 0 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

nix/pkgs/haskell/materialized-windows/.plan.nix/plutus-core.nix

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

nix/pkgs/haskell/materialized-windows/default.nix

Lines changed: 0 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

plutus-core/plutus-core.cabal

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ library
132132
PlutusIR.Transform.Beta
133133
PlutusIR.Transform.DeadCode
134134
PlutusIR.Transform.Inline
135-
PlutusIR.Transform.LetFloat
135+
PlutusIR.Transform.NewLetFloat
136136
PlutusIR.Transform.LetMerge
137137
PlutusIR.Transform.RecSplit
138138
PlutusIR.Transform.NonStrict
@@ -291,7 +291,6 @@ library
291291
mmorph -any,
292292
monoidal-containers,
293293
mtl -any,
294-
nonempty-containers -any,
295294
parser-combinators >= 0.4.0,
296295
prettyprinter >=1.1.0.1,
297296
prettyprinter-configurable -any,

plutus-core/plutus-ir/src/PlutusIR/Compiler.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ import PlutusIR.Error
4141
import qualified PlutusIR.Transform.Beta as Beta
4242
import qualified PlutusIR.Transform.DeadCode as DeadCode
4343
import qualified PlutusIR.Transform.Inline as Inline
44-
import qualified PlutusIR.Transform.LetFloat as LetFloat
4544
import qualified PlutusIR.Transform.LetMerge as LetMerge
45+
import qualified PlutusIR.Transform.NewLetFloat as NewLetFloat
4646
import qualified PlutusIR.Transform.NonStrict as NonStrict
4747
import qualified PlutusIR.Transform.RecSplit as RecSplit
4848
import PlutusIR.Transform.Rename ()
@@ -126,8 +126,8 @@ simplifyTerm = runIfOpts $ simplify'
126126

127127
-- | Perform floating/merging of lets in a 'Term' to their nearest lambda/Lambda/letStrictNonValue.
128128
-- Note: It assumes globally unique names
129-
floatTerm :: (Compiling m e uni fun a, Semigroup b) => Term TyName Name uni fun b -> m (Term TyName Name uni fun b)
130-
floatTerm = runIfOpts $ pure . LetMerge.letMerge . RecSplit.recSplit . LetFloat.floatTerm
129+
floatTerm :: (Compiling m e uni fun a) => Term TyName Name uni fun b -> m (Term TyName Name uni fun b)
130+
floatTerm = runIfOpts $ pure . LetMerge.letMerge . RecSplit.recSplit . NewLetFloat.floatTerm
131131

132132
-- | Typecheck a PIR Term iff the context demands it.
133133
-- Note: assumes globally unique names

0 commit comments

Comments
 (0)