Index: Zend/zend.h =================================================================== RCS file: /repository/ZendEngine2/zend.h,v retrieving revision 1.336 diff -u -p -r1.336 zend.h --- Zend/zend.h 24 Aug 2007 13:50:52 -0000 1.336 +++ Zend/zend.h 29 Aug 2007 23:48:29 -0000 @@ -389,7 +389,7 @@ struct _zend_class_entry { zend_object_value (*create_object)(zend_class_entry *class_type TSRMLS_DC); zend_object_iterator *(*get_iterator)(zend_class_entry *ce, zval *object, int by_ref TSRMLS_DC); int (*interface_gets_implemented)(zend_class_entry *iface, zend_class_entry *class_type TSRMLS_DC); /* a class implements this interface */ - union _zend_function *(*get_static_method)(zend_class_entry *ce, zstr method, int method_len TSRMLS_DC); + union _zend_function *(*get_static_method)(zend_class_entry *ce, zend_uchar type, zstr method, int method_len TSRMLS_DC); /* serializer callbacks */ int (*serialize)(zval *object, int *type, zstr *buffer, zend_uint *buf_len, zend_serialize_data *data TSRMLS_DC); Index: Zend/zend_execute_API.c =================================================================== RCS file: /repository/ZendEngine2/zend_execute_API.c,v retrieving revision 1.413 diff -u -p -r1.413 zend_execute_API.c --- Zend/zend_execute_API.c 24 Aug 2007 13:50:52 -0000 1.413 +++ Zend/zend_execute_API.c 29 Aug 2007 23:48:30 -0000 @@ -889,9 +889,9 @@ int zend_call_function(zend_fcall_info * zstr lcname = zend_u_str_case_fold(Z_TYPE_P(fci->function_name), fname, fname_len, 1, &lcname_len); if (calling_scope->get_static_method) { - EX(function_state).function = calling_scope->get_static_method(calling_scope, lcname, lcname_len TSRMLS_CC); + EX(function_state).function = calling_scope->get_static_method(calling_scope, Z_TYPE_P(fci->function_name), lcname, lcname_len TSRMLS_CC); } else { - EX(function_state).function = zend_std_get_static_method(calling_scope, lcname, lcname_len TSRMLS_CC); + EX(function_state).function = zend_std_get_static_method(calling_scope, Z_TYPE_P(fci->function_name), lcname, lcname_len TSRMLS_CC); } efree(lcname.v); Index: Zend/zend_object_handlers.c =================================================================== RCS file: /repository/ZendEngine2/zend_object_handlers.c,v retrieving revision 1.188 diff -u -p -r1.188 zend_object_handlers.c --- Zend/zend_object_handlers.c 24 Jul 2007 11:40:07 -0000 1.188 +++ Zend/zend_object_handlers.c 29 Aug 2007 23:48:30 -0000 @@ -903,11 +903,9 @@ ZEND_API void zend_std_callstatic_user_c /* }}} */ -ZEND_API zend_function *zend_std_get_static_method(zend_class_entry *ce, zstr function_name_strval, int function_name_strlen TSRMLS_DC) /* {{{ */ +ZEND_API zend_function *zend_std_get_static_method(zend_class_entry *ce, zend_uchar type, zstr function_name_strval, int function_name_strlen TSRMLS_DC) /* {{{ */ { zend_function *fbc; - /* FIXME: type is default */ - zend_uchar type = UG(unicode)?IS_UNICODE:IS_STRING; if (zend_u_hash_find(&ce->function_table, type, function_name_strval, function_name_strlen + 1, (void **) &fbc)==FAILURE) { if (ce->__callstatic) { Index: Zend/zend_object_handlers.h =================================================================== RCS file: /repository/ZendEngine2/zend_object_handlers.h,v retrieving revision 1.62 diff -u -p -r1.62 zend_object_handlers.h --- Zend/zend_object_handlers.h 18 Jan 2007 23:23:13 -0000 1.62 +++ Zend/zend_object_handlers.h 29 Aug 2007 23:48:30 -0000 @@ -140,7 +140,7 @@ struct _zend_object_handlers { extern ZEND_API zend_object_handlers std_object_handlers; BEGIN_EXTERN_C() -ZEND_API union _zend_function *zend_std_get_static_method(zend_class_entry *ce, zstr function_name_strval, int function_name_strlen TSRMLS_DC); +ZEND_API union _zend_function *zend_std_get_static_method(zend_class_entry *ce, zend_uchar type, zstr function_name_strval, int function_name_strlen TSRMLS_DC); ZEND_API zval **zend_std_get_static_property(zend_class_entry *ce, zend_uchar type, zstr property_name, int property_name_len, zend_bool silent TSRMLS_DC); ZEND_API zend_bool zend_std_unset_static_property(zend_class_entry *ce, zend_uchar type, zstr property_name, int property_name_len TSRMLS_DC); ZEND_API union _zend_function *zend_std_get_constructor(zval *object TSRMLS_DC); Index: Zend/zend_vm_def.h =================================================================== RCS file: /repository/ZendEngine2/zend_vm_def.h,v retrieving revision 1.179 diff -u -p -r1.179 zend_vm_def.h --- Zend/zend_vm_def.h 24 Aug 2007 13:50:52 -0000 1.179 +++ Zend/zend_vm_def.h 29 Aug 2007 23:48:35 -0000 @@ -1815,10 +1815,11 @@ ZEND_VM_HANDLER(113, ZEND_INIT_STATIC_ME unsigned int function_name_strlen; zend_bool is_const = (OP2_TYPE == IS_CONST); zend_free_op free_op2; - + zend_uchar function_name_type; if (is_const) { function_name_strval = Z_UNIVAL(opline->op2.u.constant); function_name_strlen = Z_UNILEN(opline->op2.u.constant); + function_name_type = Z_TYPE(opline->op2.u.constant); } else { function_name = GET_OP2_ZVAL_PTR(BP_VAR_R); @@ -1826,12 +1827,13 @@ ZEND_VM_HANDLER(113, ZEND_INIT_STATIC_ME zend_error_noreturn(E_ERROR, "Function name must be a string"); } function_name_strval = zend_u_str_case_fold(Z_TYPE_P(function_name), Z_UNIVAL_P(function_name), Z_UNILEN_P(function_name), 1, &function_name_strlen); + function_name_type = Z_TYPE_P(function_name); } if (ce->get_static_method) { - EX(fbc) = ce->get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC); + EX(fbc) = ce->get_static_method(ce, function_name_type, function_name_strval, function_name_strlen TSRMLS_CC); } else { - EX(fbc) = zend_std_get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC); + EX(fbc) = zend_std_get_static_method(ce, function_name_type, function_name_strval, function_name_strlen TSRMLS_CC); } if (!is_const) { Index: Zend/zend_vm_execute.h =================================================================== RCS file: /repository/ZendEngine2/zend_vm_execute.h,v retrieving revision 1.183 diff -u -p -r1.183 zend_vm_execute.h --- Zend/zend_vm_execute.h 24 Aug 2007 13:50:52 -0000 1.183 +++ Zend/zend_vm_execute.h 29 Aug 2007 23:49:06 -0000 @@ -2567,10 +2567,11 @@ static int ZEND_INIT_STATIC_METHOD_CALL_ unsigned int function_name_strlen; zend_bool is_const = (IS_CONST == IS_CONST); - + zend_uchar function_name_type; if (is_const) { function_name_strval = Z_UNIVAL(opline->op2.u.constant); function_name_strlen = Z_UNILEN(opline->op2.u.constant); + function_name_type = Z_TYPE(opline->op2.u.constant); } else { function_name = &opline->op2.u.constant; @@ -2578,12 +2579,13 @@ static int ZEND_INIT_STATIC_METHOD_CALL_ zend_error_noreturn(E_ERROR, "Function name must be a string"); } function_name_strval = zend_u_str_case_fold(Z_TYPE_P(function_name), Z_UNIVAL_P(function_name), Z_UNILEN_P(function_name), 1, &function_name_strlen); + function_name_type = Z_TYPE_P(function_name); } if (ce->get_static_method) { - EX(fbc) = ce->get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC); + EX(fbc) = ce->get_static_method(ce, function_name_type, function_name_strval, function_name_strlen TSRMLS_CC); } else { - EX(fbc) = zend_std_get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC); + EX(fbc) = zend_std_get_static_method(ce, function_name_type, function_name_strval, function_name_strlen TSRMLS_CC); } if (!is_const) { @@ -3110,10 +3112,11 @@ static int ZEND_INIT_STATIC_METHOD_CALL_ unsigned int function_name_strlen; zend_bool is_const = (IS_TMP_VAR == IS_CONST); zend_free_op free_op2; - + zend_uchar function_name_type; if (is_const) { function_name_strval = Z_UNIVAL(opline->op2.u.constant); function_name_strlen = Z_UNILEN(opline->op2.u.constant); + function_name_type = Z_TYPE(opline->op2.u.constant); } else { function_name = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC); @@ -3121,12 +3124,13 @@ static int ZEND_INIT_STATIC_METHOD_CALL_ zend_error_noreturn(E_ERROR, "Function name must be a string"); } function_name_strval = zend_u_str_case_fold(Z_TYPE_P(function_name), Z_UNIVAL_P(function_name), Z_UNILEN_P(function_name), 1, &function_name_strlen); + function_name_type = Z_TYPE_P(function_name); } if (ce->get_static_method) { - EX(fbc) = ce->get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC); + EX(fbc) = ce->get_static_method(ce, function_name_type, function_name_strval, function_name_strlen TSRMLS_CC); } else { - EX(fbc) = zend_std_get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC); + EX(fbc) = zend_std_get_static_method(ce, function_name_type, function_name_strval, function_name_strlen TSRMLS_CC); } if (!is_const) { @@ -3555,10 +3559,11 @@ static int ZEND_INIT_STATIC_METHOD_CALL_ unsigned int function_name_strlen; zend_bool is_const = (IS_VAR == IS_CONST); zend_free_op free_op2; - + zend_uchar function_name_type; if (is_const) { function_name_strval = Z_UNIVAL(opline->op2.u.constant); function_name_strlen = Z_UNILEN(opline->op2.u.constant); + function_name_type = Z_TYPE(opline->op2.u.constant); } else { function_name = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC); @@ -3566,12 +3571,13 @@ static int ZEND_INIT_STATIC_METHOD_CALL_ zend_error_noreturn(E_ERROR, "Function name must be a string"); } function_name_strval = zend_u_str_case_fold(Z_TYPE_P(function_name), Z_UNIVAL_P(function_name), Z_UNILEN_P(function_name), 1, &function_name_strlen); + function_name_type = Z_TYPE_P(function_name); } if (ce->get_static_method) { - EX(fbc) = ce->get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC); + EX(fbc) = ce->get_static_method(ce, function_name_type, function_name_strval, function_name_strlen TSRMLS_CC); } else { - EX(fbc) = zend_std_get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC); + EX(fbc) = zend_std_get_static_method(ce, function_name_type, function_name_strval, function_name_strlen TSRMLS_CC); } if (!is_const) { @@ -3766,10 +3772,11 @@ static int ZEND_INIT_STATIC_METHOD_CALL_ unsigned int function_name_strlen; zend_bool is_const = (IS_UNUSED == IS_CONST); - + zend_uchar function_name_type; if (is_const) { function_name_strval = Z_UNIVAL(opline->op2.u.constant); function_name_strlen = Z_UNILEN(opline->op2.u.constant); + function_name_type = Z_TYPE(opline->op2.u.constant); } else { function_name = NULL; @@ -3777,12 +3784,13 @@ static int ZEND_INIT_STATIC_METHOD_CALL_ zend_error_noreturn(E_ERROR, "Function name must be a string"); } function_name_strval = zend_u_str_case_fold(Z_TYPE_P(function_name), Z_UNIVAL_P(function_name), Z_UNILEN_P(function_name), 1, &function_name_strlen); + function_name_type = Z_TYPE_P(function_name); } if (ce->get_static_method) { - EX(fbc) = ce->get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC); + EX(fbc) = ce->get_static_method(ce, function_name_type, function_name_strval, function_name_strlen TSRMLS_CC); } else { - EX(fbc) = zend_std_get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC); + EX(fbc) = zend_std_get_static_method(ce, function_name_type, function_name_strval, function_name_strlen TSRMLS_CC); } if (!is_const) { @@ -4179,10 +4187,11 @@ static int ZEND_INIT_STATIC_METHOD_CALL_ unsigned int function_name_strlen; zend_bool is_const = (IS_CV == IS_CONST); - + zend_uchar function_name_type; if (is_const) { function_name_strval = Z_UNIVAL(opline->op2.u.constant); function_name_strlen = Z_UNILEN(opline->op2.u.constant); + function_name_type = Z_TYPE(opline->op2.u.constant); } else { function_name = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC); @@ -4190,12 +4199,13 @@ static int ZEND_INIT_STATIC_METHOD_CALL_ zend_error_noreturn(E_ERROR, "Function name must be a string"); } function_name_strval = zend_u_str_case_fold(Z_TYPE_P(function_name), Z_UNIVAL_P(function_name), Z_UNILEN_P(function_name), 1, &function_name_strlen); + function_name_type = Z_TYPE_P(function_name); } if (ce->get_static_method) { - EX(fbc) = ce->get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC); + EX(fbc) = ce->get_static_method(ce, function_name_type, function_name_strval, function_name_strlen TSRMLS_CC); } else { - EX(fbc) = zend_std_get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC); + EX(fbc) = zend_std_get_static_method(ce, function_name_type, function_name_strval, function_name_strlen TSRMLS_CC); } if (!is_const) { @@ -10024,10 +10034,11 @@ static int ZEND_INIT_STATIC_METHOD_CALL_ unsigned int function_name_strlen; zend_bool is_const = (IS_CONST == IS_CONST); - + zend_uchar function_name_type; if (is_const) { function_name_strval = Z_UNIVAL(opline->op2.u.constant); function_name_strlen = Z_UNILEN(opline->op2.u.constant); + function_name_type = Z_TYPE(opline->op2.u.constant); } else { function_name = &opline->op2.u.constant; @@ -10035,12 +10046,13 @@ static int ZEND_INIT_STATIC_METHOD_CALL_ zend_error_noreturn(E_ERROR, "Function name must be a string"); } function_name_strval = zend_u_str_case_fold(Z_TYPE_P(function_name), Z_UNIVAL_P(function_name), Z_UNILEN_P(function_name), 1, &function_name_strlen); + function_name_type = Z_TYPE_P(function_name); } if (ce->get_static_method) { - EX(fbc) = ce->get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC); + EX(fbc) = ce->get_static_method(ce, function_name_type, function_name_strval, function_name_strlen TSRMLS_CC); } else { - EX(fbc) = zend_std_get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC); + EX(fbc) = zend_std_get_static_method(ce, function_name_type, function_name_strval, function_name_strlen TSRMLS_CC); } if (!is_const) { @@ -11714,10 +11726,11 @@ static int ZEND_INIT_STATIC_METHOD_CALL_ unsigned int function_name_strlen; zend_bool is_const = (IS_TMP_VAR == IS_CONST); zend_free_op free_op2; - + zend_uchar function_name_type; if (is_const) { function_name_strval = Z_UNIVAL(opline->op2.u.constant); function_name_strlen = Z_UNILEN(opline->op2.u.constant); + function_name_type = Z_TYPE(opline->op2.u.constant); } else { function_name = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC); @@ -11725,12 +11738,13 @@ static int ZEND_INIT_STATIC_METHOD_CALL_ zend_error_noreturn(E_ERROR, "Function name must be a string"); } function_name_strval = zend_u_str_case_fold(Z_TYPE_P(function_name), Z_UNIVAL_P(function_name), Z_UNILEN_P(function_name), 1, &function_name_strlen); + function_name_type = Z_TYPE_P(function_name); } if (ce->get_static_method) { - EX(fbc) = ce->get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC); + EX(fbc) = ce->get_static_method(ce, function_name_type, function_name_strval, function_name_strlen TSRMLS_CC); } else { - EX(fbc) = zend_std_get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC); + EX(fbc) = zend_std_get_static_method(ce, function_name_type, function_name_strval, function_name_strlen TSRMLS_CC); } if (!is_const) { @@ -13382,10 +13396,11 @@ static int ZEND_INIT_STATIC_METHOD_CALL_ unsigned int function_name_strlen; zend_bool is_const = (IS_VAR == IS_CONST); zend_free_op free_op2; - + zend_uchar function_name_type; if (is_const) { function_name_strval = Z_UNIVAL(opline->op2.u.constant); function_name_strlen = Z_UNILEN(opline->op2.u.constant); + function_name_type = Z_TYPE(opline->op2.u.constant); } else { function_name = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC); @@ -13393,12 +13408,13 @@ static int ZEND_INIT_STATIC_METHOD_CALL_ zend_error_noreturn(E_ERROR, "Function name must be a string"); } function_name_strval = zend_u_str_case_fold(Z_TYPE_P(function_name), Z_UNIVAL_P(function_name), Z_UNILEN_P(function_name), 1, &function_name_strlen); + function_name_type = Z_TYPE_P(function_name); } if (ce->get_static_method) { - EX(fbc) = ce->get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC); + EX(fbc) = ce->get_static_method(ce, function_name_type, function_name_strval, function_name_strlen TSRMLS_CC); } else { - EX(fbc) = zend_std_get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC); + EX(fbc) = zend_std_get_static_method(ce, function_name_type, function_name_strval, function_name_strlen TSRMLS_CC); } if (!is_const) { @@ -14248,10 +14264,11 @@ static int ZEND_INIT_STATIC_METHOD_CALL_ unsigned int function_name_strlen; zend_bool is_const = (IS_UNUSED == IS_CONST); - + zend_uchar function_name_type; if (is_const) { function_name_strval = Z_UNIVAL(opline->op2.u.constant); function_name_strlen = Z_UNILEN(opline->op2.u.constant); + function_name_type = Z_TYPE(opline->op2.u.constant); } else { function_name = NULL; @@ -14259,12 +14276,13 @@ static int ZEND_INIT_STATIC_METHOD_CALL_ zend_error_noreturn(E_ERROR, "Function name must be a string"); } function_name_strval = zend_u_str_case_fold(Z_TYPE_P(function_name), Z_UNIVAL_P(function_name), Z_UNILEN_P(function_name), 1, &function_name_strlen); + function_name_type = Z_TYPE_P(function_name); } if (ce->get_static_method) { - EX(fbc) = ce->get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC); + EX(fbc) = ce->get_static_method(ce, function_name_type, function_name_strval, function_name_strlen TSRMLS_CC); } else { - EX(fbc) = zend_std_get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC); + EX(fbc) = zend_std_get_static_method(ce, function_name_type, function_name_strval, function_name_strlen TSRMLS_CC); } if (!is_const) { @@ -15566,10 +15584,11 @@ static int ZEND_INIT_STATIC_METHOD_CALL_ unsigned int function_name_strlen; zend_bool is_const = (IS_CV == IS_CONST); - + zend_uchar function_name_type; if (is_const) { function_name_strval = Z_UNIVAL(opline->op2.u.constant); function_name_strlen = Z_UNILEN(opline->op2.u.constant); + function_name_type = Z_TYPE(opline->op2.u.constant); } else { function_name = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC); @@ -15577,12 +15596,13 @@ static int ZEND_INIT_STATIC_METHOD_CALL_ zend_error_noreturn(E_ERROR, "Function name must be a string"); } function_name_strval = zend_u_str_case_fold(Z_TYPE_P(function_name), Z_UNIVAL_P(function_name), Z_UNILEN_P(function_name), 1, &function_name_strlen); + function_name_type = Z_TYPE_P(function_name); } if (ce->get_static_method) { - EX(fbc) = ce->get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC); + EX(fbc) = ce->get_static_method(ce, function_name_type, function_name_strval, function_name_strlen TSRMLS_CC); } else { - EX(fbc) = zend_std_get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC); + EX(fbc) = zend_std_get_static_method(ce, function_name_type, function_name_strval, function_name_strlen TSRMLS_CC); } if (!is_const) {