The Phix VM provides the infrastructure needed to run Phix applications.
For example, in PHP, this is totally valid:
include_once("somefile.php");
Now in almost all cases we have to defer this until runtime - but when we do, something needs to locate the file on the file system, compile it, relocate the symbols in it, and then feed back into the JIT or interpreter.
The VM also provides the API for exporting Reflection information, which is then used by the type and security framework.
The byte code verifier and Security framework are both part of the VM.
Phix tries to convert as much as possible within PHP to static code at the semantic analysis/SSA stages, as we can often infer a type from it’s use.
However, this can only be done outside of the global scope (i.e, within functions), where we can be a lot more knowledgeable about a variables use and it’s lifetime, as well as anything modifying it that should not be.
However, because a variables that are never even seen in source may be referred to, and because we never know wha tis goign to be refered to in included files, we need to always keep a map of global symbol lookups.
See internals for how we actually implement this.