Goose  Diff

Differences From Artifact [a41ab23a5d]:

  • File bs/builtins/operators/logic.cpp — part of check-in [3ae3c0b3ad] at 2019-10-05 13:58:40 on branch trunk — Implemented the conversion of GetVar/SetVar/GetTemporary/SetTemporary to z3 expressions. (user: achavasse size: 10278)

To Artifact [37e7118a88]:

  • File bs/builtins/operators/logic.cpp — part of check-in [cfc94e192c] at 2019-10-15 00:04:26 on branch trunk — llr: implemented a helper function to compute dominators. (user: achavasse size: 10352)

82
83
84
85
86
87
88

89
90
91
92
93
94
95

                // bool or
                ForType< bool >( []( auto&& lhs, auto&& rhs ) -> Value
                {
                    // Build a CFG that implements the control flow for
                    // shortcut evaluation.
                    auto cfg = make_shared< CFG >();

                    auto pLhsBB = cfg->entryBB();
                    auto pRhsBB = cfg->createBB();
                    auto pEndBB = cfg->createBB();

                    // If the lhs is true, skip to the end directly.
                    // Otherwise, jump to the BB that computes rhs.
                    pLhsBB->setTerminator( CondBranch( lhs, pEndBB, pRhsBB ) );







>







82
83
84
85
86
87
88
89
90
91
92
93
94
95
96

                // bool or
                ForType< bool >( []( auto&& lhs, auto&& rhs ) -> Value
                {
                    // Build a CFG that implements the control flow for
                    // shortcut evaluation.
                    auto cfg = make_shared< CFG >();
                    cfg->createBB();
                    auto pLhsBB = cfg->entryBB();
                    auto pRhsBB = cfg->createBB();
                    auto pEndBB = cfg->createBB();

                    // If the lhs is true, skip to the end directly.
                    // Otherwise, jump to the BB that computes rhs.
                    pLhsBB->setTerminator( CondBranch( lhs, pEndBB, pRhsBB ) );
148
149
150
151
152
153
154

155
156
157
158
159
160
161

                // bool and
                ForType< bool >( []( auto&& lhs, auto&& rhs ) -> Value
                {
                    // Build a CFG that implements the control flow for
                    // shortcut evaluation.
                    auto cfg = make_shared< CFG >();

                    auto pLhsBB = cfg->entryBB();
                    auto pRhsBB = cfg->createBB();
                    auto pEndBB = cfg->createBB();

                    // If the lhs is false, skip to the end directly.
                    // Otherwise, jump to the BB that computes rhs.
                    pLhsBB->setTerminator( CondBranch( lhs, pRhsBB, pEndBB ) );







>







149
150
151
152
153
154
155
156
157
158
159
160
161
162
163

                // bool and
                ForType< bool >( []( auto&& lhs, auto&& rhs ) -> Value
                {
                    // Build a CFG that implements the control flow for
                    // shortcut evaluation.
                    auto cfg = make_shared< CFG >();
                    cfg->createBB();
                    auto pLhsBB = cfg->entryBB();
                    auto pRhsBB = cfg->createBB();
                    auto pEndBB = cfg->createBB();

                    // If the lhs is false, skip to the end directly.
                    // Otherwise, jump to the BB that computes rhs.
                    pLhsBB->setTerminator( CondBranch( lhs, pRhsBB, pEndBB ) );