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 )
{
|