1
0
mirror of https://github.com/janet-lang/janet synced 2024-12-26 16:30:26 +00:00

Fix formating on master.

This commit is contained in:
Calvin Rose 2022-01-21 16:44:11 -06:00
parent 56357699cb
commit 46738825c0
2 changed files with 6 additions and 8 deletions

View File

@ -187,18 +187,16 @@ static int destructure(JanetCompiler *c,
janetc_emit_si(c, JOP_LOAD_INTEGER, argi, i, 0); janetc_emit_si(c, JOP_LOAD_INTEGER, argi, i, 0);
janetc_emit_ss(c, JOP_LENGTH, len, right, 0); janetc_emit_ss(c, JOP_LENGTH, len, right, 0);
// loop condition /* loop condition - reuse arg slot for the condition result */
// reuse arg slot for the condition result
int32_t label_loop_start = janetc_emit_sss(c, JOP_EQUALS, arg, argi, len, 0); int32_t label_loop_start = janetc_emit_sss(c, JOP_EQUALS, arg, argi, len, 0);
int32_t label_loop_cond_jump = janetc_emit_si(c, JOP_JUMP_IF, arg, 0, 0); int32_t label_loop_cond_jump = janetc_emit_si(c, JOP_JUMP_IF, arg, 0, 0);
// loop body /* loop body */
janetc_emit_sss(c, JOP_GET, arg, right, argi, 0); janetc_emit_sss(c, JOP_GET, arg, right, argi, 0);
janetc_emit_s(c, JOP_PUSH, arg, 0); janetc_emit_s(c, JOP_PUSH, arg, 0);
janetc_emit_ssi(c, JOP_ADD_IMMEDIATE, argi, argi, 1, 0); janetc_emit_ssi(c, JOP_ADD_IMMEDIATE, argi, argi, 1, 0);
// loop /* loop - jump back to the start of the loop */
// jump back to the start of the loop
int32_t label_loop_loop = janet_v_count(c->buffer); int32_t label_loop_loop = janet_v_count(c->buffer);
janetc_emit(c, JOP_JUMP); janetc_emit(c, JOP_JUMP);
int32_t label_loop_exit = janet_v_count(c->buffer); int32_t label_loop_exit = janet_v_count(c->buffer);