NaifyView\Compiler\IrCompilePipeline クラス
IrCompilePipeline — compiled mainline の Ir Compile Pipeline
template を generated PHP class へ落とす compile pipeline の一部。 大きな compiler へ責務を押し込まず、source 生成・依存計画・fast path などを小さく分ける。
使用例
// Engine が warm-hit できない template を compiled artifact へ変換する時に使う。
// 通常は View / Engine 経由で呼ばれ、アプリ側から直接操作しない。
プロパティ
| 名前 | 型 | 説明 |
|---|---|---|
private
$parser
|
NaifyParser |
|
private
$templateSurfacePreflight
|
TemplateSurfacePreflight |
|
private
$templateSurfaceDocumentBuilder
|
CompiledTemplateSurfaceDocumentBuilder |
|
private
$documentLowerer
|
IrDocumentLowerer |
|
private
$astRebuilder
|
IrAstRebuilder |
|
private
$compiledArtifactCompiler
|
CompiledClassArtifactCompiler |
メソッド
| メソッド | 説明 |
|---|---|
public
__construct(CompiledClassArtifactCompiler $compiledArtifactCompiler, ?NaifyParser $parser, ?TemplateSurfacePreflight $templateSurfacePreflight, ?CompiledTemplateSurfaceDocumentBuilder $templateSurfaceDocumentBuilder, ?IrDocumentLowerer $documentLowerer, ?IrAstRebuilder $astRebuilder): void
|
インスタンスを初期化する |
public
compileTemplateArtifact(string $template, string $resolvedPath, string $mode = naify-compiled-class-ir, bool $forceCompile = false): CompiledClassArtifact
|
`compileTemplateArtifact()` を実行する |
public
compileIrDocumentArtifact(string $template, string $resolvedPath, string $templateSource, IrStructuredNode $document, string $mode = naify-compiled-class-ir-v1, bool $forceCompile = false, string $compileSurface = full-native, array $dependencyPlanOverrides = '...', array $dependencyPaths = '...'): CompiledClassArtifact
|
`compileIrDocumentArtifact()` を実行する |
public
probeIrDocumentArtifactCache(string $template, string $resolvedPath, string $mode = naify-compiled-class-ir-v1): ?CompiledClassArtifact
|
`probeIrDocumentArtifactCache()` を実行する |
private
summarizeIrDocument(IrStructuredNode $document): array
|
`summarizeIrDocument()` を実行する |
private
walkIrNode(IrNodeInterface $node, array $typeCounts, int $nodeCount, int $passthroughCount): void
|
`walkIrNode()` を実行する |