| 1372 | } |
| 1373 | |
| 1374 | static void compile_set_label( compiler * c, int label ) |
| 1375 | { |
| 1376 | struct label_info * const l = &dynamic_array_at( struct label_info, |
| 1377 | c->labels, label ); |
| 1378 | int const pos = c->code->size; |
| 1379 | int i; |
| 1380 | assert( l->absolute_position == -1 ); |
| 1381 | l->absolute_position = pos; |
| 1382 | for ( i = 0; i < l->uses->size; ++i ) |
| 1383 | { |
| 1384 | int id = dynamic_array_at( int, l->uses, i ); |
| 1385 | int offset = (int)( pos - id - 1 ); |
| 1386 | dynamic_array_at( instruction, c->code, id ).arg = offset; |
| 1387 | } |
| 1388 | } |
| 1389 | |
| 1390 | static void compile_emit( compiler * c, unsigned int op_code, int arg ) |
| 1391 | { |
no outgoing calls
no test coverage detected