- 将命令行参数配置提取到独立的配置文件 compiler_options.php - 添加新的调试选项包括 debug-line 和 force 参数 - 替换 var_dump 为 symfony/var-dumper 的 dump 函数 - 优化赋值表达式处理逻辑,改进 inAssignExpr 状态管理 - 修复返回语句中间接引用可能导致的内存安全问题 - 添加临时变量确保返回值的内存安全 - 重构属性访问解析方法,传入赋值状态参数 - 更新 composer 依赖,添加 symfony/var-dumper 支持 - 移除调试相关的 var_dump 输出语句 - 优化数组维度获取和属性访问的解析流程pull/1/head
parent
3931d77ceb
commit
c7c375019d
6 changed files with 275 additions and 153 deletions
@ -0,0 +1,5 @@ |
||||
<?php |
||||
$a = new ArrayObject(); |
||||
|
||||
$a['nanme'] = 1; |
||||
var_dump($a); |
||||
@ -0,0 +1,54 @@ |
||||
<?php |
||||
return [ |
||||
'optimize' => [ |
||||
'prefix' => 'O', |
||||
'longPrefix' => 'optimize', |
||||
'description' => 'Set the optimization level of the gcc compiler to 0 by default', |
||||
'required' => false, |
||||
'castTo' => 'int', |
||||
'defaultValue' => 0, |
||||
], |
||||
'output' => [ |
||||
'prefix' => 'o', |
||||
'longPrefix' => 'output', |
||||
'description' => 'Output file', |
||||
], |
||||
'help' => [ |
||||
'prefix' => 'h', |
||||
'longPrefix' => 'help', |
||||
'description' => 'Show help', |
||||
'noValue' => true, |
||||
], |
||||
'profile' => [ |
||||
'longPrefix' => 'profile', |
||||
'description' => 'Enable performance profiling', |
||||
'required' => false, |
||||
'noValue' => true, |
||||
], |
||||
'noLiteralStrings' => [ |
||||
'longPrefix' => 'no-literal-strings', |
||||
'description' => 'Disable literal strings optimization', |
||||
'required' => false, |
||||
'noValue' => true, |
||||
], |
||||
'force' => [ |
||||
'prefix' => 'f', |
||||
'longPrefix' => 'force', |
||||
'description' => 'Force compile even if cache exists', |
||||
'required' => false, |
||||
'noValue' => true, |
||||
], |
||||
'mode' => [ |
||||
'longPrefix' => 'mode', |
||||
'prefix' => 'm', |
||||
'description' => 'Build mode, -m bin(binary) or -m ext(extension), default: bin', |
||||
'required' => false, |
||||
'defaultValue' => 'bin', |
||||
], |
||||
'debug-line' => [ |
||||
'longPrefix' => 'debug-line', |
||||
'description' => 'Enable debug line', |
||||
'required' => false, |
||||
'defaultValue' => 0, |
||||
], |
||||
]; |
||||
Loading…
Reference in new issue