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
2 changes: 1 addition & 1 deletion lib/JIT/Builtin/AssertOptionsRuntime.php
Original file line number Diff line number Diff line change
Expand Up @@ -374,8 +374,8 @@ private static function implementCallbackOption(
$afterSetBb = $fn->appendBasicBlock('aopt_cb_after_set_'.(string) self::$blockSeq);
$context->builder->branchIf($isEmpty, $emptyBb, $copyBb);

$emptyStr = self::literalEmptyString($context);
$context->builder->positionAtEnd($emptyBb);
$emptyStr = self::literalEmptyString($context);
$context->builder->call(self::lookupHelper($context, self::SET_CALLBACK), $emptyStr);
$context->builder->branch($afterSetBb);

Expand Down
6 changes: 2 additions & 4 deletions test/aot/AotTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,8 @@ public static function providePHPTests(): \Generator
&& (str_contains($name, 'str_increment') || str_contains($name, 'str_decrement'))) {
continue;
}
// Pipe operator AOT: compile segfault pre-existing (#4456); VM + JIT desugar path green (#7219).
if (str_contains($name, 'pipe_operator')) {
continue;
}
// Pipe operator AOT: enabled after AssertOptionsRuntime CFG fix (#9750).
// Concat-on-LHS (`"a" . "b" |> f`) remains VM/JIT-only until inline concat-in-call AOT lands.
yield $name => $case;
}
}
Expand Down
4 changes: 2 additions & 2 deletions test/fixtures/aot/cases/pipe_operator.phpt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
--TEST--
PHP 8.4 pipe operator with first-class callable (AOT, #4456)
PHP 8.4 pipe operator with first-class callable (AOT, #4456, #9750)
--FILE--
<?php
echo "hi" |> strtoupper(...);
echo "\n";
echo "a" . "b" |> strtoupper(...);
echo "ab" |> strtoupper(...);
echo "\n";
echo "hi" |> strtoupper(...) |> strlen(...);
--EXPECT--
Expand Down