| 1508 | } |
| 1509 | |
| 1510 | static void compile_emit_branch( compiler * c, uint32_t op_code, int32_t label ) |
| 1511 | { |
| 1512 | struct label_info * const l = &dynamic_array_at( struct label_info, |
| 1513 | c->labels, label ); |
| 1514 | int32_t const pos = c->code->size; |
| 1515 | instruction instr; |
| 1516 | instr.op_code = op_code; |
| 1517 | if ( l->absolute_position == -1 ) |
| 1518 | { |
| 1519 | instr.arg = 0; |
| 1520 | dynamic_array_push( l->uses, pos ); |
| 1521 | } |
| 1522 | else |
| 1523 | instr.arg = (int32_t)( l->absolute_position - pos - 1 ); |
| 1524 | compile_emit_instruction( c, instr ); |
| 1525 | } |
| 1526 | |
| 1527 | static int32_t compile_emit_constant( compiler * c, OBJECT * value ) |
| 1528 | { |
no test coverage detected