[php-src] jit-arm64: Fixed incorrect error message
| From: | Dmitry Stogov | Date: | Wed, 21 Apr 2021 23:46:20 +0000 |
| Subject: | [php-src] jit-arm64: Fixed incorrect error message | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-115737@lists.php.net to get a copy of this message | ||
Author: Dmitry Stogov (dstogov)
Date: 2021-04-22T02:41:06+03:00
Commit: https://github.com/php/php-src/commit/a8fea96de33c677cdaaa9e28bcd569fe7379cd31
Raw diff: https://github.com/php/php-src/commit/a8fea96de33c677cdaaa9e28bcd569fe7379cd31.diff
Fixed incorrect error message
Changed paths:
M ext/opcache/jit/zend_jit_helpers.c
Diff:
diff --git a/ext/opcache/jit/zend_jit_helpers.c b/ext/opcache/jit/zend_jit_helpers.c
index 9ed28ed3e2b9..ba32c64f5426 100644
--- a/ext/opcache/jit/zend_jit_helpers.c
+++ b/ext/opcache/jit/zend_jit_helpers.c
@@ -27,12 +27,16 @@ static ZEND_COLD void undef_result_after_exception() {
}
}
+static ZEND_COLD void zend_jit_illegal_offset(void)
+{
+ zend_type_error("Illegal offset type");
+}
+
static ZEND_COLD void zend_jit_illegal_string_offset(zval *offset)
{
zend_type_error("Cannot access offset of type %s on string",
zend_zval_type_name(offset));
}
-
static zend_never_inline zend_function* ZEND_FASTCALL _zend_jit_init_func_run_time_cache(const
zend_op_array *op_array) /* {{{ */
{
void **run_time_cache;
@@ -408,7 +412,7 @@ static void ZEND_FASTCALL zend_jit_fetch_dim_r_helper(zend_array *ht, zval *dim,
hval = 1;
goto num_index;
default:
- zend_jit_illegal_string_offset(dim);
+ zend_jit_illegal_offset();
undef_result_after_exception();
return;
}
@@ -473,7 +477,7 @@ static void ZEND_FASTCALL zend_jit_fetch_dim_is_helper(zend_array *ht, zval *dim
hval = 1;
goto num_index;
default:
- zend_jit_illegal_string_offset(dim);
+ zend_jit_illegal_offset();
undef_result_after_exception();
return;
}
@@ -603,7 +607,7 @@ static zval* ZEND_FASTCALL zend_jit_fetch_dim_rw_helper(zend_array *ht, zval *di
hval = 1;
goto num_index;
default:
- zend_jit_illegal_string_offset(dim);
+ zend_jit_illegal_offset();
undef_result_after_exception();
return NULL;
}
@@ -676,7 +680,7 @@ static zval* ZEND_FASTCALL zend_jit_fetch_dim_w_helper(zend_array *ht, zval *dim
hval = 1;
goto num_index;
default:
- zend_jit_illegal_string_offset(dim);
+ zend_jit_illegal_offset();
undef_result_after_exception();
return NULL;
}