diff options
| author | Dmitry Stogov <dmitry@zend.com> | 2015-04-01 12:11:13 +0300 |
|---|---|---|
| committer | Dmitry Stogov <dmitry@zend.com> | 2015-04-01 12:11:13 +0300 |
| commit | 4796e0242b8cdd2a77b552fcbaa74d70d87f6d0a (patch) | |
| tree | 0881d7c1a1775deb840ded202edc2c1de6e9abd6 /Zend | |
| parent | 52fcc74875b26a2d7000af23c1705516280a7634 (diff) | |
| parent | 2afca9f179fca2e127d5da3e1cc6cf50ff47339c (diff) | |
| download | php-git-4796e0242b8cdd2a77b552fcbaa74d70d87f6d0a.tar.gz | |
Merge branch 'InternalClassClean'
* InternalClassClean:
Fixed test
Patch improvement:
Fixed indentation. Fixed comment style. Fixed commented out code.
Reverted change to function name and added note of why it is different from the class it is actually changing.
Made UConverter throw an exception if the constructor fails.
Fixed PDO constructor to not return null.
Fixed fileinfo behaviour.
Made Phar throw exception on bad constructor.
Converted intl extension to use IntlException in constructors.
Fixed SplFixedArray and tests.
Fixed ReflectionExtension and ReflectionProperty.
Fixed ReflectionFunction, ReflectionMethod and ReflectionParameter.
Fixed PDORow behaviour and message.
Diffstat (limited to 'Zend')
| -rw-r--r-- | Zend/zend_API.c | 9 | ||||
| -rw-r--r-- | Zend/zend_API.h | 6 | ||||
| -rw-r--r-- | Zend/zend_vm_def.h | 7 | ||||
| -rw-r--r-- | Zend/zend_vm_execute.h | 38 |
4 files changed, 0 insertions, 60 deletions
diff --git a/Zend/zend_API.c b/Zend/zend_API.c index e6f94798d0..4295159c7b 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -4128,15 +4128,6 @@ ZEND_API zend_string *zend_resolve_method_name(zend_class_entry *ce, zend_functi } /* }}} */ -ZEND_API void zend_ctor_make_null(zend_execute_data *execute_data) /* {{{ */ -{ - if (EX(return_value)) { - Z_OBJ_P(EX(return_value)) = NULL; - ZVAL_NULL(EX(return_value)); - } -} -/* }}} */ - ZEND_API const char *zend_get_object_type(const zend_class_entry *ce) /* {{{ */ { if(ce->ce_flags & ZEND_ACC_TRAIT) { diff --git a/Zend/zend_API.h b/Zend/zend_API.h index 694c818f60..b70dd26ef8 100644 --- a/Zend/zend_API.h +++ b/Zend/zend_API.h @@ -538,8 +538,6 @@ ZEND_API int zend_set_local_var_str(const char *name, size_t len, zval *value, i ZEND_API zend_string *zend_find_alias_name(zend_class_entry *ce, zend_string *name); ZEND_API zend_string *zend_resolve_method_name(zend_class_entry *ce, zend_function *f); -ZEND_API void zend_ctor_make_null(zend_execute_data *execute_data); - ZEND_API const char *zend_get_object_type(const zend_class_entry *ce); #define add_method(arg, key, method) add_assoc_function((arg), (key), (method)) @@ -651,10 +649,6 @@ END_EXTERN_C() } \ } while (0) -/* May be used in internal constructors to make them return NULL */ -#define ZEND_CTOR_MAKE_NULL() \ - zend_ctor_make_null(execute_data) - #define RETURN_ZVAL_FAST(z) { RETVAL_ZVAL_FAST(z); return; } #define HASH_OF(p) (Z_TYPE_P(p)==IS_ARRAY ? Z_ARRVAL_P(p) : ((Z_TYPE_P(p)==IS_OBJECT ? Z_OBJ_HT_P(p)->get_properties((p)) : NULL))) diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index 666037631f..dfa83df734 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -2962,10 +2962,6 @@ ZEND_VM_HANDLER(113, ZEND_INIT_STATIC_METHOD_CALL, CONST|VAR, CONST|TMPVAR|UNUSE EX(call) = zend_vm_stack_push_call_frame(ZEND_CALL_NESTED_FUNCTION, fbc, opline->extended_value, ce, object, EX(call)); - if (OP2_TYPE == IS_UNUSED) { - EX(call)->return_value = NULL; - } - CHECK_EXCEPTION(); ZEND_VM_NEXT_OPCODE(); } @@ -4720,9 +4716,6 @@ ZEND_VM_HANDLER(68, ZEND_NEW, CONST|VAR, ANY) if (EXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), &object_zval); - EX(call)->return_value = EX_VAR(opline->result.var); - } else { - EX(call)->return_value = NULL; } CHECK_EXCEPTION(); diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index a4c2f352e7..50bb1cc508 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -3112,9 +3112,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_NEW_SPEC_CONST_HANDLER(ZEND_OP if (EXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), &object_zval); - EX(call)->return_value = EX_VAR(opline->result.var); - } else { - EX(call)->return_value = NULL; } CHECK_EXCEPTION(); @@ -5104,10 +5101,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_C EX(call) = zend_vm_stack_push_call_frame(ZEND_CALL_NESTED_FUNCTION, fbc, opline->extended_value, ce, object, EX(call)); - if (IS_CONST == IS_UNUSED) { - EX(call)->return_value = NULL; - } - CHECK_EXCEPTION(); ZEND_VM_NEXT_OPCODE(); } @@ -7032,10 +7025,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_C EX(call) = zend_vm_stack_push_call_frame(ZEND_CALL_NESTED_FUNCTION, fbc, opline->extended_value, ce, object, EX(call)); - if (IS_UNUSED == IS_UNUSED) { - EX(call)->return_value = NULL; - } - CHECK_EXCEPTION(); ZEND_VM_NEXT_OPCODE(); } @@ -8520,10 +8509,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_C EX(call) = zend_vm_stack_push_call_frame(ZEND_CALL_NESTED_FUNCTION, fbc, opline->extended_value, ce, object, EX(call)); - if (IS_CV == IS_UNUSED) { - EX(call)->return_value = NULL; - } - CHECK_EXCEPTION(); ZEND_VM_NEXT_OPCODE(); } @@ -10071,10 +10056,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_C EX(call) = zend_vm_stack_push_call_frame(ZEND_CALL_NESTED_FUNCTION, fbc, opline->extended_value, ce, object, EX(call)); - if ((IS_TMP_VAR|IS_VAR) == IS_UNUSED) { - EX(call)->return_value = NULL; - } - CHECK_EXCEPTION(); ZEND_VM_NEXT_OPCODE(); } @@ -13851,9 +13832,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_NEW_SPEC_VAR_HANDLER(ZEND_OPCO if (EXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), &object_zval); - EX(call)->return_value = EX_VAR(opline->result.var); - } else { - EX(call)->return_value = NULL; } CHECK_EXCEPTION(); @@ -15938,10 +15916,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_V EX(call) = zend_vm_stack_push_call_frame(ZEND_CALL_NESTED_FUNCTION, fbc, opline->extended_value, ce, object, EX(call)); - if (IS_CONST == IS_UNUSED) { - EX(call)->return_value = NULL; - } - CHECK_EXCEPTION(); ZEND_VM_NEXT_OPCODE(); } @@ -17515,10 +17489,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_V EX(call) = zend_vm_stack_push_call_frame(ZEND_CALL_NESTED_FUNCTION, fbc, opline->extended_value, ce, object, EX(call)); - if (IS_UNUSED == IS_UNUSED) { - EX(call)->return_value = NULL; - } - CHECK_EXCEPTION(); ZEND_VM_NEXT_OPCODE(); } @@ -19134,10 +19104,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_V EX(call) = zend_vm_stack_push_call_frame(ZEND_CALL_NESTED_FUNCTION, fbc, opline->extended_value, ce, object, EX(call)); - if (IS_CV == IS_UNUSED) { - EX(call)->return_value = NULL; - } - CHECK_EXCEPTION(); ZEND_VM_NEXT_OPCODE(); } @@ -20695,10 +20661,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_V EX(call) = zend_vm_stack_push_call_frame(ZEND_CALL_NESTED_FUNCTION, fbc, opline->extended_value, ce, object, EX(call)); - if ((IS_TMP_VAR|IS_VAR) == IS_UNUSED) { - EX(call)->return_value = NULL; - } - CHECK_EXCEPTION(); ZEND_VM_NEXT_OPCODE(); } |
