summaryrefslogtreecommitdiff
path: root/ext/reflection/php_reflection.c
diff options
context:
space:
mode:
authorBob Weinand <bobwei9@hotmail.com>2015-02-10 15:43:23 +0100
committerBob Weinand <bobwei9@hotmail.com>2015-02-10 15:47:17 +0100
commit830d3d79b3744db021f2183857c5a625e96c6315 (patch)
tree91c21b780a676263c030193003096ffd9e9bbff6 /ext/reflection/php_reflection.c
parent6c9d75b44d559f9d35fba01b1f6eb16aef4c23b1 (diff)
downloadphp-git-830d3d79b3744db021f2183857c5a625e96c6315.tar.gz
Revert "Revert "Improve and generalize class constant substitution""
This reverts commit 400e65e955f08ad6ae57c1a15be04d5852107252. Removing ReflectionParameter::getDefaultValueConstantName() and isDefaultValueConstant() They become useless with such optimizations and already anyway are (e.g. CONSTANT?:CONSTANT ... yields the constant back without telling isDefaultValueConstant() about it etc.)
Diffstat (limited to 'ext/reflection/php_reflection.c')
-rw-r--r--ext/reflection/php_reflection.c50
1 files changed, 0 insertions, 50 deletions
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c
index 92b5d9da5f..51c2c15405 100644
--- a/ext/reflection/php_reflection.c
+++ b/ext/reflection/php_reflection.c
@@ -2619,54 +2619,6 @@ ZEND_METHOD(reflection_parameter, getDefaultValue)
}
/* }}} */
-/* {{{ proto public bool ReflectionParameter::isDefaultValueConstant()
- Returns whether the default value of this parameter is constant */
-ZEND_METHOD(reflection_parameter, isDefaultValueConstant)
-{
- zend_op *precv;
- parameter_reference *param;
-
- if (zend_parse_parameters_none() == FAILURE) {
- return;
- }
-
- param = _reflection_param_get_default_param(INTERNAL_FUNCTION_PARAM_PASSTHRU);
- if (!param) {
- RETURN_FALSE;
- }
-
- precv = _reflection_param_get_default_precv(INTERNAL_FUNCTION_PARAM_PASSTHRU, param);
- if (precv && Z_TYPE_P(RT_CONSTANT(&param->fptr->op_array, precv->op2)) == IS_CONSTANT) {
- RETURN_TRUE;
- }
-
- RETURN_FALSE;
-}
-/* }}} */
-
-/* {{{ proto public mixed ReflectionParameter::getDefaultValueConstantName()
- Returns the default value's constant name if default value is constant or null */
-ZEND_METHOD(reflection_parameter, getDefaultValueConstantName)
-{
- zend_op *precv;
- parameter_reference *param;
-
- if (zend_parse_parameters_none() == FAILURE) {
- return;
- }
-
- param = _reflection_param_get_default_param(INTERNAL_FUNCTION_PARAM_PASSTHRU);
- if (!param) {
- return;
- }
-
- precv = _reflection_param_get_default_precv(INTERNAL_FUNCTION_PARAM_PASSTHRU, param);
- if (precv && Z_TYPE_P(RT_CONSTANT(&param->fptr->op_array, precv->op2)) == IS_CONSTANT) {
- RETURN_STR(zend_string_copy(Z_STR_P(RT_CONSTANT(&param->fptr->op_array, precv->op2))));
- }
-}
-/* }}} */
-
/* {{{ proto public bool ReflectionParameter::isVariadic()
Returns whether this parameter is a variadic parameter */
ZEND_METHOD(reflection_parameter, isVariadic)
@@ -6038,8 +5990,6 @@ static const zend_function_entry reflection_parameter_functions[] = {
ZEND_ME(reflection_parameter, isOptional, arginfo_reflection__void, 0)
ZEND_ME(reflection_parameter, isDefaultValueAvailable, arginfo_reflection__void, 0)
ZEND_ME(reflection_parameter, getDefaultValue, arginfo_reflection__void, 0)
- ZEND_ME(reflection_parameter, isDefaultValueConstant, arginfo_reflection__void, 0)
- ZEND_ME(reflection_parameter, getDefaultValueConstantName, arginfo_reflection__void, 0)
ZEND_ME(reflection_parameter, isVariadic, arginfo_reflection__void, 0)
PHP_FE_END
};