refactor(ffi-linkage): Phase 6.3 — migrate std/ #foreign→extern
Pure source rename across 11 std modules (~60 sites): cli/core/fmt/fs/log/ net/kqueue/process/socket/thread/time/trace. All fn-decl markers — bare '#foreign;', '#foreign libc;'/'#foreign tlib;' (LIB ref), and '#foreign libc "csym";' (LIB+rename) → the same 'extern …' tail (extern carries the identical [LIB] ["csym"] axis). Plus 2 stale comment mentions (fmt/fs). No class forms in std. These modules ARE host-corpus-exercised, so the empty snapshot diff is direct validation. Suite green (647 corpus / 444 unit, 0 failed).
This commit is contained in:
@@ -50,11 +50,11 @@ spaces :: (n: i32) -> string {
|
||||
// `frame_at` returns the raw stored `u64`; `__trace_resolve_frame` turns it
|
||||
// into a `TraceFrame` — by reinterpreting the stamped `*TraceFrame` in compiled code, or
|
||||
// by resolving the packed `(func_id, span.start)` in the comptime interpreter.
|
||||
sx_trace_len :: () -> u32 #foreign;
|
||||
sx_trace_truncated :: () -> u32 #foreign;
|
||||
sx_trace_frame_at :: (i: u32) -> u64 #foreign;
|
||||
sx_trace_len :: () -> u32 extern;
|
||||
sx_trace_truncated :: () -> u32 extern;
|
||||
sx_trace_frame_at :: (i: u32) -> u64 extern;
|
||||
|
||||
write :: (fd: i32, buf: [*]u8, count: usize) -> isize #foreign libc;
|
||||
write :: (fd: i32, buf: [*]u8, count: usize) -> isize extern libc;
|
||||
|
||||
// Render the current trace buffer to a string (allocated from
|
||||
// context.allocator). Empty buffer → "" so callers can cheaply skip output.
|
||||
|
||||
Reference in New Issue
Block a user