]> granicus.if.org Git - php/commitdiff
Revert "Avoid run-time checks performed at compile-time."
authorDmitry Stogov <dmitry@zend.com>
Tue, 4 Jul 2017 04:15:42 +0000 (07:15 +0300)
committerDmitry Stogov <dmitry@zend.com>
Tue, 4 Jul 2017 04:15:42 +0000 (07:15 +0300)
This reverts commit 8fe47a47cf30eb3bf50a5cdb4e07f6fa135d21c7.

Zend/zend_vm_def.h
Zend/zend_vm_execute.h

index ea568425b2597ce778c61998630d365feeedd180..b3d6c99577143eb31685effd6625d2b9b0526393 100644 (file)
@@ -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);
index 66cb2457177bf83c66db6513bbbcd06fd9627158..0024f852236989262c76f37ea7cf485b8d8564a6 100644 (file)
@@ -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;