selfhost: drop snake_case locals in dyn/dynout/obj + w6a + cgen + ww driver

This commit is contained in:
2026-05-11 16:33:02 +09:00
parent c64e96cbd6
commit 97ca76d2bb
18 changed files with 1795 additions and 1795 deletions

View File

@@ -259,12 +259,12 @@ fn parseoperand(a: *asm_, p: *u8, offin: u64, n: u64, out: *aoperand) u64 = {
// number(REG) — possibly signed — or bare $NUM-less constant
let cur: u64 = off;
let is_num: bool = false;
let isnum: bool = false;
if (cur < n) {
if (p[cur] == 45u8) { is_num = true; }
else { if (p[cur] >= 48u8) { if (p[cur] <= 57u8) { is_num = true; }; }; };
if (p[cur] == 45u8) { isnum = true; }
else { if (p[cur] >= 48u8) { if (p[cur] <= 57u8) { isnum = true; }; }; };
};
if (is_num) {
if (isnum) {
let v: i64;
let used: u64;
v, used = parsenum(p + off, n - off);
@@ -392,11 +392,11 @@ export fn parse(a: *asm_) i32 = {
if (line[0u64] != 9u8) {
if (isidstart(line[i]: i32)) {
let q: u64 = i;
let scan_id: bool = true;
for (scan_id) {
if (q >= n) { scan_id = false; }
let scanid: bool = true;
for (scanid) {
if (q >= n) { scanid = false; }
else { if (isidcont(line[q]: i32)) { q += 1u64; }
else { scan_id = false; }; };
else { scanid = false; }; };
};
if (q < n) { if (line[q] == 58u8) { // ':'
let nm: str = dupstr(a.a, line + i, q - i);
@@ -441,26 +441,26 @@ export fn parse(a: *asm_) i32 = {
if (opc == A_TEXT) {
// TEXT name,$framesize — find first ',' as the end of name.
let q: u64 = r0;
let comma_pos: u64 = n;
let scan_t: bool = true;
for (scan_t) {
if (q >= n) { scan_t = false; }
else { if (line[q] == 44u8) { comma_pos = q; scan_t = false; }
let commapos: u64 = n;
let scant: bool = true;
for (scant) {
if (q >= n) { scant = false; }
else { if (line[q] == 44u8) { commapos = q; scant = false; }
else { q += 1u64; }; };
};
let to_op: *aoperand = pr.to;
to_op.atype = D_EXTERN;
to_op.asym = dupstr(a.a, line + r0, comma_pos - r0);
if (comma_pos < n) {
let p2: u64 = comma_pos + 1u64;
let toop: *aoperand = pr.to;
toop.atype = D_EXTERN;
toop.asym = dupstr(a.a, line + r0, commapos - r0);
if (commapos < n) {
let p2: u64 = commapos + 1u64;
p2 = skipws(line, p2, n);
if (p2 < n) { if (line[p2] == 36u8) { p2 += 1u64; }; };
let v: i64;
let used: u64;
v, used = parsenum(line + p2, n - p2);
let from_op: *aoperand = pr.from;
from_op.atype = D_CONST;
from_op.offset = v;
let fromop: *aoperand = pr.from;
fromop.atype = D_CONST;
fromop.offset = v;
};
a.line += 1; continue;
};
@@ -469,31 +469,31 @@ export fn parse(a: *asm_) i32 = {
// DATA name(SB),"escaped bytes" — find first '(' as end of name.
let q: u64 = r0;
let lparen: u64 = n;
let scan_d: bool = true;
for (scan_d) {
if (q >= n) { scan_d = false; }
else { if (line[q] == 40u8) { lparen = q; scan_d = false; }
let scand: bool = true;
for (scand) {
if (q >= n) { scand = false; }
else { if (line[q] == 40u8) { lparen = q; scand = false; }
else { q += 1u64; }; };
};
let to_op: *aoperand = pr.to;
to_op.atype = D_EXTERN;
to_op.asym = dupstr(a.a, line + r0, lparen - r0);
let toop: *aoperand = pr.to;
toop.atype = D_EXTERN;
toop.asym = dupstr(a.a, line + r0, lparen - r0);
// Skip past `(SB)` to land just after ')'.
let p2: u64 = lparen;
let scan_d2: bool = true;
for (scan_d2) {
if (p2 >= n) { scan_d2 = false; }
else { if (line[p2] == 41u8) { p2 += 1u64; scan_d2 = false; }
let scand2: bool = true;
for (scand2) {
if (p2 >= n) { scand2 = false; }
else { if (line[p2] == 41u8) { p2 += 1u64; scand2 = false; }
else { p2 += 1u64; }; };
};
// Skip ws / ',' / tab between `)` and the `"`.
let scan_d3: bool = true;
for (scan_d3) {
if (p2 >= n) { scan_d3 = false; }
let scand3: bool = true;
for (scand3) {
if (p2 >= n) { scand3 = false; }
else { if (line[p2] == 32u8) { p2 += 1u64; }
else { if (line[p2] == 44u8) { p2 += 1u64; }
else { if (line[p2] == 9u8) { p2 += 1u64; }
else { scan_d3 = false; }; }; }; };
else { scand3 = false; }; }; }; };
};
if (p2 >= n) { perr(a, "DATA missing payload"); a.line += 1; continue; };
if (line[p2] != 34u8) { perr(a, "DATA expects \"...\""); a.line += 1; continue; };