target/whirl.c
static void emit_zero(WhirlCodeSegment *segment, RingState *state) {
    if (state->active_ring == MATH_RING) {
        state->math_dir = reverse_direction(state->math_dir);
    }
    else {
        state->op_dir = reverse_direction(state->op_dir);
    }

    if (state->last_is_zero) {
        state->active_ring = (state->active_ring == MATH_RING ? OPERATION_RING :
                                                                MATH_RING);
    }

    state->last_is_zero = !state->last_is_zero;
    emit_instruction(segment, '0');
}
// Adds a 0 instruction to the current code segment, and update the current
// ring state to account for it
Adds a 0 instruction to the current code segment, and update the current
ring state to account for it
Adds a 0 instruction to the current code segment and update the current ring state to account for it
static void emit_zero(WhirlCodeSegment *segment, RingState *state) {
    if (state->active_ring == MATH_RING) {
        state->math_dir = reverse_direction(state->math_dir);
    }
    else {
        state->op_dir = reverse_direction(state->op_dir);
    }
    if (state->last_is_zero) {
        state->active_ring = (state->active_ring == MATH_RING ? OPERATION_RING :
                                                                MATH_RING);
    }
    state->last_is_zero = !state->last_is_zero;
    emit_instruction(segment, '0');
}
static void emit_zero ( WhirlCodeSegment * segment , RingState * state ) { if ( state -> active_ring == MATH_RING ) { state -> math_dir = reverse_direction ( state -> math_dir ) ; } else { state -> op_dir = reverse_direction ( state -> op_dir ) ; } if ( state -> last_is_zero ) { state -> active_ring = ( state -> active_ring == MATH_RING ? OPERATION_RING : MATH_RING ) ; } state -> last_is_zero = ! state -> last_is_zero ; emit_instruction ( segment , ' ' ) ; }
Adds a 0 instruction to the current code segment, and update the current
ring state to account for it
Adds a 0 instruction to the current code segment and update the current ring state to account for it