Skip to content
Snippets Groups Projects
Commit c17ebdae authored by Stefan Gränitz's avatar Stefan Gränitz Committed by Virgile Prevosto
Browse files

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

parent 0655b97c
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment