- Removed runtimeCheckedObjects array from FunctionContext - Eliminated requiresRuntimeObjectCheck method and related logic - Updated native method call resolution to skip runtime checks - Removed object validation before native method calls - Cleaned up type compatibility checks for object expressions - Removed property slot validation after unset operations - Updated SSA analysis to handle object unset scenarios differently - Modified translator to stop marking nullable objects for runtime checks - Removed typeCheckAllowsNull helper method - Updated tests to reflect new object handling behavior without runtime checkspull/47/head
parent
70927ee68a
commit
cb03570212
12 changed files with 85 additions and 58 deletions
@ -0,0 +1,27 @@ |
|||||||
|
<?php |
||||||
|
|
||||||
|
use native_types; |
||||||
|
|
||||||
|
class NativeMethodUnsetKeepsOptimization |
||||||
|
{ |
||||||
|
public int $value = 7; |
||||||
|
|
||||||
|
public function read(): int |
||||||
|
{ |
||||||
|
return $this->value; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
function nativeMethodUnsetKeepsOptimization(int $branch): int |
||||||
|
{ |
||||||
|
$object = new NativeMethodUnsetKeepsOptimization(); |
||||||
|
if ($branch === 1) { |
||||||
|
unset($object); |
||||||
|
} elseif ($branch === 2) { |
||||||
|
var_dump($object->value); |
||||||
|
} else { |
||||||
|
var_dump($object->value); |
||||||
|
} |
||||||
|
|
||||||
|
return $object->read(); |
||||||
|
} |
||||||
Loading…
Reference in new issue