Commit Graph

696 Commits

Author SHA1 Message Date
Marcus Boerger
a389286b99 Set the params in the struct 2003-09-01 15:09:57 +00:00
Marcus Boerger
4506d4ea24 Don't repeat first const count(consts) time 2003-08-31 15:47:48 +00:00
Marcus Boerger
660c14e74a Beautify output 2003-08-31 15:30:13 +00:00
Marcus Boerger
4af0621036 Add reflection_parameters, patch by Timm Friebe 2003-08-31 15:06:54 +00:00
Marcus Boerger
8376b7eff7 Check whether we may access tat union 2003-08-31 11:21:30 +00:00
Marcus Boerger
ade319ac54 Using zend_spprintf should be faster here 2003-08-31 10:06:13 +00:00
Marcus Boerger
f1c92fa4c5 - Calling abstract methods should be a error for consistency reason.
- So in reflection_api we use the reflection_exception again.
2003-08-30 23:51:42 +00:00
Marcus Boerger
6c69b28790 fci.function_table & fci.function_name are not needed since we use zend_fcall_info_cache 2003-08-30 13:47:27 +00:00
Marcus Boerger
e679504861 Be precise 2003-08-30 13:38:23 +00:00
Marcus Boerger
49a538d054 Actually using fcc would be a good idea 2003-08-30 12:58:35 +00:00
Marcus Boerger
50040c8ae9 - Use zend_fcall_info_cache in invoke() to improve speed.
# This also fixes the problem with calling static methods.
2003-08-29 21:46:12 +00:00
Marcus Boerger
43836e97c5 Nuke unused variable
# I should have taken Timm's patch
2003-08-27 20:48:41 +00:00
Marcus Boerger
7f5196953c Fix reflection_class::newInstance() 2003-08-27 20:45:34 +00:00
Marcus Boerger
cec053f707 Don't identify alias'ed functions 2003-08-24 16:35:58 +00:00
Marcus Boerger
e44d0f526c Add dedicated reflection_exception 2003-08-24 15:07:54 +00:00
Marcus Boerger
669603f69d Make invoke() work 2003-08-24 12:07:13 +00:00
Marcus Boerger
96d4ac7a3f zend_parse_parameters 'O' works the way we need here 2003-08-24 11:34:01 +00:00
Marcus Boerger
418a7f980c Not needed 2003-08-24 11:28:53 +00:00
Marcus Boerger
bd07968bef - Add Reflection_Function::isAlias
- Use ZEND_ME/ZEND_METHOD
- Fix static entries
2003-08-24 11:11:55 +00:00
Marcus Boerger
c3d60fd7ff Allow zend_throw_exception() to also set the exception code 2003-08-23 19:48:52 +00:00
Marcus Boerger
5e77dc44dc Show ctor/dtor information and those don't return anything 2003-08-23 15:47:23 +00:00
Marcus Boerger
0e32aaa8c6 Add function 'zend_throw_exception(char *message, int duplicate TSRMLS_DC);'
to provide an easy way to throw exceptions for extension developers.
2003-08-21 23:32:13 +00:00
Marcus Boerger
717b5afe1d Fix warnings 2003-08-17 18:56:54 +00:00
Marcus Boerger
fe1a086d19 Simplify abstract method declaration 2003-08-16 20:46:22 +00:00
Zeev Suraski
92b4013e8d Try to put an end to the endless number of call_user_function variants.
zend_call_function() now takes a structure that should contain all of the
necessary information.  If further information is necessary in the future,
then we'll be able to add it without having to introduce a new function.

As for caching - the 2nd, optional argument is a struct that can hold all
of the information that's necessary to invoke the function, including its
handler, scope and object it operates on (if any).  Note that you may only
use a cache if the arguments you provide to zend_call_function() are
identical to the ones of the last call, except for the argument and return
value information.


The recently introduced fast_call_user_function() was removed

I fixed most of the places that used fast_call_user_function() to use caching
but there are still some that need to be fixed (XML and reflection)
2003-08-05 10:24:40 +00:00
Marcus Boerger
3597704c64 Add function/method parameter reflection 2003-08-04 19:37:08 +00:00
Zeev Suraski
f8bbafd604 ntroduce infrastructure for supplying information about arguments,
including:

- Whether or not to pass by ref (replaces the old arg_types, with arg_info)
- Argument name (for future use, maybe introspection)
- Class/Interface name (for type hints)
- If a class/interface name is available, whether to allow a null instance

Both user and builtin functions share the same data structures.

To declare a builtin function that expects its first arg to be an instance
of class 'Person', its second argument as a regular arg, and its third by
reference, use:

ZEND_BEGIN_ARG_INFO(my_func_arg_info, 0)
    ZEND_ARG_OBJ_INFO(0, someone, Person, 1)
    ZEND_ARG_PASS_INFO(0)
    ZEND_ARG_PASS_INFO(1)
ZEND_END_ARG_INFO();

and use my_func_arg_info as the arg_info parameter to the ZEND_FE() family
of macros.

The first arg to each ZEND_ARG_*() macro is whether or not to pass by ref.

The boolean arg to ZEND_BEGIN_ARG_INFO() tells the engine whether to treat
the arguments for which there's no explicit information as pass by reference
or not.
The boolean argument to ZEND_ARG_OBJ_INFO() (4th arg) is whether or not to allownull values.
2003-08-03 17:40:44 +00:00
Marcus Boerger
04c90c8738 Show interfaces 2003-08-02 14:22:18 +00:00
Sebastian Bergmann
786afb48cb Fix segfault. Patch by Timm Friebe <thekid@thekid.de>. 2003-07-23 04:02:26 +00:00
George Schlossnagle
600f72f7b4 should nt here 2003-07-20 20:16:07 +00:00
Marcus Boerger
cfe2eda4f6 Fix warnings and whitespace in output 2003-07-20 19:57:02 +00:00
Marcus Boerger
23da3057b9 Add support for instances in Reflection_Class.
# Thanks to Timm for the fast patch contained reply to my help request :-)))
2003-07-20 18:58:34 +00:00
George Schlossnagle
7c7de5eb3c removed references to smart_str, replaced with private string management
function.  When snprintf is integrated into the engine, string_printf
should be altered to use that.
2003-07-20 18:45:40 +00:00
George Schlossnagle
84f5e4870e more of Timm's implementation. 2003-07-20 15:42:42 +00:00
Sebastian Bergmann
c86b4d13e6 2 * TSRMLS_FETCH() -> 1 * TSRMLS_DC 2003-07-04 10:31:41 +00:00
George Schlossnagle
96b71d7f87 ws fix 2003-07-04 03:26:37 +00:00
George Schlossnagle
edf78b2141 win build fixes (Rob Richards) 2003-07-03 14:11:31 +00:00
George Schlossnagle
6a4c48be6f can't forget Andrei 2003-07-03 14:00:17 +00:00
George Schlossnagle
3d7283b94f more of Timm's patches, and mod authors line to give credit where credit is due. 2003-07-03 05:33:23 +00:00
George Schlossnagle
c36a59cfd9 Timm Friebe's patches for code celanup and additional functions. 2003-07-01 18:41:42 +00:00
Sebastian Bergmann
fff7ef2f6c ZTS fixes. 2003-07-01 04:25:29 +00:00
George Schlossnagle
4edd9505fe more incremental changes. add anything that needs a class factory. 2003-07-01 04:10:57 +00:00
George Schlossnagle
9c26571b37 all the easy parts of Reflection_Class 2003-07-01 02:31:21 +00:00
Andi Gutmans
288dacca0c - ZE coding style requires if ( instead of if( 2003-06-30 20:22:35 +00:00
Sebastian Bergmann
5ee72bb478 ZTS fixes. Remove unused local variables. 2003-06-30 20:17:01 +00:00
George Schlossnagle
aa96d17022 added support for Reflection_Function, the first part of
the reflection api
2003-06-30 20:03:56 +00:00