| 1484 | } |
| 1485 | |
| 1486 | static void compile_set_label( compiler * c, int32_t label ) |
| 1487 | { |
| 1488 | struct label_info * const l = &dynamic_array_at( struct label_info, |
| 1489 | c->labels, label ); |
| 1490 | int32_t const pos = c->code->size; |
| 1491 | int32_t i; |
| 1492 | assert( l->absolute_position == -1 ); |
| 1493 | l->absolute_position = pos; |
| 1494 | for ( i = 0; i < l->uses->size; ++i ) |
| 1495 | { |
| 1496 | int32_t id = dynamic_array_at( int32_t, l->uses, i ); |
| 1497 | int32_t offset = (int32_t)( pos - id - 1 ); |
| 1498 | dynamic_array_at( instruction, c->code, id ).arg = offset; |
| 1499 | } |
| 1500 | } |
| 1501 | |
| 1502 | static void compile_emit( compiler * c, uint32_t op_code, int32_t arg ) |
| 1503 | { |
no outgoing calls
no test coverage detected