From 02ef5d380341aa1058eba34cabe6487db29f6d30 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Tue, 4 Jul 2017 07:15:42 +0300 Subject: [PATCH] Revert "Avoid run-time checks performed at compile-time." This reverts commit 8fe47a47cf30eb3bf50a5cdb4e07f6fa135d21c7. --- Zend/zend_vm_def.h | 3 +-- Zend/zend_vm_execute.h | 27 +++++++++------------------ 2 files changed, 10 insertions(+), 20 deletions(-) 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; -- 2.50.1