cvs: ZendEngine2 / zend.h zend_API.h zend_compile.c zend_compile.h zend_execute.c zend_execute_API.c zend_extensions.h zend_modules.h
zend_object_handlers.c zend_vm_def.h zend_vm_execute.h zend_vm_opcodes.h php-src NEWS

From: Date: Thu, 16 Jun 2005 14:52:49 +0000
Subject: cvs: ZendEngine2 / zend.h zend_API.h zend_compile.c zend_compile.h zend_execute.c zend_execute_API.c zend_extensions.h zend_modules.h
zend_object_handlers.c zend_vm_def.h zend_vm_execute.h zend_vm_opcodes.h php-src NEWS
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-3816@lists.php.net to get a copy of this message
dmitry Thu Jun 16 10:52:49 2005 EDT Modified files: /php-src NEWS /ZendEngine2 zend.h zend_API.h zend_compile.c zend_compile.h zend_execute.c zend_execute_API.c zend_extensions.h zend_modules.h zend_object_handlers.c zend_vm_def.h zend_vm_execute.h zend_vm_opcodes.h Log: Allowed return by refrence from internal functions

http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1921&r2=1.1922&ty=u Index: php-src/NEWS diff -u php-src/NEWS:1.1921 php-src/NEWS:1.1922 --- php-src/NEWS:1.1921 Thu Jun 16 10:19:58 2005 +++ php-src/NEWS Thu Jun 16 10:52:42 2005 @@ -1,6 +1,7 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? Jun 2005, PHP 5.1 Beta 2 +- Allowed return by refrence from internal functions. (Marcus, Andi, Dmitry) - Added bindto socket context option. (Ilia) - Rewrote strtotime() with support for timezones and tons of new formats. (Derick) http://cvs.php.net/diff.php/ZendEngine2/zend.h?r1=1.280&r2=1.281&ty=u Index: ZendEngine2/zend.h diff -u ZendEngine2/zend.h:1.280 ZendEngine2/zend.h:1.281 --- ZendEngine2/zend.h:1.280 Wed Jun 15 15:05:55 2005 +++ ZendEngine2/zend.h Thu Jun 16 10:52:43 2005 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend.h,v 1.280 2005/06/15 19:05:55 dmitry Exp $ */ +/* $Id: zend.h,v 1.281 2005/06/16 14:52:43 dmitry Exp $ */ #ifndef ZEND_H #define ZEND_H @@ -247,8 +247,8 @@ #include "zend_ts_hash.h" #include "zend_llist.h" -#define INTERNAL_FUNCTION_PARAMETERS int ht, zval *return_value, zval *this_ptr, int return_value_used TSRMLS_DC -#define INTERNAL_FUNCTION_PARAM_PASSTHRU ht, return_value, this_ptr, return_value_used TSRMLS_CC +#define INTERNAL_FUNCTION_PARAMETERS int ht, zval *return_value, zval **return_value_ptr, zval *this_ptr, int return_value_used TSRMLS_DC +#define INTERNAL_FUNCTION_PARAM_PASSTHRU ht, return_value, return_value_ptr, this_ptr, return_value_used TSRMLS_CC #if defined(__GNUC__) && !defined(__INTEL_COMPILER) && !defined(DARWIN) # define ZEND_VM_ALWAYS_INLINE __attribute__ ((always_inline)) http://cvs.php.net/diff.php/ZendEngine2/zend_API.h?r1=1.198&r2=1.199&ty=u Index: ZendEngine2/zend_API.h diff -u ZendEngine2/zend_API.h:1.198 ZendEngine2/zend_API.h:1.199 --- ZendEngine2/zend_API.h:1.198 Thu May 26 09:46:16 2005 +++ ZendEngine2/zend_API.h Thu Jun 16 10:52:44 2005 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_API.h,v 1.198 2005/05/26 13:46:16 dmitry Exp $ */ +/* $Id: zend_API.h,v 1.199 2005/06/16 14:52:44 dmitry Exp $ */ #ifndef ZEND_API_H #define ZEND_API_H @@ -65,7 +65,7 @@ zend_arg_info name[] = { \ { NULL, 0, NULL, 0, 0, 0, pass_rest_by_reference, return_reference, required_num_args }, #define ZEND_BEGIN_ARG_INFO(name, pass_rest_by_reference) \ - ZEND_BEGIN_ARG_INFO_EX(name, pass_rest_by_reference, ZEND_RETURN_REFERENCE_AGNOSTIC, -1) + ZEND_BEGIN_ARG_INFO_EX(name, pass_rest_by_reference, ZEND_RETURN_VALUE, -1) #define ZEND_END_ARG_INFO() }; /* Name macros */ http://cvs.php.net/diff.php/ZendEngine2/zend_compile.c?r1=1.637&r2=1.638&ty=u Index: ZendEngine2/zend_compile.c diff -u ZendEngine2/zend_compile.c:1.637 ZendEngine2/zend_compile.c:1.638 --- ZendEngine2/zend_compile.c:1.637 Thu Jun 16 08:17:33 2005 +++ ZendEngine2/zend_compile.c Thu Jun 16 10:52:45 2005 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_compile.c,v 1.637 2005/06/16 12:17:33 dmitry Exp $ */ +/* $Id: zend_compile.c,v 1.638 2005/06/16 14:52:45 dmitry Exp $ */ #include <zend_language_parser.h> #include "zend.h" @@ -1855,12 +1855,8 @@ return 0; } - if (proto->common.return_reference != ZEND_RETURN_REFERENCE_AGNOSTIC - && fe->common.return_reference != proto->common.return_reference) { - /* atm we cannot let internal function return by ref */ - if (fe->type == proto->type || fe->type != ZEND_INTERNAL_FUNCTION) { - return 0; - } + if (fe->common.return_reference != proto->common.return_reference) { + return 0; } for (i=0; i < proto->common.num_args; i++) { http://cvs.php.net/diff.php/ZendEngine2/zend_compile.h?r1=1.309&r2=1.310&ty=u Index: ZendEngine2/zend_compile.h diff -u ZendEngine2/zend_compile.h:1.309 ZendEngine2/zend_compile.h:1.310 --- ZendEngine2/zend_compile.h:1.309 Thu Jun 16 08:17:33 2005 +++ ZendEngine2/zend_compile.h Thu Jun 16 10:52:46 2005 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_compile.h,v 1.309 2005/06/16 12:17:33 dmitry Exp $ */ +/* $Id: zend_compile.h,v 1.310 2005/06/16 14:52:46 dmitry Exp $ */ #ifndef ZEND_COMPILE_H #define ZEND_COMPILE_H @@ -219,7 +219,6 @@ #define ZEND_RETURN_VALUE 0 #define ZEND_RETURN_REFERENCE 1 -#define ZEND_RETURN_REFERENCE_AGNOSTIC 2 typedef struct _zend_internal_function { /* Common elements */ http://cvs.php.net/diff.php/ZendEngine2/zend_execute.c?r1=1.705&r2=1.706&ty=u Index: ZendEngine2/zend_execute.c diff -u ZendEngine2/zend_execute.c:1.705 ZendEngine2/zend_execute.c:1.706 --- ZendEngine2/zend_execute.c:1.705 Thu Jun 16 10:27:08 2005 +++ ZendEngine2/zend_execute.c Thu Jun 16 10:52:47 2005 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_execute.c,v 1.705 2005/06/16 14:27:08 stas Exp $ */ +/* $Id: zend_execute.c,v 1.706 2005/06/16 14:52:47 dmitry Exp $ */ #define ZEND_INTENSIVE_DEBUGGING 0 @@ -1291,7 +1291,8 @@ ZEND_API void execute_internal(zend_execute_data *execute_data_ptr, int return_value_used TSRMLS_DC) { - ((zend_internal_function *) execute_data_ptr->function_state.function)->handler(execute_data_ptr->opline->extended_value, (*(temp_variable *)((char *) execute_data_ptr->Ts + execute_data_ptr->opline->result.u.var)).var.ptr, execute_data_ptr->object, return_value_used TSRMLS_CC); + zval **return_value_ptr = &(*(temp_variable *)((char *) execute_data_ptr->Ts + execute_data_ptr->opline->result.u.var)).var.ptr; + ((zend_internal_function *) execute_data_ptr->function_state.function)->handler(execute_data_ptr->opline->extended_value, *return_value_ptr, execute_data_ptr->function_state.function->common.return_reference?return_value_ptr:NULL, execute_data_ptr->object, return_value_used TSRMLS_CC); } #define ZEND_VM_NEXT_OPCODE() \ http://cvs.php.net/diff.php/ZendEngine2/zend_execute_API.c?r1=1.321&r2=1.322&ty=u Index: ZendEngine2/zend_execute_API.c diff -u ZendEngine2/zend_execute_API.c:1.321 ZendEngine2/zend_execute_API.c:1.322 --- ZendEngine2/zend_execute_API.c:1.321 Thu Jun 9 12:57:43 2005 +++ ZendEngine2/zend_execute_API.c Thu Jun 16 10:52:47 2005 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_execute_API.c,v 1.321 2005/06/09 16:57:43 dmitry Exp $ */ +/* $Id: zend_execute_API.c,v 1.322 2005/06/16 14:52:47 dmitry Exp $ */ #include <stdio.h> #include <signal.h> @@ -864,7 +864,7 @@ if (EX(function_state).function->common.scope) { EG(scope) = EX(function_state).function->common.scope; } - ((zend_internal_function *) EX(function_state).function)->handler(fci->param_count, *fci->retval_ptr_ptr, (fci->object_pp?*fci->object_pp:NULL), 1 TSRMLS_CC); + ((zend_internal_function *) EX(function_state).function)->handler(fci->param_count, *fci->retval_ptr_ptr, EX(function_state).function->common.return_reference?fci->retval_ptr_ptr:NULL, (fci->object_pp?*fci->object_pp:NULL), 1 TSRMLS_CC); INIT_PZVAL(*fci->retval_ptr_ptr); } zend_ptr_stack_clear_multiple(TSRMLS_C); http://cvs.php.net/diff.php/ZendEngine2/zend_extensions.h?r1=1.64&r2=1.65&ty=u Index: ZendEngine2/zend_extensions.h diff -u ZendEngine2/zend_extensions.h:1.64 ZendEngine2/zend_extensions.h:1.65 --- ZendEngine2/zend_extensions.h:1.64 Fri Jun 10 05:54:37 2005 +++ ZendEngine2/zend_extensions.h Thu Jun 16 10:52:47 2005 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_extensions.h,v 1.64 2005/06/10 09:54:37 dmitry Exp $ */ +/* $Id: zend_extensions.h,v 1.65 2005/06/16 14:52:47 dmitry Exp $ */ #ifndef ZEND_EXTENSIONS_H #define ZEND_EXTENSIONS_H @@ -27,7 +27,7 @@ /* The first number is the engine version and the rest is the date. * This way engine 2 API no. is always greater than engine 1 API no.. */ -#define ZEND_EXTENSION_API_NO 220050610 +#define ZEND_EXTENSION_API_NO 220050615 typedef struct _zend_extension_version_info { int zend_extension_api_no; http://cvs.php.net/diff.php/ZendEngine2/zend_modules.h?r1=1.64&r2=1.65&ty=u Index: ZendEngine2/zend_modules.h diff -u ZendEngine2/zend_modules.h:1.64 ZendEngine2/zend_modules.h:1.65 --- ZendEngine2/zend_modules.h:1.64 Tue Mar 15 18:46:29 2005 +++ ZendEngine2/zend_modules.h Thu Jun 16 10:52:47 2005 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_modules.h,v 1.64 2005/03/15 23:46:29 wez Exp $ */ +/* $Id: zend_modules.h,v 1.65 2005/06/16 14:52:47 dmitry Exp $ */ #ifndef MODULES_H #define MODULES_H @@ -38,7 +38,7 @@ extern struct _zend_arg_info fourth_arg_force_ref[5]; extern struct _zend_arg_info all_args_by_ref[1]; -#define ZEND_MODULE_API_NO 20041031 +#define ZEND_MODULE_API_NO 20050615 #ifdef ZTS #define USING_ZTS 1 #else http://cvs.php.net/diff.php/ZendEngine2/zend_object_handlers.c?r1=1.130&r2=1.131&ty=u Index: ZendEngine2/zend_object_handlers.c diff -u ZendEngine2/zend_object_handlers.c:1.130 ZendEngine2/zend_object_handlers.c:1.131 --- ZendEngine2/zend_object_handlers.c:1.130 Thu Jun 9 13:20:43 2005 +++ ZendEngine2/zend_object_handlers.c Thu Jun 16 10:52:47 2005 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_object_handlers.c,v 1.130 2005/06/09 17:20:43 stas Exp $ */ +/* $Id: zend_object_handlers.c,v 1.131 2005/06/16 14:52:47 dmitry Exp $ */ #include "zend.h" #include "zend_globals.h" @@ -658,6 +658,8 @@ call_user_call->scope = zobj->ce; call_user_call->fn_flags = 0; call_user_call->function_name = estrndup(method_name, method_len); + call_user_call->pass_rest_by_reference = 0; + call_user_call->return_reference = ZEND_RETURN_VALUE; return (union _zend_function *)call_user_call; } else { http://cvs.php.net/diff.php/ZendEngine2/zend_vm_def.h?r1=1.40&r2=1.41&ty=u Index: ZendEngine2/zend_vm_def.h diff -u ZendEngine2/zend_vm_def.h:1.40 ZendEngine2/zend_vm_def.h:1.41 --- ZendEngine2/zend_vm_def.h:1.40 Thu Jun 16 10:19:59 2005 +++ ZendEngine2/zend_vm_def.h Thu Jun 16 10:52:47 2005 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_vm_def.h,v 1.40 2005/06/16 14:19:59 dmitry Exp $ */ +/* $Id: zend_vm_def.h,v 1.41 2005/06/16 14:52:47 dmitry Exp $ */ /* If you change this file, please regenerate the zend_vm_execute.h and * zend_vm_opcodes.h files by running: @@ -1830,7 +1830,7 @@ } if (!zend_execute_internal) { /* saves one function call if zend_execute_internal is not used */ - ((zend_internal_function *) EX(function_state).function)->handler(opline->extended_value, EX_T(opline->result.u.var).var.ptr, EX(object), return_value_used TSRMLS_CC); + ((zend_internal_function *) EX(function_state).function)->handler(opline->extended_value, EX_T(opline->result.u.var).var.ptr, EX(function_state).function->common.return_reference?&EX_T(opline->result.u.var).var.ptr:NULL, EX(object), return_value_used TSRMLS_CC); } else { zend_execute_internal(EXECUTE_DATA, return_value_used TSRMLS_CC); } @@ -1890,7 +1890,7 @@ /* Not sure what should be done here if it's a static method */ if (EX(object)) { - Z_OBJ_HT_P(EX(object))->call_method(EX(fbc)->common.function_name, opline->extended_value, EX_T(opline->result.u.var).var.ptr, EX(object), return_value_used TSRMLS_CC); + Z_OBJ_HT_P(EX(object))->call_method(EX(fbc)->common.function_name, opline->extended_value, EX_T(opline->result.u.var).var.ptr, &EX_T(opline->result.u.var).var.ptr, EX(object), return_value_used TSRMLS_CC); } else { zend_error_noreturn(E_ERROR, "Cannot call overloaded function for non-object"); } http://cvs.php.net/diff.php/ZendEngine2/zend_vm_execute.h?r1=1.42&r2=1.43&ty=u Index: ZendEngine2/zend_vm_execute.h diff -u ZendEngine2/zend_vm_execute.h:1.42 ZendEngine2/zend_vm_execute.h:1.43 --- ZendEngine2/zend_vm_execute.h:1.42 Thu Jun 16 10:19:59 2005 +++ ZendEngine2/zend_vm_execute.h Thu Jun 16 10:52:48 2005 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_vm_execute.h,v 1.42 2005/06/16 14:19:59 dmitry Exp $ */ +/* $Id: zend_vm_execute.h,v 1.43 2005/06/16 14:52:48 dmitry Exp $ */ static opcode_handler_t zend_user_opcode_handlers[256] = {(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL,(opcode_handler_t)NULL}; @@ -181,7 +181,7 @@ } if (!zend_execute_internal) { /* saves one function call if zend_execute_internal is not used */ - ((zend_internal_function *) EX(function_state).function)->handler(opline->extended_value, EX_T(opline->result.u.var).var.ptr, EX(object), return_value_used TSRMLS_CC); + ((zend_internal_function *) EX(function_state).function)->handler(opline->extended_value, EX_T(opline->result.u.var).var.ptr, EX(function_state).function->common.return_reference?&EX_T(opline->result.u.var).var.ptr:NULL, EX(object), return_value_used TSRMLS_CC); } else { zend_execute_internal(execute_data, return_value_used TSRMLS_CC); } @@ -241,7 +241,7 @@ /* Not sure what should be done here if it's a static method */ if (EX(object)) { - Z_OBJ_HT_P(EX(object))->call_method(EX(fbc)->common.function_name, opline->extended_value, EX_T(opline->result.u.var).var.ptr, EX(object), return_value_used TSRMLS_CC); + Z_OBJ_HT_P(EX(object))->call_method(EX(fbc)->common.function_name, opline->extended_value, EX_T(opline->result.u.var).var.ptr, &EX_T(opline->result.u.var).var.ptr, EX(object), return_value_used TSRMLS_CC); } else { zend_error_noreturn(E_ERROR, "Cannot call overloaded function for non-object"); } http://cvs.php.net/diff.php/ZendEngine2/zend_vm_opcodes.h?r1=1.29&r2=1.30&ty=u Index: ZendEngine2/zend_vm_opcodes.h diff -u ZendEngine2/zend_vm_opcodes.h:1.29 ZendEngine2/zend_vm_opcodes.h:1.30 --- ZendEngine2/zend_vm_opcodes.h:1.29 Thu Jun 16 10:19:59 2005 +++ ZendEngine2/zend_vm_opcodes.h Thu Jun 16 10:52:48 2005 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_vm_opcodes.h,v 1.29 2005/06/16 14:19:59 dmitry Exp $ */ +/* $Id: zend_vm_opcodes.h,v 1.30 2005/06/16 14:52:48 dmitry Exp $ */ #define ZEND_NOP 0 #define ZEND_ADD 1
« previous php.zend-engine.cvs (#3816) next »