# Patch for opcode caches

- Thread: https://externals.io/message/36079
- Original archive: https://news-web.php.net/php.internals/36079
- Started by Dmitry Stogov on 2008-03-10T12:48:05+00:00
- Messages: 2
- 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

---

## #36079 — Dmitry Stogov — 2008-03-10T12:48:05+00:00

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

Hi Marcus,

> > […]

It was tested at least with Zend products and xcache.

> > […]

It is not a good argument to hide this from APC, eAccelerator and
xcache.

> > […]

You will able to test it with "make test" and new versions of
APC/eAccelerator/XCache ...
At least I tested it in this way without problems

> > […]

This is the description of the problem
http://www.mail-archive.com/internals@lists.php.net/msg32601.html
It is well known to all opcode cache weiters, but it is not possible to
solve it 100% correctly without ZE modification

> > […]
> apparently has a
> > […]

As I remember opcode cache was planned as a part of PHP-6, probably
there we will able to follow your suggestion, but for now I don't see
any reason to make PHP slowdown (without caches).

Thank you for patch review

1) CG(extended_info) was a boolean falg, CG(compiler_options) is a
bitset one bit of which represents old CG(extended_info)

2) Changes related to ZEND_ACC_IMPLEMENT_INTERFACES  fix unnecessary
zend_verify_abstarct_class() calls. (For some reason it might be called
twice for the same class)

3)  ZEND_COMPILE_OPTION_... is to long, but I can accept this and of
couse I'll add comments as you requested.

4) zend_vm_opcodes.h is autogenerated file, zend_vm_gen.php chenged the
indents  :)

5) I'll recheck the -e option. Probably I missied something there.

Thanks. Dmitry.

> > […]
> ===================================================================
> > […]
> 1.308.2.12.2.35.2.9
> > […]
> information in the 
> > […]
> ===================================================================
> > […]
> ZEND_ACC_IMPLICIT_ABSTRACT_CLASS && ce- 
> > […]
> ZEND_ACC_IMPLEMENT_INTERFACES)) 
> > […]
> ZEND_ACC_IMPLEMENT_INTERFACES) {
> > […]
> need it for
> > […]
> ===================================================================
> > […]
> Either way, 
> > […]
> names should
> > […]
> ===================================================================
> > […]
> with -uwp as 
> > […]
> ===================================================================
> > […]
> /* enable
> > […]
> ===================================================================
> > […]
> output */
> > […]
> ===================================================================
> > […]
> output */
> > […]

---

## #36126 — Marcus Boerger — 2008-03-13T18:27:27+00:00

URL: https://externals.io/message/36079#36126 · In reply to: #36079

Hello Dmitry,

Monday, March 10, 2008, 1:48:05 PM, you wrote:

> Hi Marcus,

> > […]

> It was tested at least with Zend products and xcache.

Good, I am just worried that we introduce different behavior. We should
just have one execution mode. Your change is better now having a more
detailed view on what it does. But I think we should not have the old model
as well.

> > […]

> It is not a good argument to hide this from APC, eAccelerator and
> xcache.

> > […]

> You will able to test it with "make test" and new versions of
> APC/eAccelerator/XCache ...
> At least I tested it in this way without problems

But the majority of people cannot unless we bundle one of those. So all we
normal people get is an increased ability of errors.

> 2) Changes related to ZEND_ACC_IMPLEMENT_INTERFACES  fix unnecessary
> zend_verify_abstarct_class() calls. (For some reason it might be called
> twice for the same class)

good catch then

> 3)  ZEND_COMPILE_OPTION_... is to long, but I can accept this and of
> couse I'll add comments as you requested.

good :-)

> 4) zend_vm_opcodes.h is autogenerated file, zend_vm_gen.php chenged the
> indents  :)

ok

> 5) I'll recheck the -e option. Probably I missied something there.

I did not see -e in the list of allowed flags. So it cannot work.

Best regards,
 Marcus
