summaryrefslogtreecommitdiff
path: root/Zend/zend_execute.c
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/zend_execute.c')
-rw-r--r--Zend/zend_execute.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c
index aff92a3952..0a156f84a4 100644
--- a/Zend/zend_execute.c
+++ b/Zend/zend_execute.c
@@ -1168,7 +1168,7 @@ str_index:
return retval;
}
-static zend_never_inline zend_long zend_check_string_offset(zval *container, zval *dim, int type TSRMLS_DC)
+static zend_never_inline zend_long zend_check_string_offset(zval *dim, int type TSRMLS_DC)
{
zend_long offset;
@@ -1211,7 +1211,7 @@ try_again:
static zend_always_inline zend_long zend_fetch_string_offset(zval *container, zval *dim, int type TSRMLS_DC)
{
- zend_long offset = zend_check_string_offset(container, dim, type TSRMLS_CC);
+ zend_long offset = zend_check_string_offset(dim, type TSRMLS_CC);
if (Z_REFCOUNTED_P(container)) {
if (Z_REFCOUNT_P(container) > 1) {
@@ -1250,7 +1250,7 @@ convert_to_array:
goto fetch_from_array;
}
- zend_check_string_offset(container, dim, type TSRMLS_CC);
+ zend_check_string_offset(dim, type TSRMLS_CC);
ZVAL_INDIRECT(result, NULL); /* wrong string offset */
} else if (EXPECTED(Z_TYPE_P(container) == IS_OBJECT)) {
@@ -1666,12 +1666,12 @@ static zend_always_inline void i_init_func_execute_data(zend_execute_data *execu
} while (var != end);
}
- if (op_array->this_var != -1 && Z_OBJ(EX(This))) {
+ if (op_array->this_var != (uint32_t)-1 && EXPECTED(Z_OBJ(EX(This)))) {
ZVAL_OBJ(EX_VAR(op_array->this_var), Z_OBJ(EX(This)));
GC_REFCOUNT(Z_OBJ(EX(This)))++;
}
- if (!op_array->run_time_cache && op_array->last_cache_slot) {
+ if (UNEXPECTED(!op_array->run_time_cache)) {
op_array->run_time_cache = zend_arena_calloc(&CG(arena), op_array->last_cache_slot, sizeof(void*));
}
EX_LOAD_RUN_TIME_CACHE(op_array);
@@ -1691,12 +1691,12 @@ static zend_always_inline void i_init_code_execute_data(zend_execute_data *execu
zend_attach_symbol_table(execute_data);
- if (op_array->this_var != -1 && Z_OBJ(EX(This))) {
+ if (op_array->this_var != (uint32_t)-1 && EXPECTED(Z_OBJ(EX(This)))) {
ZVAL_OBJ(EX_VAR(op_array->this_var), Z_OBJ(EX(This)));
GC_REFCOUNT(Z_OBJ(EX(This)))++;
}
- if (!op_array->run_time_cache && op_array->last_cache_slot) {
+ if (!op_array->run_time_cache) {
op_array->run_time_cache = ecalloc(op_array->last_cache_slot, sizeof(void*));
}
EX_LOAD_RUN_TIME_CACHE(op_array);
@@ -1762,12 +1762,12 @@ static zend_always_inline void i_init_execute_data(zend_execute_data *execute_da
}
}
- if (op_array->this_var != -1 && Z_OBJ(EX(This))) {
+ if (op_array->this_var != (uint32_t)-1 && EXPECTED(Z_OBJ(EX(This)))) {
ZVAL_OBJ(EX_VAR(op_array->this_var), Z_OBJ(EX(This)));
GC_REFCOUNT(Z_OBJ(EX(This)))++;
}
- if (!op_array->run_time_cache && op_array->last_cache_slot) {
+ if (!op_array->run_time_cache) {
if (op_array->function_name) {
op_array->run_time_cache = zend_arena_calloc(&CG(arena), op_array->last_cache_slot, sizeof(void*));
} else {