# Adding the generated files for GOTO/SWITCH VM to CVS

- Thread: https://externals.io/message/16775
- Original archive: https://news-web.php.net/php.internals/16775
- Started by Sebastian Bergmann on 2005-06-17T10:05:33+00:00
- Messages: 3
- 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

---

## #16775 — Sebastian Bergmann — 2005-06-17T10:05:33+00:00

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

It would be great (from a usability point) to add the generated files
 for all three (CALL, GOTO, SWITCH) VM models to CVS as

   zend_vm_opcodes_call.h
   zend_vm_execute_call.h
   zend_vm_opcodes_goto.h
   zend_vm_execute_goto.h
   zend_vm_opcodes_switch.h
   zend_vm_execute_switch.h

 and have the --with-zend-vm configure parameter choose the right pair.

 This way it will be possible to build GOTO and SWITCH without a working
 PHP interpreter available. It would also be consistent with the "have
 all generated files in CVS" rule.

 To make things easier with this new setup the zend_vm_gen.php script
 should be changed that it creates the above listed files by default.

-- 
Sebastian Bergmann                      http://www.sebastian-bergmann.de/
GnuPG Key: 0xB85B5D69 / 27A7 2B14 09E4 98CD 6277 0E5B 6867 C514 B85B 5D69

---

## #16776 — Jani Taskinen — 2005-06-17T10:17:10+00:00

URL: https://externals.io/message/16775#16776 · In reply to: #16775

Here's a patch to get the multiple versions:
     (totally untested!)

     http://www.php.net/~jani/patches/zend_multi_vm.patch

     I didn't want to change the generator that much, so
     if you want to generate all, just run it 3 times.
     Perhaps this could be a buildconf thing?

     --Jani



> It would be great (from a usability point) to add the generated files
> for all three (CALL, GOTO, SWITCH) VM models to CVS as
>
>   zend_vm_opcodes_call.h
>   zend_vm_execute_call.h
>   zend_vm_opcodes_goto.h
>   zend_vm_execute_goto.h
>   zend_vm_opcodes_switch.h
>   zend_vm_execute_switch.h
>
> and have the --with-zend-vm configure parameter choose the right pair.
>
> This way it will be possible to build GOTO and SWITCH without a working
> PHP interpreter available. It would also be consistent with the "have
> all generated files in CVS" rule.
>
> To make things easier with this new setup the zend_vm_gen.php script
> should be changed that it creates the above listed files by default.
>
>

-- 
Donate @ http://pecl.php.net/wishlist.php/sniper

---

## #16777 — Dmitry Stogov — 2005-06-17T10:17:13+00:00

URL: https://externals.io/message/16775#16777 · In reply to: #16775

Hi Sebastian,

I don't like generated files in CVS at all.
Having several copies can be a reason of lot of mistakes.

Right now you are able to make call-threaded PHP, then regenerate executor
and build another one.
I think it is possible to automat this process with PHP building system.

Old version of specialiser was implemented in C preprocessor and didn't
require generation at all.
But final executor was hard for debug.

Thanks. Dmitry.

> -----Original Message-----
> From: news [mailto:news@sea.gmane.org] On Behalf Of Sebastian Bergmann
> Sent: Friday, June 17, 2005 2:06 PM
> To: internals@lists.php.net
> Subject: [PHP-DEV] Adding the generated files for GOTO/SWITCH 
> VM to CVS
> 
> 
>  It would be great (from a usability point) to add the 
> generated files  for all three (CALL, GOTO, SWITCH) VM models 
> to CVS as
> 
>    zend_vm_opcodes_call.h
>    zend_vm_execute_call.h
>    zend_vm_opcodes_goto.h
>    zend_vm_execute_goto.h
>    zend_vm_opcodes_switch.h
>    zend_vm_execute_switch.h
> 
>  and have the --with-zend-vm configure parameter choose the 
> right pair.
> 
>  This way it will be possible to build GOTO and SWITCH 
> without a working  PHP interpreter available. It would also 
> be consistent with the "have  all generated files in CVS" rule.
> 
>  To make things easier with this new setup the 
> zend_vm_gen.php script  should be changed that it creates the 
> above listed files by default.
> 
> -- 
> Sebastian Bergmann                      
> http://www.sebastian-bergmann.de/
> GnuPG Key: 0xB85B5D69 / 27A7 2B14 09E4 98CD 6277 0E5B 6867 
> C514 B85B 5D69
