# New VM Architecture

- Thread: https://externals.io/message/13270
- Original archive: https://news-web.php.net/php.internals/13270
- Started by Andi Gutmans on 2004-10-12T00:43:17+00:00
- Messages: 1
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #13270 — Andi Gutmans — 2004-10-12T00:43:17+00:00

URL: https://externals.io/message/13270#13270

Due to popular demand, attached is an example of how the new VM 
architecture would be without the macro magic.
Basically, the zend_vm_gen.php script auto-generates the chosen VM 
architecture (goto/call/switch) and the user can also select if he wants to 
specialize opcodes and/or wants the generator to enable/disable 
preprocessor #line statements (for debugging it might be easier to not 
produce them so that you get to debug the actual code without macros).

It's not attached this time due to our annoying attachment filter :)

http://snaps.php.net/~andi/zend_vm_newgen.tar.gz

Please play around with it and send me feedback. We should pretty much 
decide what's preferred. The preprocessor stuff or this script. I think I 
favor the script even though the script itself has to be maintained, mainly 
because I think the preprocessor stuff was kind of hard to understand and 
mainly to debug. The auto-generated code will definitely be easier to debug 
as it won't have as many macros.

Andi
