Repository navigation
M3 emit-TU: restore Runtime spine pre-lower + RuntimeEmitTuInit (#2552) - #2562
Merged
Merged
Conversation
Wire bootstrap-m3-emit-tu-execute.sh to PHP_COMPILER_M3_COMPILE_DRIVER, add RuntimeEmitTuInit (C-floor initVmContext + init* calls), fix spine symbol naming to phpcompiler\runtime::*, and pre-lower init methods from declare_class blocks. Emit helper links and runs without segfault; native parseAndCompile still returns null (phase=parseAndCompile) — next: bind real parse/compileEmitSmoke lowering in emit TU. Co-authored-by: Cursor <cursoragent@cursor.com>
Re-add compileM3EmitTuRuntimeMethodFromModules (lib/Runtime.php fallback), RuntimeEmitTuInit for emit-helper alloc, and register parseandcompile native decls before {main} emit IR. Default PHP_COMPILER_M3_COMPILE_DRIVER=1 in bootstrap-m3-emit-tu-execute.sh; fixes BootstrapRuntimeCompileSmokeTest regression on master.
Co-authored-by: Cursor <cursoragent@cursor.com>
2 of 3 tasks
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
compileM3EmitTuRuntimeSpineMethodsForRealLowering/compileM3EmitTuRuntimeMethodFromModules(withlib/Runtime.phpfallback) dropped during the Fix M3 emit-TU Runtime parse spine binding (#2550) #2557 merge — fixes failingBootstrapRuntimeCompileSmokeTestonmaster.RuntimeEmitTuInit,allocateEmitTuShellproperty defaults,phpcompiler\runtime::*spine mangling,make bootstrap-m3-emit-tu-execute, and defaultPHP_COMPILER_M3_COMPILE_DRIVER=1inbootstrap-m3-emit-tu-execute.sh.parseandcompilenative decls before{main}emit IR (avoids undefinedphpcompiler_runtime__parseandcompileat link).Gate status
vendor/bin/phpunit test/unit/BootstrapRuntimeCompileSmokeTest.php— greenbootstrap-m3-emit-tu-execute.sh— emit helper links with real lowering; execute still fails closed atphase=parseAndCompile(nativeRuntime::parsespine needs parser init follow-up; supersedes open M3 emit-TU: RuntimeEmitTuInit spine + execute gate wiring (#2552) #2558).Closes #2552 (spine wiring); tracks remaining execute green in #2442 / #2444.
Test plan
vendor/bin/phpunit test/unit/BootstrapRuntimeCompileSmokeTest.php./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && ./script/bootstrap-m3-emit-tu-execute.sh'(link OK; execute documentsparseAndCompilenull)Made with Cursor