Mercurial > hg > Papers > 2017 > ikkun-sigos
annotate paper/src/twice.c @ 10:a7d96c2f588b
Update
author | one |
---|---|
date | Sat, 22 Apr 2017 16:51:58 +0900 |
parents | 38b037c42c34 |
children |
rev | line source |
---|---|
0 | 1 // Twice |
2 __code twice(struct Context* context, struct LoopCounter* loopCounter, int index, int alignment, int* array) { | |
3 int i = loopCounter->i; | |
4 | |
5 if (i < alignment) { | |
6 array[i+index*alignment] = array[i+index*alignment]*2; | |
7 loopCounter->i++; | |
8 | |
9 goto meta(context, Twice); | |
10 } | |
11 | |
12 loopCounter->i = 0; | |
13 | |
14 stack_pop(context->code_stack, &context->next); | |
15 goto meta(context, context->next); | |
16 } |