On 3 November 2023 19:46:25 GMT, dan...@daniil.it wrote: >Nothing will change in that sense, the only difference is the addition of >compile-time autoloading and type checking. > >No preloading (in the sense of no opcache configuration needed), nothing >special.
OK; just to explain the confusion, that's not what you were saying earlier: > I was actually thinking of enabling these compile-time checks only if > preloading is enabled Cross-file analysis on demand would also be quite a big change though - changing one file would need to invalidate the entire cache, or recursively follow tracked dependencies, maybe re-running the autoloader for all those possible references. The ability for live changes to one file to cause compilation errors in another might also be confusing. That's why it's tied up in my mind with a native "module" concept - you could have some kind of isolation around a module that allowed preloading or cache invalidation at that level, rather than the extremes of one file or an entire application. >Not with function JIT, function JIT is the closest thing we currently have to >an AOT compiler in php Even function JIT will select which functions to compile based on what's executed frequently. It can also have certain types of function or operation it can't compile, or would produce worse performance for, so leaves them to the op code interpreter. I suppose you could "warm" the JIT in advance as part of preloading, but that seems to be mostly orthogonal to what we're talking about here in terms of static analysis. Regards, -- Rowan Tommins [IMSoP] -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php