| 1396 | } |
| 1397 | |
| 1398 | static void compile_emit_branch( compiler * c, unsigned int op_code, int label ) |
| 1399 | { |
| 1400 | struct label_info * const l = &dynamic_array_at( struct label_info, |
| 1401 | c->labels, label ); |
| 1402 | int const pos = c->code->size; |
| 1403 | instruction instr; |
| 1404 | instr.op_code = op_code; |
| 1405 | if ( l->absolute_position == -1 ) |
| 1406 | { |
| 1407 | instr.arg = 0; |
| 1408 | dynamic_array_push( l->uses, pos ); |
| 1409 | } |
| 1410 | else |
| 1411 | instr.arg = (int)( l->absolute_position - pos - 1 ); |
| 1412 | compile_emit_instruction( c, instr ); |
| 1413 | } |
| 1414 | |
| 1415 | static int compile_emit_constant( compiler * c, OBJECT * value ) |
| 1416 | { |
no test coverage detected