Mercurial > hg > Papers > 2017 > ikkun-sigos
annotate paper/src/twice.c @ 35:7c5d27175aa4 default tip
fix
author | ikkun |
---|---|
date | Tue, 16 May 2017 16:19:47 +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 } |