Commit 03bb7b59
03bb7b5964afMerged
Yukihiro "Matz" Matsumoto <[email protected]> · 8 months ago · 1 file · ~1 modified
Description
style: fix remaining } else { in generated GC and gsub code
Two emit_raw strings in emit.c still had "} else {" on one line. Split to "}\n" + "else {" for consistent generated code style.
Co-Authored-By: Claude Opus 4.6 (1M context) [email protected]
Details
- Commit
- 03bb7b5964af
- Parent
- 1dd6a2db58f7
src/emit.cmodifiedView file
@@ -1313,7 +1313,8 @@
13131313
emit_raw(ctx, " if (strncmp(s, from, fl) == 0) {\n");13141314
emit_raw(ctx, " if (ri + tl >= cap) { cap = (ri + tl) * 2; r = (char *)realloc(r, cap); }\n");13151315
emit_raw(ctx, " memcpy(r + ri, to, tl); ri += tl; s += fl;\n");1316-
emit_raw(ctx, " } else {\n");1316+
emit_raw(ctx, " }\n");1317+
emit_raw(ctx, " else {\n");13171318
emit_raw(ctx, " if (ri + 1 >= cap) { cap *= 2; r = (char *)realloc(r, cap); }\n");13181319
emit_raw(ctx, " r[ri++] = *s++;\n");13191320
emit_raw(ctx, " }\n");@@ -1777,7 +1778,8 @@
17771778
emit_raw(ctx, " *pp = h->next;\n");17781779
emit_raw(ctx, " if (h->finalize) h->finalize((char *)h + sizeof(sp_gc_hdr));\n");17791780
emit_raw(ctx, " free(h);\n");1780-
emit_raw(ctx, " } else {\n");1781+
emit_raw(ctx, " }\n");1782+
emit_raw(ctx, " else {\n");17811783
emit_raw(ctx, " h->marked = 0;\n");17821784
emit_raw(ctx, " sp_gc_bytes += sizeof(sp_gc_hdr); /* approximate */\n");17831785
emit_raw(ctx, " pp = &h->next;\n");