Serendipity
c8da286d31
feat: in/out 参数 — out 关键字引用传递
fn swap(out x: i64, out y: i64) 声明 out 参数,codegen 层面
函数签名变为 T* 指针,调用点自动传 &variable 地址。
in 是默认行为(值传递),无需显式标注。
Token → Parser → Sema → Codegen 全流水线:
- TOK_OUT + "out" 关键字注册
- AST parameter.is_out 字段
- parse_function 解析 out 前缀
- Sema: out 参数注册为 SYM_VARIABLE+is_mut(可赋值)
- Codegen: LLVM 函数签名使用 T*,调用点传 alloca
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-07 14:45:38 +08:00
..
2026-06-05 00:26:59 +08:00
2026-06-05 00:26:59 +08:00
2026-06-05 00:26:59 +08:00
2026-06-05 00:26:59 +08:00
2026-06-05 00:26:59 +08:00
2026-06-05 19:47:00 +08:00
2026-06-05 00:47:53 +08:00
2026-06-05 02:36:23 +08:00
2026-06-05 19:47:00 +08:00
2026-06-05 19:44:26 +08:00
2026-06-05 19:44:26 +08:00
2026-06-05 12:21:22 +08:00
2026-06-05 12:21:22 +08:00
2026-06-05 13:29:31 +08:00
2026-06-05 13:54:58 +08:00
2026-06-05 13:54:58 +08:00
2026-06-05 14:01:47 +08:00
2026-06-05 19:48:56 +08:00
2026-06-05 19:50:40 +08:00
2026-06-05 14:41:52 +08:00
2026-06-05 14:41:52 +08:00
2026-06-05 14:41:52 +08:00
2026-06-05 14:41:52 +08:00
2026-06-05 19:48:56 +08:00
2026-06-05 20:47:44 +08:00
2026-06-05 20:49:03 +08:00
2026-06-05 20:54:58 +08:00
2026-06-05 20:59:00 +08:00
2026-06-05 20:59:00 +08:00
2026-06-06 13:52:36 +08:00
2026-06-06 14:21:43 +08:00
2026-06-06 15:20:34 +08:00
2026-06-06 16:09:30 +08:00
2026-06-06 16:17:15 +08:00
2026-06-06 16:41:21 +08:00
2026-06-06 17:09:28 +08:00
2026-06-07 12:53:18 +08:00
2026-06-07 13:51:10 +08:00
2026-06-07 13:58:54 +08:00
2026-06-07 14:07:13 +08:00
2026-06-07 14:13:09 +08:00
2026-06-07 14:45:38 +08:00
2026-06-07 14:45:38 +08:00
2026-06-06 16:09:30 +08:00