Mercurial > hg > Gears > GearsAgda
comparison src/include/origin_cs.h @ 15:907c69e21e56
modify allocate
author | Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 14 Apr 2015 03:37:22 +0900 |
parents | a765eb7f3b7c |
children | 868c2918b634 |
comparison
equal
deleted
inserted
replaced
14:d98961bfd0f2 | 15:907c69e21e56 |
---|---|
1 __code start_code(); | 1 __code start_code(); |
2 __code meta_start_code(); | |
3 __code exit_code(); | 2 __code exit_code(); |
4 | 3 |
5 __code start_code(Context* context, __code (*next)()) { | 4 __code start_code(struct Context* context, enum Code next) { |
6 goto meta_start_code(context, next); | 5 goto meta(context, next); |
7 } | 6 } |
8 | 7 |
9 __code meta_start_code(Context* context, __code (*next)()) { | 8 __code exit_code(struct Context* context) { |
10 context->next = next; | |
11 goto context->next(context); | |
12 } | |
13 | |
14 __code exit_code(Context* context) { | |
15 free(context->ds_heap); | |
16 free(context->mds_heap); | |
17 goto exit(0); | 9 goto exit(0); |
18 } | 10 } |