Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
230 changes: 115 additions & 115 deletions docs/bootstrap-inventory.md
Original file line number Diff line number Diff line change
Expand Up @@ -21120,123 +21120,123 @@ Rank live CFG gaps across inventory files: `php script/bootstrap-inventory-triag
- new Variable (line 12288)
- new Operand\Temporary (line 12290)
- new OpCode (line 12337)
- new Temporary (line 14819)
- new Operand\Temporary (line 27134)
- new Operand\Temporary (line 27139)
- new Operand\Temporary (line 27212)
- new Operand\Temporary (line 27217)
- new OpCode (line 27354)
- new OpCode (line 27429)
- new OpCode (line 27519)
- new OpCode (line 27605)
- new CfgVariable (line 29649)
- new Literal (line 29649)
- new Variable (line 29681)
- new Variable (line 29735)
- new OpCode (line 29764)
- new Operand\Temporary (line 30482)
- new OpCode (line 30484)
- new OpCode (line 30510)
- new OpCode (line 30526)
- new OpCode (line 30534)
- new OpCode (line 30541)
- new OpCode (line 30553)
- new OpCode (line 30570)
- new OpCode (line 30576)
- new OpCode (line 30582)
- new OpCode (line 30587)
- new OpCode (line 30603)
- new OpCode (line 30616)
- new Variable (line 30627)
- new Operand\Literal (line 30629)
- new OpCode (line 30632)
- new OpCode (line 30702)
- new OpCode (line 30713)
- new OpCode (line 30726)
- new OpCode (line 30900)
- new OpCode (line 31153)
- new OpCode (line 31159)
- new OpCode (line 31165)
- new OpCode (line 31190)
- new Variable (line 31217)
- new Temporary (line 31219)
- new Variable (line 31227)
- new Temporary (line 31229)
- new Temporary (line 14828)
- new Operand\Temporary (line 27190)
- new Operand\Temporary (line 27195)
- new Operand\Temporary (line 27268)
- new Operand\Temporary (line 27273)
- new OpCode (line 27410)
- new OpCode (line 27504)
- new OpCode (line 27594)
- new OpCode (line 27680)
- new CfgVariable (line 29733)
- new Literal (line 29733)
- new Variable (line 29765)
- new Variable (line 29819)
- new OpCode (line 29848)
- new Operand\Temporary (line 30566)
- new OpCode (line 30568)
- new OpCode (line 30594)
- new OpCode (line 30610)
- new OpCode (line 30618)
- new OpCode (line 30625)
- new OpCode (line 30637)
- new OpCode (line 30654)
- new OpCode (line 30660)
- new OpCode (line 30666)
- new OpCode (line 30671)
- new OpCode (line 30687)
- new OpCode (line 30700)
- new Variable (line 30711)
- new Operand\Literal (line 30713)
- new OpCode (line 30716)
- new OpCode (line 30786)
- new OpCode (line 30797)
- new OpCode (line 30810)
- new OpCode (line 30984)
- new OpCode (line 31237)
- new OpCode (line 31243)
- new OpCode (line 31249)
- new OpCode (line 31274)
- new Operand\Temporary (line 31294)
- new Operand\Temporary (line 31300)
- new Operand\Temporary (line 31306)
- new Operand\Temporary (line 31312)
- new Operand\Temporary (line 31321)
- new Operand\Temporary (line 33014)
- new Variable (line 33391)
- new Variable (line 33395)
- new Variable (line 33403)
- new Variable (line 33407)
- new Variable (line 33691)
- new OpCode (line 33739)
- new OpCode (line 33758)
- new OpCode (line 33800)
- new OpCode (line 33835)
- new OpCode (line 33853)
- new OpCode (line 33877)
- new OpCode (line 33909)
- new OpCode (line 33925)
- new OpCode (line 33943)
- new OpCode (line 33960)
- new OpCode (line 33974)
- new OpCode (line 33996)
- new OpCode (line 34018)
- new Variable (line 31301)
- new Temporary (line 31303)
- new Variable (line 31311)
- new Temporary (line 31313)
- new OpCode (line 31358)
- new Operand\Temporary (line 31378)
- new Operand\Temporary (line 31384)
- new Operand\Temporary (line 31390)
- new Operand\Temporary (line 31396)
- new Operand\Temporary (line 31405)
- new Operand\Temporary (line 33098)
- new Variable (line 33475)
- new Variable (line 33479)
- new Variable (line 33487)
- new Variable (line 33491)
- new Variable (line 33775)
- new OpCode (line 33823)
- new OpCode (line 33842)
- new OpCode (line 33884)
- new OpCode (line 33919)
- new OpCode (line 33937)
- new OpCode (line 33970)
- new OpCode (line 34011)
- new OpCode (line 34027)
- new OpCode (line 34046)
- new OpCode (line 34123)
- new OpCode (line 34144)
- new OpCode (line 34161)
- new OpCode (line 34207)
- new OpCode (line 34312)
- new OpCode (line 34351)
- new OpCode (line 34429)
- new OpCode (line 34463)
- new OpCode (line 34514)
- new Operand\Temporary (line 36096)
- new Operand\Temporary (line 36578)
- new Operand\Temporary (line 36764)
- new Operand\Temporary (line 36796)
- new Operand\Temporary (line 36892)
- new Operand\Temporary (line 37014)
- new OpCode (line 37016)
- new OpCode (line 38202)
- new Operand\Temporary (line 38660)
- new OpCode (line 39184)
- new Operand\Literal (line 39476)
- new Variable (line 39478)
- new OpCode (line 39524)
- new OpCode (line 39739)
- new OpCode (line 39749)
- new OpCode (line 39752)
- new Operand\Temporary (line 39790)
- new OpCode (line 39792)
- new OpCode (line 39803)
- new Operand\Temporary (line 39806)
- new OpCode (line 39808)
- new OpCode (line 39816)
- new OpCode (line 39823)
- new OpCode (line 39831)
- new OpCode (line 39834)
- new OpCode (line 39861)
- new OpCode (line 39884)
- new OpCode (line 39901)
- new OpCode (line 39908)
- new Operand\Literal (line 40587)
- new OpCode (line 41161)
- new Literal (line 41193)
- new OpCode (line 41292)
- new Variable (line 41299)
- new Temporary (line 41301)
- new OpCode (line 41304)
- new CompileFatal (line 41617)
- new CompileFatal (line 41872)
- 901 class method(s)
- new OpCode (line 34045)
- new OpCode (line 34062)
- new OpCode (line 34076)
- new OpCode (line 34098)
- new OpCode (line 34120)
- new OpCode (line 34129)
- new OpCode (line 34148)
- new OpCode (line 34225)
- new OpCode (line 34246)
- new OpCode (line 34263)
- new OpCode (line 34309)
- new OpCode (line 34414)
- new OpCode (line 34453)
- new OpCode (line 34531)
- new OpCode (line 34570)
- new OpCode (line 34621)
- new Operand\Temporary (line 36203)
- new Operand\Temporary (line 36685)
- new Operand\Temporary (line 36871)
- new Operand\Temporary (line 36903)
- new Operand\Temporary (line 36999)
- new Operand\Temporary (line 37121)
- new OpCode (line 37123)
- new OpCode (line 38309)
- new Operand\Temporary (line 38767)
- new OpCode (line 39291)
- new Operand\Literal (line 39583)
- new Variable (line 39585)
- new OpCode (line 39631)
- new OpCode (line 39846)
- new OpCode (line 39856)
- new OpCode (line 39859)
- new Operand\Temporary (line 39897)
- new OpCode (line 39899)
- new OpCode (line 39910)
- new Operand\Temporary (line 39913)
- new OpCode (line 39915)
- new OpCode (line 39923)
- new OpCode (line 39930)
- new OpCode (line 39938)
- new OpCode (line 39941)
- new OpCode (line 39968)
- new OpCode (line 39991)
- new OpCode (line 40008)
- new OpCode (line 40015)
- new Operand\Literal (line 40694)
- new OpCode (line 41268)
- new Literal (line 41300)
- new OpCode (line 41399)
- new Variable (line 41406)
- new Temporary (line 41408)
- new OpCode (line 41411)
- new CompileFatal (line 41724)
- new CompileFatal (line 41979)
- 902 class method(s)
- 45 closure(s)

### `lib/Compiler/AbstractMethodVisibilityCheck.php`
Expand Down
10 changes: 8 additions & 2 deletions docs/bootstrap-profile.json
Original file line number Diff line number Diff line change
Expand Up @@ -687,6 +687,7 @@
"ext/standard/ChownJitHelper.php",
"ext/standard/ChunkSplitJitHelper.php",
"ext/standard/ClassExistsJitHelper.php",
"ext/standard/ClassUsesJitHelper.php",
"ext/standard/CliArgvJitHelper.php",
"ext/standard/ClockGettimeJitHelper.php",
"ext/standard/CloneWithJitHelper.php",
Expand Down Expand Up @@ -1306,9 +1307,11 @@
"ext/standard/PregQuoteJitHelper.php",
"ext/standard/PregReplacementExpand.php",
"ext/standard/PrintRJitHelper.php",
"ext/standard/ProcessExecCaptureNativeJitHelper.php",
"ext/standard/ProcessIdentityJitHelper.php",
"ext/standard/ProcessJitHelper.php",
"ext/standard/ProcessOpenJitHelper.php",
"ext/standard/ProcessPhpcRunCommandJitHelper.php",
"ext/standard/ProcessSlotJitHelper.php",
"ext/standard/ProgressJitHelper.php",
"ext/standard/PropertyExistsJitHelper.php",
Expand Down Expand Up @@ -2268,6 +2271,7 @@
"ext/standard/phpc_native_ht_set_string_at.php",
"ext/standard/phpc_native_ht_set_string_key.php",
"ext/standard/phpc_native_ht_set_string_key_ht.php",
"ext/standard/phpc_native_ht_set_string_key_long.php",
"ext/standard/phpc_run_command.php",
"ext/standard/phpc_weakref_null_slot.php",
"ext/standard/phpc_weakref_unset_map_key.php",
Expand Down Expand Up @@ -3076,6 +3080,7 @@
"lib/JIT/Builtin/StringChmod.php",
"lib/JIT/Builtin/StringChunkSplit.php",
"lib/JIT/Builtin/StringClassExists.php",
"lib/JIT/Builtin/StringClassUses.php",
"lib/JIT/Builtin/StringClockGettime.php",
"lib/JIT/Builtin/StringClockGettimeRuntime.php",
"lib/JIT/Builtin/StringConvertUu.php",
Expand Down Expand Up @@ -3540,6 +3545,7 @@
"lib/SwitchCommaCaseRewriter.php",
"lib/TraitMethodFunctionStatic.php",
"lib/TryCatchElseSyntaxRejector.php",
"lib/TypedFunctionStaticSyntaxRejector.php",
"lib/VM.php",
"lib/VM/AbstractPropertyHookCheck.php",
"lib/VM/ArrayAccessDimension.php",
Expand Down Expand Up @@ -4292,9 +4298,9 @@
"test/bootstrap-aot/lib_opcode/main.php"
],
"totals": {
"inventory_files": 4058,
"inventory_files": 4064,
"excluded": 0,
"eligible": 4058,
"eligible": 4064,
"aot_lint_targets": 113,
"aot_link_targets": 100,
"aot_link_lib_targets": 1
Expand Down
1 change: 1 addition & 0 deletions docs/capabilities.md
Original file line number Diff line number Diff line change
Expand Up @@ -582,6 +582,7 @@ Auto-generated by `script/capability-matrix.php`. Do not edit by hand.
| `phpc_native_ht_set_string_at` | yes | yes | yes | standard | |
| `phpc_native_ht_set_string_key` | yes | yes | yes | standard | |
| `phpc_native_ht_set_string_key_ht` | yes | yes | yes | standard | |
| `phpc_native_ht_set_string_key_long` | yes | yes | yes | standard | |
| `phpc_run_command` | yes | yes | yes | standard | |
| `phpc_weakref_null_slot` | yes | yes | yes | standard | |
| `phpc_weakref_unset_map_key` | yes | yes | yes | standard | |
Expand Down
9 changes: 5 additions & 4 deletions docs/pages/capability-comparison.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ <h1>PHP capability comparison</h1>
<div class="cap-summary">
<article>
<div>Language constructs</div>
<strong>80</strong> / 89 full (VM+JIT+AOT)
<p style="margin:0.35rem 0 0;font-size:0.88rem;color:var(--text-muted)">5 partial · 4 gaps</p>
<strong>81</strong> / 89 full (VM+JIT+AOT)
<p style="margin:0.35rem 0 0;font-size:0.88rem;color:var(--text-muted)">4 partial · 4 gaps</p>
</article>
<article>
<div>Stdlib builtins</div>
<strong>871</strong> / 900 full (VM+JIT+AOT)
<strong>872</strong> / 901 full (VM+JIT+AOT)
<p style="margin:0.35rem 0 0;font-size:0.88rem;color:var(--text-muted)">9 partial · 20 gaps</p>
</article>
<article>
Expand Down Expand Up @@ -163,7 +163,7 @@ <h2>Language constructs</h2>
<tr data-support="full"><td><code>readonly classes</code></td><td class="status-yes">yes</td><td class="status-yes">yes</td><td class="status-yes">yes</td><td class="status-yes">yes</td><td><a href="https://github.com/PurHur/php-compiler/issues/1360">#1360</a></td></tr>
<tr data-support="full"><td><code>readonly properties (per-property)</code></td><td class="status-yes">yes</td><td class="status-yes">yes</td><td class="status-yes">yes</td><td class="status-yes">yes</td><td><a href="https://github.com/PurHur/php-compiler/issues/3149">#3149</a></td></tr>
<tr data-support="full"><td><code>Property hooks (`get` / `set` on properties)</code></td><td class="status-yes">yes</td><td class="status-yes">yes</td><td class="status-yes">yes</td><td class="status-yes">yes</td><td><a href="https://github.com/PurHur/php-compiler/issues/3145">#3145</a></td></tr>
<tr data-support="partial"><td><code>PHP 8.4 asymmetric property visibility (private(set), protected(set), etc.)</code></td><td class="status-yes">yes</td><td class="status-yes">yes</td><td class="status-yes">yes</td><td class="status-no">no</td><td><a href="https://github.com/PurHur/php-compiler/issues/3165">#3165</a></td></tr>
<tr data-support="full"><td><code>PHP 8.4 asymmetric property visibility (private(set), protected(set), etc.)</code></td><td class="status-yes">yes</td><td class="status-yes">yes</td><td class="status-yes">yes</td><td class="status-yes">yes</td><td><a href="https://github.com/PurHur/php-compiler/issues/3165">#3165</a></td></tr>
<tr data-support="full"><td><code>User __destruct()</code></td><td class="status-yes">yes</td><td class="status-yes">yes</td><td class="status-yes">yes</td><td class="status-yes">yes</td><td><a href="https://github.com/PurHur/php-compiler/issues/4096">#4096</a></td></tr>
<tr data-support="full"><td><code>PHP 8 attributes — `ReflectionClass` / `ReflectionMethod` metadata</code></td><td class="status-yes">yes</td><td class="status-yes">yes</td><td class="status-yes">yes</td><td class="status-yes">yes</td><td><a href="https://github.com/PurHur/php-compiler/issues/1936">#1936</a></td></tr>
<tr data-support="full"><td><code>WeakReference / WeakMap</code></td><td class="status-yes">yes</td><td class="status-yes">yes</td><td class="status-yes">yes</td><td class="status-yes">yes</td><td><a href="https://github.com/PurHur/php-compiler/issues/3667">#3667</a></td></tr>
Expand Down Expand Up @@ -761,6 +761,7 @@ <h2>Stdlib builtins</h2>
<tr data-support="full"><td><code>`phpc_native_ht_set_string_at`</code></td><td class="status-yes">yes</td><td class="status-yes">yes</td><td class="status-yes">yes</td><td class="status-yes">yes</td><td>—</td></tr>
<tr data-support="full"><td><code>`phpc_native_ht_set_string_key`</code></td><td class="status-yes">yes</td><td class="status-yes">yes</td><td class="status-yes">yes</td><td class="status-yes">yes</td><td>—</td></tr>
<tr data-support="full"><td><code>`phpc_native_ht_set_string_key_ht`</code></td><td class="status-yes">yes</td><td class="status-yes">yes</td><td class="status-yes">yes</td><td class="status-yes">yes</td><td>—</td></tr>
<tr data-support="full"><td><code>`phpc_native_ht_set_string_key_long`</code></td><td class="status-yes">yes</td><td class="status-yes">yes</td><td class="status-yes">yes</td><td class="status-yes">yes</td><td>—</td></tr>
<tr data-support="full"><td><code>`phpc_run_command`</code></td><td class="status-yes">yes</td><td class="status-yes">yes</td><td class="status-yes">yes</td><td class="status-yes">yes</td><td>—</td></tr>
<tr data-support="full"><td><code>`phpc_weakref_null_slot`</code></td><td class="status-yes">yes</td><td class="status-yes">yes</td><td class="status-yes">yes</td><td class="status-yes">yes</td><td>—</td></tr>
<tr data-support="full"><td><code>`phpc_weakref_unset_map_key`</code></td><td class="status-yes">yes</td><td class="status-yes">yes</td><td class="status-yes">yes</td><td class="status-yes">yes</td><td>—</td></tr>
Expand Down
17 changes: 17 additions & 0 deletions script/capability-syntax-lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,7 @@ function syntaxRowDefinitions(): array
],
[
'id' => 'typed_function_static',
'profile' => '8.3',
'construct' => 'PHP 8.3+ typed function-local static (`static T $var`)',
'opcodes' => ['TYPE_DECLARE_FUNCTION_STATIC', 'TYPE_ASSIGN'],
'issue' => 9998,
Expand Down Expand Up @@ -821,6 +822,7 @@ function syntaxRowDefinitions(): array
],
[
'id' => 'asymmetric_visibility',
'profile' => '8.4',
'construct' => 'PHP 8.4 asymmetric property visibility (private(set), protected(set), etc.)',
'opcodes' => ['TYPE_DECLARE_PROPERTY', 'TYPE_PROPERTY_FETCH', 'TYPE_ASSIGN'],
'issue' => 3165,
Expand Down Expand Up @@ -977,6 +979,16 @@ function collectSyntaxCapabilities(string $root, array $definitions, array $hand
$rows = [];

foreach ($definitions as $def) {
// Profile-gated features (typed statics 8.3+, asymmetric visibility
// 8.4) parse-fail on the bare 8.4.0-dev reference profile since the
// function_exists/reference gating tightened; probe them under the
// profile they target, then restore (#16508).
$probeProfile = $def['profile'] ?? null;
$prevProfile = null;
if (null !== $probeProfile) {
$prevProfile = getenv('PHP_COMPILER_PROFILE');
putenv('PHP_COMPILER_PROFILE=' . $probeProfile);
}
$opcodeDriven = $def['opcodes'] !== [];
$vm = $opcodeDriven
? opcodesSupported($handlers['vm'], $def['opcodes'])
Expand All @@ -995,6 +1007,11 @@ function collectSyntaxCapabilities(string $root, array $definitions, array $hand
} else {
$aot = $jit;
}
if (null !== $probeProfile) {
putenv(false === $prevProfile || '' === $prevProfile
? 'PHP_COMPILER_PROFILE'
: 'PHP_COMPILER_PROFILE=' . $prevProfile);
}
$notes = $def['notes'];
foreach ($phpt[$def['id']] ?? [] as $tag) {
$notes[] = $tag;
Expand Down
Loading
Loading