Commit bc70b6e1 authored by Stefan Gränitz's avatar Stefan Gränitz
Browse files

Expect new lambda codegen for existing tests/basic/lambda.cpp

parent 99d76637
......@@ -2,19 +2,24 @@
Now output intermediate result
/* Generated by Frama-C */
struct UliEUc1xRiE_ {
void (*__fc_lambda_apply)(struct UliEUc1xRiE_ const *, int ) ;
void (*__fc_lambda_overload_0)(struct UliEUc1xRiE_ const *, int ) ;
int *x ;
};
void UliEUc1xRiE__cons(struct UliEUc1xRiE_ const *__fc_closure,
void (*__fc_func)(struct UliEUc1xRiE_ const *, int ),
int *x)
void UliEUc1xRiE__init_captures(struct UliEUc1xRiE_ const *__fc_closure,
int *x)
{
__fc_closure->__fc_lambda_apply = __fc_func;
__fc_closure->x = x;
return;
}
void __fc_lambda_def(struct UliEUc1xRiE_ const *__fc_closure, int y)
void UliEUc1xRiE__init_0(struct UliEUc1xRiE_ const *__fc_closure,
void (*__fc_func)(struct UliEUc1xRiE_ const *, int ))
{
__fc_closure->__fc_lambda_overload_0 = __fc_func;
return;
}
void UliEUc1xRiE__body_0(struct UliEUc1xRiE_ const *__fc_closure, int y)
{
*(__fc_closure->x) += y;
return;
......@@ -23,11 +28,12 @@ void __fc_lambda_def(struct UliEUc1xRiE_ const *__fc_closure, int y)
int main(void)
{
struct UliEUc1xRiE_ lam;
struct UliEUc1xRiE_ const __fc_lam;
struct UliEUc1xRiE_ const __fc_lambda_tmp;
int x = 3;
UliEUc1xRiE__cons(& __fc_lam,& __fc_lambda_def,(int *)x);
lam = __fc_lam;
(*(lam.__fc_lambda_apply))((struct UliEUc1xRiE_ const *)(& lam),1);
UliEUc1xRiE__init_captures(& __fc_lambda_tmp,(int *)x);
UliEUc1xRiE__init_0(& __fc_lambda_tmp,& UliEUc1xRiE__body_0);
lam = __fc_lambda_tmp;
(*(lam.__fc_lambda_overload_0))((struct UliEUc1xRiE_ const *)(& lam),1);
return x;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment