Goose  Diff

Differences From Artifact [ea8c8be2d0]:

  • File bs/builtins/operators/logic.cpp — part of check-in [b81d4242e3] at 2022-06-27 16:56:56 on branch cir-stack-language —
    • cir: allow verification specific code and instructions to be interspersed with regular code again and added a function to filter them out before consuming the code in the interpreter and during codegen
    • verification: better handling of non-representable types that don't involve giving up entirely on verifying the function
    • g0 api: updated it to match the CIR changes
    • prelude: adapted reference verification to the new CIR api
    (user: zlodo size: 18745) [more...]

To Artifact [ba9cbce9b0]:

  • File bs/builtins/operators/logic.cpp — part of check-in [373a6ebd57] at 2022-09-02 21:42:42 on branch trunk —
    • Implemented a test for variadic functions
    • Fixed a million issues and missing things preventing the above from working
    • Implemented equality operators for types
    (user: zlodo size: 18757)

119
120
121
122
123
124
125
126
127
128
129
130
131
132
133

                    // This operator have different behaviors depending on the context:
                    // in normal code, we want to generate shortcut evaluation. But in propositions
                    // and ghost code, we want to simply generate a Or instruction with both operands
                    // always evaluated. So we delegate the work to another overload of operator_or that
                    // takes the builder as its first param and is overloaded according to it.
                    return InvokeOverloadSet( c,
                        orOp, MakeTuple( c.builder(), forward< L >( lhs ), forward< R >( rhs ) ) );
                } )
            )
        );

        RegisterBuiltinFunc< Intrinsic< bool ( Value, bool, bool ) > >( e, orOp,
            []( auto&& c, auto&& b, auto&& lhs, auto&& rhs )
            {







|







119
120
121
122
123
124
125
126
127
128
129
130
131
132
133

                    // This operator have different behaviors depending on the context:
                    // in normal code, we want to generate shortcut evaluation. But in propositions
                    // and ghost code, we want to simply generate a Or instruction with both operands
                    // always evaluated. So we delegate the work to another overload of operator_or that
                    // takes the builder as its first param and is overloaded according to it.
                    return InvokeOverloadSet( c,
                        orOp, MakeClosedTuple( c.builder(), forward< L >( lhs ), forward< R >( rhs ) ) );
                } )
            )
        );

        RegisterBuiltinFunc< Intrinsic< bool ( Value, bool, bool ) > >( e, orOp,
            []( auto&& c, auto&& b, auto&& lhs, auto&& rhs )
            {
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233

                    // This operator have different behaviors depending on the context:
                    // in normal code, we want to generate shortcut evaluation. But in propositions
                    // and ghost code, we want to simply generate a And instruction with both operands
                    // always evaluated. So we delegate the work to another overload of operator_and that
                    // takes the builder as its first param and is overloaded according to it.
                    return InvokeOverloadSet( c,
                        andOp, MakeTuple( c.builder(), forward< L >( lhs ), forward< R >( rhs ) ) );
                } )
            )
        );

        RegisterBuiltinFunc< Intrinsic< bool ( Value, bool, bool ) > >( e, andOp,
            []( auto&& c, auto&& b, auto&& lhs, auto&& rhs )
            {







|







219
220
221
222
223
224
225
226
227
228
229
230
231
232
233

                    // This operator have different behaviors depending on the context:
                    // in normal code, we want to generate shortcut evaluation. But in propositions
                    // and ghost code, we want to simply generate a And instruction with both operands
                    // always evaluated. So we delegate the work to another overload of operator_and that
                    // takes the builder as its first param and is overloaded according to it.
                    return InvokeOverloadSet( c,
                        andOp, MakeClosedTuple( c.builder(), forward< L >( lhs ), forward< R >( rhs ) ) );
                } )
            )
        );

        RegisterBuiltinFunc< Intrinsic< bool ( Value, bool, bool ) > >( e, andOp,
            []( auto&& c, auto&& b, auto&& lhs, auto&& rhs )
            {