fix(optimizer): preserve typed builtin argument validation - #18
Open
hafung wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
string,int,float,bool, orarrayvalue still needs PHP's parameter validationInvariant
An optimizer must not erase the runtime zval type before an internal function has applied its parameter contract. A direct ABI call is valid only when the compiler proves that its conversion has the same accepted/rejected behavior as Zend; otherwise all arguments remain on the ordered
php::call()path.This fixes strict calls such as a
mixedvalue passed toin_array()'s boolean parameter being coerced by generated C++ instead of raising the sameTypeErroras Zend.Coverage
string,int,float,bool, andarrayABI parametersarray_keys,array_key_exists,round,count,define, andfunction_exists)round(), and nativeCountablepaths remain optimizedVerification
array_keys, lookup calls,func_get_arg, Decimalround,count(Countable), and internal-interface coverage)bindec()deprecations and Windows path separators)The full PHPUnit suite was also attempted, but the current Windows run has unrelated existing failures and terminates on a Linux-only
profilefixture, so it is not claimed as passing. Remote CI and non-MSVC native artifacts were not run locally.