forked from ircmaxell/php-compiler
-
Notifications
You must be signed in to change notification settings - Fork 1
Language: throw expressions — JIT lowering (phase 2 of #3802) #4137
Copy link
Copy link
Closed
Labels
area:compilerCompiler / CFG / JITCompiler / CFG / JITarea:vmVirtual machineVirtual machineenhancementNew feature or requestNew feature or requestimplementation-readySpec complete: repro, php-src ref, done-when — safe for workers to claimSpec complete: repro, php-src ref, done-when — safe for workers to claimphase-2:languagePhase 2 – language featuresPhase 2 – language features
Description
Activity
Metadata
Metadata
Assignees
Labels
area:compilerCompiler / CFG / JITCompiler / CFG / JITarea:vmVirtual machineVirtual machineenhancementNew feature or requestNew feature or requestimplementation-readySpec complete: repro, php-src ref, done-when — safe for workers to claimSpec complete: repro, php-src ref, done-when — safe for workers to claimphase-2:languagePhase 2 – language featuresPhase 2 – language features
Category
languageProblem
#3802 delivered VM + compile lowering for
throwin expression context (?:,??, short-circuit).docs/capabilities-syntax.mdstill marks JIT = no for throw expressions.bin/jit.php/ self-host native emit must compile throw-expression CFG (TYPE_THROW from expression slots, no duplicate TYPE_NEW) or fall back with a documented gate.Related open: #4041 (AOT phase 2) — coordinate so JIT and AOT share the same throw-expression merge rules.
php-src reference
Zend/zend_compile.c—zend_compile_throwin expression contextZend/zend_ast.c—ZEND_AST_THROWaszend_ast_kind)Repro
xx(no VM fallback / no compile abort)Scope (this repo)
lib/Compiler.php—compileThrowExpression, fresh slots for?:/??(already VM)lib/JIT.php,lib/JIT/TypeReconstructor.php—Expr_Throw/ TYPE_THROW loweringlib/JIT/SelfHostBuiltinPolicy.php— remove throw-expression from MCJIT skip list if presenttest/compliance/cases/language/throw_expression.phpt(extend JIT execute),test/fixtures/aot/compile-only/throw_expression.phpscript/capability-syntax-lib.php— setjit => truewhen greenDone when
xunderbin/jit.phpwithout VM-only fallbackthrowon RHS of&&/||and nested??covered by compliance PHPTdocs/capabilities-syntax.mdthrow_expression row: JIT yes./script/ci-fast.sh --filter throw_expressiongreen (VM + JIT groups)Links