NaifyView\Compiler\CompiledExpressionFastPathBuilder クラス

CompiledExpressionFastPathBuilder — compiled mainline の Compiled Expression Fast Path Builder

template を generated PHP class へ落とす compile pipeline の一部。 大きな compiler へ責務を押し込まず、source 生成・依存計画・fast path などを小さく分ける。

使用例

// Engine が warm-hit できない template を compiled artifact へ変換する時に使う。
// 通常は View / Engine 経由で呼ばれ、アプリ側から直接操作しない。

プロパティ

名前型説明
private $expressionEvaluator NaifyExpressionEvaluator top-level split / operator parse owner
private $filterFastPathBuilder CompiledExpressionFilterFastPathBuilder dot filter direct-call owner
private $operatorFastPathBuilder CompiledExpressionOperatorFastPathBuilder operator fast-path owner
private $literalFastPathBuilder CompiledExpressionLiteralFastPathBuilder literal fast-path owner
private $pathFastPathBuilder CompiledExpressionPathFastPathBuilder path fast-path owner
private $callFastPathBuilder CompiledExpressionCallFastPathBuilder call fast-path owner

メソッド

メソッド説明
public __construct(NaifyExpressionEvaluator $expressionEvaluator): void インスタンスを初期化する
public buildCompiledResolvedValueExpression(string $expression, string $scopeVar): string `buildCompiledResolvedValueExpression()` を実行する
private buildCompiledNormalizedValueExpression(string $expression, string $scopeVar): string Compile an already decoded subexpression without decoding its literals again.
public buildCompiledRenderedInterpolationExpression(string $expression, string $scopeVar): string `buildCompiledRenderedInterpolationExpression()` を実行する
public buildCompiledRenderedAttributeInterpolationExpression(string $expression, string $scopeVar): string `buildCompiledRenderedAttributeInterpolationExpression()` を実行する
private resolveCompiledFastValueExpression(string $expression, string $scopeVar): ?string `resolveCompiledFastValueExpression()` を実行する
private unwrapCompiledOuterParentheses(string $expression): string `unwrapCompiledOuterParentheses()` を実行する
private isCompiledWrappedByOuterParentheses(string $expression): bool `isCompiledWrappedByOuterParentheses()` かを返す
private buildCompiledFastOperandExpression(string $expression, string $scopeVar): ?string `buildCompiledFastOperandExpression()` を実行する
private resolveCompiledFastDotFilterChainExpression(string $expression, string $scopeVar): ?string `resolveCompiledFastDotFilterChainExpression()` を実行する
private resolveCompiledCallExpression(string $expression, string $scopeVar): ?string `resolveCompiledCallExpression()` を実行する
private findCompiledTrustedMethodPathStartOffset(string $expression): ?int `findCompiledTrustedMethodPathStartOffset()` を実行する
private buildCompiledSimpleDotPathSegments(string $pathSuffix): ?array `buildCompiledSimpleDotPathSegments()` を実行する
private resolveCompiledTrustedMethodPathExpression(string $expression, string $scopeVar): ?string `resolveCompiledTrustedMethodPathExpression()` を実行する
private buildCompiledCallArguments(string $argumentExpression, string $scopeVar): ?string `buildCompiledCallArguments()` を実行する
private resolveCompiledLiteralExpression(string $expression): ?string `resolveCompiledLiteralExpression()` を実行する
private resolveCompiledListLiteralExpression(string $expression, string $scopeVar): ?string `resolveCompiledListLiteralExpression()` を実行する
private resolveCompiledMapLiteralExpression(string $expression, string $scopeVar): ?string `resolveCompiledMapLiteralExpression()` を実行する
private resolveCompiledRangeExpression(string $expression, string $scopeVar): ?string `resolveCompiledRangeExpression()` を実行する
private resolveCompiledAttributeStringValueExpression(string $expression, string $scopeVar): ?string `resolveCompiledAttributeStringValueExpression()` を実行する
private resolveCompiledAttributeScalarLiteralExpression(string $expression): ?string `resolveCompiledAttributeScalarLiteralExpression()` を実行する
private resolveCompiledFastPathValueWithExistenceExpression(string $expression, string $scopeVar): ?string `resolveCompiledFastPathValueWithExistenceExpression()` を実行する
private isCompiledPurePathExpressionForOutput(string $expression): bool `isCompiledPurePathExpressionForOutput()` かを返す
private isCompiledEscapedCharacter(string $expression, int $index): bool `isCompiledEscapedCharacter()` かを返す
private resolveCompiledFastPathPlanExpression(string $expression, string $scopeVar): ?string `resolveCompiledFastPathPlanExpression()` を実行する
private findCompiledMatchingBracket(string $expression, int $startOffset): ?int `findCompiledMatchingBracket()` を実行する
private findCompiledMatchingParenthesis(string $expression, int $startOffset): ?int `findCompiledMatchingParenthesis()` を実行する
private findCompiledMatchingBrace(string $expression, int $startOffset): ?int `findCompiledMatchingBrace()` を実行する
private isEscapedCharacter(string $expression, int $index): bool `isEscapedCharacter()` かを返す
private buildCompiledMixedListLiteral(array $entries): string `buildCompiledMixedListLiteral()` を実行する