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
[EMAIL PROTECTED] http://www.zend.com/
(408)253-8829 MSN: [EMAIL PROTECTED]
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php