Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix constant folding refactoring #196

Open
ryukzak opened this issue Jan 22, 2022 · 1 comment
Open

Fix constant folding refactoring #196

ryukzak opened this issue Jan 22, 2022 · 1 comment
Labels
bug Something isn't working good first issue Good for newcomers hs Haskell

Comments

@ryukzak
Copy link
Owner

ryukzak commented Jan 22, 2022

In test:

            , unitTestCase "target system: autosynthesis, constant folding 1" def $ do
                setNetwork march
                setBusType pInt
                assignLua
                    [__i|
                        function sum(a)
                            local d = 1 + 2 + a
                            sum(d)
                        end
                        sum(0)
                        |]
                synthesizeAndCoSim
                mkConstantFolding
                    [ add "!1#0" "!2#0" ["_0#d"]
                    , constant 2 ["!2#0"]
                    , constant 1 ["!1#0"]
                    ]
                    -- FIXME: should be:
                    -- [ constant 3 ["_0#d"] ]
                    [ constant 3 ["_0#d"]
                    , constant 2 ["!2#0"]
                    , constant 1 ["!1#0"]
                    ]
                    >>= \r -> assertRefactor r
stack build --fast --test --test-arguments '-p "constant folding 1"'
@ryukzak ryukzak added bug Something isn't working hs Haskell labels Jan 22, 2022
@ryukzak ryukzak added the good first issue Good for newcomers label Jan 21, 2024
@ryukzak
Copy link
Owner Author

ryukzak commented Jan 21, 2024

Update in #274

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers hs Haskell
Projects
Status: To triage
Development

No branches or pull requests

1 participant