Commit Graph

2734 Commits

Author SHA1 Message Date
Moriyoshi Koizumi
fe489dcb4f Fix segfault when a referenced parameter is specified with typehint.
Result of the node will never be used because verify_instanceof handler has
been eliminated.
2003-08-09 19:29:38 +00:00
Marcus Boerger
d4aa155d25 Precise destructor errors 2003-08-09 14:32:33 +00:00
2d8509fe20 ChangeLog update 2003-08-08 00:30:25 +00:00
Moriyoshi Koizumi
35ffd45c26 Add missing right parensis 2003-08-07 19:36:13 +00:00
Zeev Suraski
5b312b571e Clarify use of original_function_state_ptr 2003-08-07 07:37:19 +00:00
Marcus Boerger
e9a4c91ca4 - Fix warnings
- Fix code
2003-08-07 07:17:34 +00:00
0f94f538ff ChangeLog update 2003-08-07 00:30:30 +00:00
Zeev Suraski
0a83ebfd56 clarify :) 2003-08-06 07:38:56 +00:00
26b85413ea ChangeLog update 2003-08-06 00:30:27 +00:00
foobar
cc011660e7 Fix the build 2003-08-05 23:50:59 +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
Stanislav Malyshev
8547de3f16 fix syntax 2003-08-05 08:03:26 +00:00
Stanislav Malyshev
f572897dea remove stack clean - it makes trouble 2003-08-05 07:56:49 +00:00
abd7612009 ChangeLog update 2003-08-05 00:30:17 +00:00
Marcus Boerger
de32c1de56 Fix ZTS 2003-08-04 19:57:53 +00:00
Marcus Boerger
65557ef672 Nuke unused variables 2003-08-04 19:56:12 +00:00
Marcus Boerger
3597704c64 Add function/method parameter reflection 2003-08-04 19:37:08 +00:00
Ilia Alshanetsky
1007b0a826 Fixed bug #23104 (hash position of static arrays not being reset) 2003-08-04 17:10:52 +00:00
Stanislav Malyshev
2884e8a715 oops. forgot function 2003-08-04 11:03:38 +00:00
Stanislav Malyshev
7cb1730293 fix crash #24842 2003-08-04 11:02:53 +00:00
Stanislav Malyshev
b6ff804cfe fix leaks: bug #24831 2003-08-04 10:40:05 +00:00
Stanislav Malyshev
a3dc90d8d0 use get_obj_zval_ptr 2003-08-04 10:30:42 +00:00
Stanislav Malyshev
3586a6a43b add test 2003-08-04 09:31:58 +00:00
Stanislav Malyshev
4d51526350 Fix #24884 - clone $this 2003-08-04 09:10:52 +00:00
Zeev Suraski
1959133fb3 Simplify code using XOR 2003-08-04 07:53:09 +00:00
Zeev Suraski
fe9b5870af Add logical XOR, proves to be quite useful lately 2003-08-04 07:52:36 +00:00
Zeev Suraski
6f53e48bb9 This check shouldn't be necessary 2003-08-04 07:52:09 +00:00
f1d8c1c448 ChangeLog update 2003-08-04 00:30:32 +00:00
Marcus Boerger
1f8fd69e78 Fix crash 2003-08-03 22:28:14 +00:00
Marcus Boerger
538aad24e3 Fix test and add missing initialization 2003-08-03 22:03:52 +00:00
Zeev Suraski
ef5a79bfed Ensure functions have a valid access level 2003-08-03 21:06:23 +00:00
Zeev Suraski
e3f4147931 Default to public 2003-08-03 21:04:39 +00:00
Marcus Boerger
8c614ddda4 Not needed, will be copied from ptr->flags later 2003-08-03 20:49:27 +00:00
Marcus Boerger
bdf84d4e12 Add missing arg info 2003-08-03 19:25:03 +00:00
Moriyoshi Koizumi
fb6300dd6c Style & WS fixes 2003-08-03 19:20:45 +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
Zeev Suraski
7112d3a3f8 No need for this initialization - this function initializes all of the
elements of zend_internal_function
2003-08-03 10:32:40 +00:00
Zeev Suraski
8b4bd4a8ec Clean up. extended_value can only contain either ZEND_UNSET_DIM or
ZEND_UNSET_OBJ.
2003-08-03 08:23:25 +00:00
Zeev Suraski
9d7122fb53 Generalize fetch_class 2003-08-03 08:21:08 +00:00
973b85672b ChangeLog update 2003-08-03 00:30:27 +00:00
Marcus Boerger
4f1e331c4d Initialize all struct members: Necessary for reflection 2003-08-02 19:03:14 +00:00
Marcus Boerger
04c90c8738 Show interfaces 2003-08-02 14:22:18 +00:00
Wez Furlong
0b6f7bddf4 fix usage of instanceof here too 2003-08-02 11:43:55 +00:00
Marcus Boerger
4fa6eac1f8 Fix warning 2003-08-02 11:39:15 +00:00
be9986eb8e ChangeLog update 2003-08-02 00:30:27 +00:00
Wez Furlong
5c4de2664c better fix... 2003-08-01 17:51:56 +00:00
Wez Furlong
ad12b3da82 Fix "O" format for zend_parse_parameters 2003-08-01 16:48:11 +00:00
6e49dd99c8 ChangeLog update 2003-08-01 00:30:42 +00:00
Zeev Suraski
4f6b315211 Use instanceof_function() 2003-07-31 16:30:15 +00:00
Zeev Suraski
accd6b623b Finish the array overloading patch 2003-07-31 09:06:11 +00:00