Fix AOT void method include with typed array property locals (#776)#793
Merged
Merged
Conversation
…es (#776). Wire include callee locals from caller VALUE boxes into dedicated string allocas, branch from the binding tail into the inlined body, and resolve caller names across nested include scopes. Add method_include_void_array_property PHPT and box native strings for __value__ native calls (header). Fixes Router render* pattern where config['app_name'] must reach template includes; full 003-MiniWebApp layout still needs nested superglobal follow-up. Co-authored-by: Cursor <cursoragent@cursor.com>
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
IncludeHelperso literal includes in void methods receive caller locals from typed array property fetches ($this->config['app_name']) by materializing__value__strings into callee__string__*allocas hoisted in the include entry block, branching from the binding tail into the inlined body, and resolving names across nested include scopes.copyFromPointerterminates the entry block early).__string__*actual arguments as__value__for native calls such asheader()(Native.php/Native.pre).method_include_void_array_propertyAOT PHPT (Router-shapedrender()+ layout include).Test plan
./vendor/bin/phpunit --filter method_include_void(bothmethod_include_voidandmethod_include_void_array_property)examples/003-MiniWebAppphpc build --projectstill hits LLVM module verify (Instruction does not dominate all uses) when compiling the realtemplates/layout.php(multiple callee locals + nested includes). Tracked for follow-up with AOT: MiniWebApp native binary CLI execute emits empty stdout (post-link) #764 / Testing: MiniWebAppAotExecuteTest CLI smoke (#485, #676 step 2) #747.Closes #776
Made with Cursor