test(analysis): 添加SSA分析相关组件的单元测试

- 添加SsaFlags常量值的测试验证
- 添加SsaVar对象创建和默认值的测试
- 添加PiConstraint约束条件的测试用例
- 添加SsaBlock基本块结构的测试验证
- 添加VarState变量状态管理的测试
- 添加SsaBuilder构造器基础功能测试
- 添加控制流图CFG构建的测试用例
- 添加goto语句和标签处理的测试
- 添加类型约束构建buildPiConstraints的测试
- 添加
pull/1/head
韩天峰 3 months ago
parent de50cad4a8
commit cdd0b05bf7
  1. 1078
      phpunit/src/SsaAnalysisTest.php
  2. 10
      src/Php/Optimizer/SsaPropOptimizer.php
  3. 2
      version.txt

File diff suppressed because it is too large Load Diff

@ -144,12 +144,14 @@ trait SsaPropOptimizer
if ($expr instanceof Expr\New_) {
if ($expr->class instanceof Node\Name) {
$className = $expr->class->toString();
if ($className === 'self' || $className === 'static') {
if ($className === 'self') {
if ($this->classDef) {
$className = $this->classDef->getFullName();
} else {
return null;
return $this->getFullClassName();
}
return null;
}
if ($className === 'static') {
return null;
}
return $this->getNamespacedClassName($className);
}

@ -1 +1 @@
1060
1061

Loading…
Cancel
Save