Re: RFC: Storing additional information for op_arrays

From: Date: Thu, 20 Sep 2007 18:39:27 +0000
Subject: Re: RFC: Storing additional information for op_arrays
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-32405@lists.php.net to get a copy of this message
The basic idea would be to add API functions like zend_op_array_add_data(key, data, size, flags) zend_op_array_remove_data()... zend_op_array_get_data, zend_op_array_get_all_data In the flags one could choose: Needs to be cached etc... Well and this will be stored in a datastructure that will just be pointed at by the op_array struct.
Some questions here: 1. Do I understand right that that this is supposed to be arbitrary length list of (void *, size) pairs? 2. If opcode cache gets just size, that means the data structure would have to be in some kind of serialized position-independent form - which most of C structures that use any kind of pointers aren't. 3. What happens with this if there's no bytecode cache? How the data is supposed to be retrieved from the cache? 4. How modifications are handled - i.e., if extension modifies the data, bytecode cache is supposed to be notified of the change, or the data is supposed to be immutable once created and cached? -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com

« previous php.internals (#32405) next »