From: Dmitry Stogov Date: Tue, 4 Jul 2017 04:15:42 +0000 (+0300) Subject: Revert "Avoid run-time checks performed at compile-time." X-Git-Tag: php-7.2.0alpha3~6 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=02ef5d380341aa1058eba34cabe6487db29f6d30;p=php Revert "Avoid run-time checks performed at compile-time." This reverts commit 8fe47a47cf30eb3bf50a5cdb4e07f6fa135d21c7. --- diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index ea568425b2..b3d6c99577 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -6391,8 +6391,7 @@ ZEND_VM_C_LABEL(isset_str_offset): ZVAL_DEREF(offset); } if (Z_TYPE_P(offset) < IS_STRING /* simple scalar types */ - || (OP2_TYPE != IS_CONST - && Z_TYPE_P(offset) == IS_STRING /* or numeric string */ + || (Z_TYPE_P(offset) == IS_STRING /* or numeric string */ && IS_LONG == is_numeric_string(Z_STRVAL_P(offset), Z_STRLEN_P(offset), NULL, NULL, 0))) { lval = zval_get_long(offset); ZEND_VM_C_GOTO(isset_str_offset); diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index 66cb245717..0024f85223 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -6110,8 +6110,7 @@ isset_str_offset: ZVAL_DEREF(offset); } if (Z_TYPE_P(offset) < IS_STRING /* simple scalar types */ - || (IS_CONST != IS_CONST - && Z_TYPE_P(offset) == IS_STRING /* or numeric string */ + || (Z_TYPE_P(offset) == IS_STRING /* or numeric string */ && IS_LONG == is_numeric_string(Z_STRVAL_P(offset), Z_STRLEN_P(offset), NULL, NULL, 0))) { lval = zval_get_long(offset); goto isset_str_offset; @@ -9979,8 +9978,7 @@ isset_str_offset: ZVAL_DEREF(offset); } if (Z_TYPE_P(offset) < IS_STRING /* simple scalar types */ - || (IS_CV != IS_CONST - && Z_TYPE_P(offset) == IS_STRING /* or numeric string */ + || (Z_TYPE_P(offset) == IS_STRING /* or numeric string */ && IS_LONG == is_numeric_string(Z_STRVAL_P(offset), Z_STRLEN_P(offset), NULL, NULL, 0))) { lval = zval_get_long(offset); goto isset_str_offset; @@ -11901,8 +11899,7 @@ isset_str_offset: ZVAL_DEREF(offset); } if (Z_TYPE_P(offset) < IS_STRING /* simple scalar types */ - || ((IS_TMP_VAR|IS_VAR) != IS_CONST - && Z_TYPE_P(offset) == IS_STRING /* or numeric string */ + || (Z_TYPE_P(offset) == IS_STRING /* or numeric string */ && IS_LONG == is_numeric_string(Z_STRVAL_P(offset), Z_STRLEN_P(offset), NULL, NULL, 0))) { lval = zval_get_long(offset); goto isset_str_offset; @@ -37840,8 +37837,7 @@ isset_str_offset: ZVAL_DEREF(offset); } if (Z_TYPE_P(offset) < IS_STRING /* simple scalar types */ - || (IS_CONST != IS_CONST - && Z_TYPE_P(offset) == IS_STRING /* or numeric string */ + || (Z_TYPE_P(offset) == IS_STRING /* or numeric string */ && IS_LONG == is_numeric_string(Z_STRVAL_P(offset), Z_STRLEN_P(offset), NULL, NULL, 0))) { lval = zval_get_long(offset); goto isset_str_offset; @@ -44125,8 +44121,7 @@ isset_str_offset: ZVAL_DEREF(offset); } if (Z_TYPE_P(offset) < IS_STRING /* simple scalar types */ - || (IS_CV != IS_CONST - && Z_TYPE_P(offset) == IS_STRING /* or numeric string */ + || (Z_TYPE_P(offset) == IS_STRING /* or numeric string */ && IS_LONG == is_numeric_string(Z_STRVAL_P(offset), Z_STRLEN_P(offset), NULL, NULL, 0))) { lval = zval_get_long(offset); goto isset_str_offset; @@ -47626,8 +47621,7 @@ isset_str_offset: ZVAL_DEREF(offset); } if (Z_TYPE_P(offset) < IS_STRING /* simple scalar types */ - || ((IS_TMP_VAR|IS_VAR) != IS_CONST - && Z_TYPE_P(offset) == IS_STRING /* or numeric string */ + || (Z_TYPE_P(offset) == IS_STRING /* or numeric string */ && IS_LONG == is_numeric_string(Z_STRVAL_P(offset), Z_STRLEN_P(offset), NULL, NULL, 0))) { lval = zval_get_long(offset); goto isset_str_offset; @@ -49660,8 +49654,7 @@ isset_str_offset: ZVAL_DEREF(offset); } if (Z_TYPE_P(offset) < IS_STRING /* simple scalar types */ - || (IS_CONST != IS_CONST - && Z_TYPE_P(offset) == IS_STRING /* or numeric string */ + || (Z_TYPE_P(offset) == IS_STRING /* or numeric string */ && IS_LONG == is_numeric_string(Z_STRVAL_P(offset), Z_STRLEN_P(offset), NULL, NULL, 0))) { lval = zval_get_long(offset); goto isset_str_offset; @@ -51849,8 +51842,7 @@ isset_str_offset: ZVAL_DEREF(offset); } if (Z_TYPE_P(offset) < IS_STRING /* simple scalar types */ - || (IS_CV != IS_CONST - && Z_TYPE_P(offset) == IS_STRING /* or numeric string */ + || (Z_TYPE_P(offset) == IS_STRING /* or numeric string */ && IS_LONG == is_numeric_string(Z_STRVAL_P(offset), Z_STRLEN_P(offset), NULL, NULL, 0))) { lval = zval_get_long(offset); goto isset_str_offset; @@ -53138,8 +53130,7 @@ isset_str_offset: ZVAL_DEREF(offset); } if (Z_TYPE_P(offset) < IS_STRING /* simple scalar types */ - || ((IS_TMP_VAR|IS_VAR) != IS_CONST - && Z_TYPE_P(offset) == IS_STRING /* or numeric string */ + || (Z_TYPE_P(offset) == IS_STRING /* or numeric string */ && IS_LONG == is_numeric_string(Z_STRVAL_P(offset), Z_STRLEN_P(offset), NULL, NULL, 0))) { lval = zval_get_long(offset); goto isset_str_offset;