118
119
120
121
122
123
124
125
126
|
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
|
+
+
+
+
+
+
+
+
+
|
RegisterBuiltinFunc< Intrinsic< bool ( TypeWrapper< ptr< CodeBuilder > >, uint32_t ) > >( e, e.extDestroyAllLiveValuesFromContinueScope(),
[]( auto&& c, const Value& cbv, const Value& index )
{
auto cb = *FromValue< TypeWrapper< ptr< CodeBuilder > > >( cbv );
return ToValue( cb->destroyAllLiveValuesFromContinueScope( c, *FromValue< uint32_t >( index ) ) );
} );
// TODO add some tests for this, cba right now, at least there's this comment to keep a trace I guess
RegisterBuiltinFunc< Intrinsic< Value ( TypeWrapper< ptr< CodeBuilder > >, Value, TypeWrapper< ptr< Propositions > > ) > >( e, e.extEmitTypePredicatesCheck(),
[]( auto&& c, const Value& cbv, const Value& val, const Value& p )
{
auto cb = *FromValue< TypeWrapper< ptr< CodeBuilder > > >( cbv );
auto props = *FromValue< TypeWrapper< ptr< Propositions > > >( p );
return cb->emitTypePredicatesCheck( c, val, props );
} );
}
}
|