文件
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

126 行
3.5 KiB
JSON

{
"name": "pcc-language-support",
"displayName": "PCC C Language Support",
"description": "C language support with Paze C Compiler (PCC) integration - syntax highlighting, build and run",
"version": "0.1.0",
"publisher": "PazeAI",
"license": "MIT",
"engines": {
"vscode": "^1.60.0"
},
"categories": [
"Programming Languages"
],
"keywords": [
"C",
"pcc",
"compiler",
"Paze"
],
"main": "./extension.js",
"activationEvents": [
"onCommand:pcc.build",
"onCommand:pcc.run"
],
"contributes": {
"languages": [
{
"id": "c",
"aliases": [
"C",
"c"
],
"extensions": [
".c",
".h"
],
"configuration": "./language-configuration.json"
}
],
"grammars": [
{
"language": "c",
"scopeName": "source.c",
"path": "./syntaxes/c.json"
}
],
"configuration": {
"title": "PCC",
"properties": {
"pcc.executable": {
"type": "string",
"default": "",
"description": "Path to pcc executable. If empty, searches PATH."
},
"pcc.includePath": {
"type": "array",
"items": {
"type": "string"
},
"default": [],
"description": "Additional include paths (-I)."
},
"pcc.libPath": {
"type": "array",
"items": {
"type": "string"
},
"default": [],
"description": "Additional library paths (-L)."
},
"pcc.args": {
"type": "array",
"items": {
"type": "string"
},
"default": [],
"description": "Extra arguments passed to pcc."
},
"pcc.outputDir": {
"type": "string",
"default": "",
"description": "Output directory for compiled exe. Empty = same dir as source."
}
}
},
"commands": [
{
"command": "pcc.build",
"title": "PCC: Build",
"category": "PCC"
},
{
"command": "pcc.run",
"title": "PCC: Build & Run",
"category": "PCC"
}
],
"keybindings": [
{
"command": "pcc.build",
"key": "ctrl+shift+b",
"when": "editorLangId == c"
},
{
"command": "pcc.run",
"key": "ctrl+f5",
"when": "editorLangId == c"
}
],
"menus": {
"editor/title": [
{
"command": "pcc.build",
"when": "editorLangId == c",
"group": "navigation"
},
{
"command": "pcc.run",
"when": "editorLangId == c",
"group": "navigation"
}
]
}
}
}