Lines Matching refs:offset

1030 	zend_long offset;  in zend_check_string_offset()  local
1040 if (IS_LONG == is_numeric_string_ex(Z_STRVAL_P(dim), Z_STRLEN_P(dim), &offset, NULL, in zend_check_string_offset()
1046 return offset; in zend_check_string_offset()
1071 …c zend_always_inline zend_string* zend_jit_fetch_dim_str_offset(zend_string *str, zend_long offset) in zend_jit_fetch_dim_str_offset() argument
1073 if (UNEXPECTED((zend_ulong)offset >= (zend_ulong)ZSTR_LEN(str))) { in zend_jit_fetch_dim_str_offset()
1074 if (EXPECTED(offset < 0)) { in zend_jit_fetch_dim_str_offset()
1076 zend_long real_offset = (zend_long)ZSTR_LEN(str) + offset; in zend_jit_fetch_dim_str_offset()
1082 zend_error(E_WARNING, "Uninitialized string offset " ZEND_LONG_FMT, offset); in zend_jit_fetch_dim_str_offset()
1085 return ZSTR_CHAR((uint8_t)ZSTR_VAL(str)[offset]); in zend_jit_fetch_dim_str_offset()
1089 …nd_string* ZEND_FASTCALL zend_jit_fetch_dim_str_offset_r_helper(zend_string *str, zend_long offset) in zend_jit_fetch_dim_str_offset_r_helper() argument
1091 return zend_jit_fetch_dim_str_offset(str, offset); in zend_jit_fetch_dim_str_offset_r_helper()
1096 zend_long offset; in zend_jit_fetch_dim_str_r_helper() local
1102 offset = zend_check_string_offset(dim, BP_VAR_R); in zend_jit_fetch_dim_str_r_helper()
1104 zend_string *ret = zend_jit_fetch_dim_str_offset(str, offset); in zend_jit_fetch_dim_str_r_helper()
1109 offset = Z_LVAL_P(dim); in zend_jit_fetch_dim_str_r_helper()
1114 return zend_jit_fetch_dim_str_offset(str, offset); in zend_jit_fetch_dim_str_r_helper()
1119 zend_long offset; in zend_jit_fetch_dim_str_is_helper() local
1149 offset = zval_get_long_func(dim, /* is_strict */ false); in zend_jit_fetch_dim_str_is_helper()
1151 offset = Z_LVAL_P(dim); in zend_jit_fetch_dim_str_is_helper()
1154 if ((zend_ulong)offset >= (zend_ulong)ZSTR_LEN(str)) { in zend_jit_fetch_dim_str_is_helper()
1155 if (offset < 0) { in zend_jit_fetch_dim_str_is_helper()
1157 zend_long real_offset = (zend_long)ZSTR_LEN(str) + offset; in zend_jit_fetch_dim_str_is_helper()
1166 ZVAL_CHAR(result, (uint8_t)ZSTR_VAL(str)[offset]); in zend_jit_fetch_dim_str_is_helper()
1228 zend_long offset; in zend_assign_to_string_offset() local
1247 offset = zend_check_string_offset(dim, BP_VAR_W); in zend_assign_to_string_offset()
1262 offset = Z_LVAL_P(dim); in zend_assign_to_string_offset()
1264 if (offset < -(zend_long)ZSTR_LEN(s)) { in zend_assign_to_string_offset()
1266 zend_error(E_WARNING, "Illegal string offset " ZEND_LONG_FMT, offset); in zend_assign_to_string_offset()
1353 if (offset < 0) { /* Handle negative offset */ in zend_assign_to_string_offset()
1354 offset += (zend_long)ZSTR_LEN(s); in zend_assign_to_string_offset()
1357 if ((size_t)offset >= ZSTR_LEN(s)) { in zend_assign_to_string_offset()
1360 ZVAL_NEW_STR(str, zend_string_extend(s, (size_t)offset + 1, 0)); in zend_assign_to_string_offset()
1361 memset(Z_STRVAL_P(str) + old_len, ' ', offset - old_len); in zend_assign_to_string_offset()
1362 Z_STRVAL_P(str)[offset+1] = 0; in zend_assign_to_string_offset()
1367 Z_STRVAL_P(str)[offset] = c; in zend_assign_to_string_offset()
1734 static int ZEND_FASTCALL zend_jit_isset_dim_helper(zval *container, zval *offset) in zend_jit_isset_dim_helper() argument
1736 if (UNEXPECTED(Z_TYPE_P(offset) == IS_UNDEF)) { in zend_jit_isset_dim_helper()
1738 offset = &EG(uninitialized_zval); in zend_jit_isset_dim_helper()
1742 return Z_OBJ_HT_P(container)->has_dimension(Z_OBJ_P(container), offset, 0); in zend_jit_isset_dim_helper()
1746 if (EXPECTED(Z_TYPE_P(offset) == IS_LONG)) { in zend_jit_isset_dim_helper()
1747 lval = Z_LVAL_P(offset); in zend_jit_isset_dim_helper()
1756 ZVAL_DEREF(offset); in zend_jit_isset_dim_helper()
1757 if (Z_TYPE_P(offset) < IS_STRING /* simple scalar types */ in zend_jit_isset_dim_helper()
1758 || (Z_TYPE_P(offset) == IS_STRING /* or numeric string */ in zend_jit_isset_dim_helper()
1759 && IS_LONG == is_numeric_string(Z_STRVAL_P(offset), Z_STRLEN_P(offset), NULL, NULL, false))) { in zend_jit_isset_dim_helper()
1760 lval = zval_get_long_ex(offset, /* is_strict */ true); in zend_jit_isset_dim_helper()