命名参数调用完成后,快速销毁临时数组,减少内存占用时间

pull/1/head
韩天峰 4 months ago
parent ffa4ae8dae
commit cd3657ec05
  1. 3
      src/Php/CompilerBase.php

@ -3106,8 +3106,9 @@ class CompilerBase extends \PhpAot\Core\Translator
$array .= $tmpVar . '.set(' . $this->getLiteralString($k) . ', ' . $v . ');' . PHP_EOL;
}
$this->context->beforeStmtLines[] = $array;
$this->context->afterStmtLines[] = $tmpVar . '.unset();';
return '{' . implode(', ', $listArgs) . '}, ' . $tmpVar . '.array()';
return Symbol::argList() . '{' . implode(', ', $listArgs) . '}, ' . $tmpVar . '.array()';
}
protected function parseCallArgs(array $args, string $funcName = '', string $className = ''): string

Loading…
Cancel
Save