From a3e4c6942f8088a34bb4b4fcf2ccfb4986c310cf Mon Sep 17 00:00:00 2001 From: Hojun-Cho Date: Thu, 21 May 2026 03:26:23 +0900 Subject: [PATCH] =?UTF-8?q?selfhost/cmd/wcc/check.ww:=20arenau64tos=20amal?= =?UTF-8?q?loc=20=E2=86=92=20alloc([],=2024)!=20(=CE=B1-9)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- selfhost/cmd/w6c/main.combined.ww | 4 ++-- selfhost/cmd/wcc/check.ww | 4 ++-- selfhost/cmd/wwdump/main.combined.ww | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/selfhost/cmd/w6c/main.combined.ww b/selfhost/cmd/w6c/main.combined.ww index 0597edff..e7dd5c31 100644 --- a/selfhost/cmd/w6c/main.combined.ww +++ b/selfhost/cmd/w6c/main.combined.ww @@ -7895,7 +7895,7 @@ fn astoffset(c: *checker, dot: *node) i64 = { // just for the AST printer, but set it for parity with the parser's // own literal-emit shape. fn arenau64tos(a: *arena, v: u64) str = { - let buf: *u8 = amalloc(a, 24u64): *u8; + let buf: []u8 = alloc([], 24u64)!; let i: i32 = 23; buf[i] = 0u8; if (v == 0u64) { i -= 1; buf[i] = 48u8; }; @@ -7906,7 +7906,7 @@ fn arenau64tos(a: *arena, v: u64) str = { n /= 10u64; }; let r: str; - r.ptr = buf + (i: u64); + r.ptr = buf.ptr + (i: u64); r.len = 23 - i; return r; }; diff --git a/selfhost/cmd/wcc/check.ww b/selfhost/cmd/wcc/check.ww index 7799ffa0..18e7dba1 100644 --- a/selfhost/cmd/wcc/check.ww +++ b/selfhost/cmd/wcc/check.ww @@ -839,7 +839,7 @@ fn astoffset(c: *checker, dot: *node) i64 = { // just for the AST printer, but set it for parity with the parser's // own literal-emit shape. fn arenau64tos(a: *arena, v: u64) str = { - let buf: *u8 = amalloc(a, 24u64): *u8; + let buf: []u8 = alloc([], 24u64)!; let i: i32 = 23; buf[i] = 0u8; if (v == 0u64) { i -= 1; buf[i] = 48u8; }; @@ -850,7 +850,7 @@ fn arenau64tos(a: *arena, v: u64) str = { n /= 10u64; }; let r: str; - r.ptr = buf + (i: u64); + r.ptr = buf.ptr + (i: u64); r.len = 23 - i; return r; }; diff --git a/selfhost/cmd/wwdump/main.combined.ww b/selfhost/cmd/wwdump/main.combined.ww index 24945ed5..63177bc8 100644 --- a/selfhost/cmd/wwdump/main.combined.ww +++ b/selfhost/cmd/wwdump/main.combined.ww @@ -7895,7 +7895,7 @@ fn astoffset(c: *checker, dot: *node) i64 = { // just for the AST printer, but set it for parity with the parser's // own literal-emit shape. fn arenau64tos(a: *arena, v: u64) str = { - let buf: *u8 = amalloc(a, 24u64): *u8; + let buf: []u8 = alloc([], 24u64)!; let i: i32 = 23; buf[i] = 0u8; if (v == 0u64) { i -= 1; buf[i] = 48u8; }; @@ -7906,7 +7906,7 @@ fn arenau64tos(a: *arena, v: u64) str = { n /= 10u64; }; let r: str; - r.ptr = buf + (i: u64); + r.ptr = buf.ptr + (i: u64); r.len = 23 - i; return r; };