文件
Paze AI a3dfe7cb24 feat: 调试信息/优化验证/C23/JIT/VSIX 五项功能
1. -g 调试信息 (DWARF5)
   - config.h 启用 CONFIG_DWARF_VERSION 5
   - 生成 .debug_info/.debug_line/.debug_str 等现代调试节
   - 函数/变量/行号信息完整 (GDB/VS Code 可调试)

2. 代码优化器验证
   - 常量折叠: 2+3 → movl \ (编译期计算)
   - 死代码消除: if(0) 分支移除
   - 不可达代码: i>1000 分支消除
   - __OPTIMIZE__ 宏正确设置

3. C23 新特性 (-std=c2x/-std=c23)
   - __STDC_VERSION__ = 202311L
   - nullptr 关键字 + nullptr_t 类型
   - typeof 泛型 (已有 GNU 扩展)

4. libpcc JIT 演示 (examples/jit_demo.c)
   - 运行时编译 C 代码字符串
   - pcc_set_output_type(MEMORY) JIT 模式
   - 调用宿主函数/访问宿主变量
   - 验证: jit_run(10) 返回 55

5. VS Code 插件打包
   - 修复 package.json 结构 (contributes 嵌套)
   - 生成 pcc-language-support-0.1.0.vsix (5.9 KB)
   - 语法高亮 + 构建/运行命令
2026-08-16 15:43:37 +08:00
..
2026-08-16 14:15:26 +08:00
2026-08-16 14:15:26 +08:00
2026-08-16 14:15:26 +08:00
2026-08-16 14:15:26 +08:00
2026-08-16 14:15:26 +08:00

PCC C Language Support

C language support with Paze C Compiler (PCC) integration for Visual Studio Code.

Features

  • Syntax highlighting for C files (.c, .h)
  • Build current C file with PCC (Ctrl+Shift+B)
  • Build & Run current C file (Ctrl+F5)
  • Configurable pcc path, include/lib paths

Installation

From VSIX

  1. Run npx @vscode/vsce package in this directory to create the VSIX
  2. In VS Code: Extensions → ... → Install from VSIX → select the .vsix file

From source (development)

  1. Copy this directory to ~/.vscode/extensions/pcc-language-support
  2. Reload VS Code

Usage

Open a .c file, then:

Command Shortcut Description
PCC: Build Ctrl+Shift+B Compile to .exe next to source
PCC: Build & Run Ctrl+F5 Compile and run in terminal

Settings

Setting Description
pcc.executable Path to pcc.exe (empty = search PATH)
pcc.includePath Extra -I include directories
pcc.libPath Extra -L library directories
pcc.args Extra arguments passed to pcc
pcc.outputDir Output directory for exe (empty = source dir)

Requirements

License

MIT