summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2014-04-15 21:56:30 +0400
committerDmitry Stogov <dmitry@zend.com>2014-04-15 21:56:30 +0400
commitf9b26bc39a9ea9b1380628eeb0e6dad3c93cfcb0 (patch)
treeda606ba7a4dd4db0119c0f25af9c201eff56eb21
parent61e9b0d265364f9b99a1fdc69a9cafd4d3fc4721 (diff)
downloadphp-git-f9b26bc39a9ea9b1380628eeb0e6dad3c93cfcb0.tar.gz
Cleanup (2-nd round)
-rw-r--r--Zend/zend_API.c2
-rw-r--r--Zend/zend_constants.c27
-rw-r--r--Zend/zend_execute.c19
-rw-r--r--Zend/zend_execute_API.c24
-rw-r--r--Zend/zend_language_scanner.c495
-rw-r--r--Zend/zend_language_scanner.l44
-rw-r--r--Zend/zend_string.h39
-rw-r--r--Zend/zend_vm_def.h149
-rw-r--r--Zend/zend_vm_execute.h1595
-rw-r--r--ext/date/php_date.c10
-rw-r--r--ext/mbstring/mbstring.c44
-rw-r--r--ext/mysql/php_mysql.c5
-rw-r--r--ext/opcache/Optimizer/compact_literals.c1
-rw-r--r--ext/opcache/Optimizer/zend_optimizer_internal.h2
-rw-r--r--ext/opcache/ZendAccelerator.c13
-rw-r--r--ext/opcache/zend_accelerator_util_funcs.c9
-rw-r--r--ext/opcache/zend_persist.c9
-rw-r--r--ext/pcre/php_pcre.c1
-rw-r--r--ext/reflection/php_reflection.c11
-rw-r--r--ext/standard/basic_functions.c2
-rw-r--r--ext/standard/browscap.c7
-rw-r--r--ext/standard/file.c6
-rw-r--r--ext/standard/fsock.c2
-rw-r--r--ext/standard/html.c6
-rw-r--r--ext/standard/iptc.c3
-rw-r--r--ext/standard/quot_print.c3
-rw-r--r--ext/standard/scanf.c2
-rw-r--r--ext/standard/streamsfuncs.c18
-rw-r--r--ext/standard/string.c30
-rw-r--r--ext/standard/type.c2
-rw-r--r--ext/standard/uniqid.c2
-rw-r--r--ext/standard/var.c4
32 files changed, 535 insertions, 2051 deletions
diff --git a/Zend/zend_API.c b/Zend/zend_API.c
index ab22aba77e..fc0b424200 100644
--- a/Zend/zend_API.c
+++ b/Zend/zend_API.c
@@ -741,8 +741,8 @@ static const char *zend_parse_arg_impl(int arg_num, zval *arg, va_list *va, cons
}
break;
-//??? 'Z' iz not supported anymore and should be replaced with 'z'
case 'Z':
+ /* 'Z' iz not supported anymore and should be replaced with 'z' */
ZEND_ASSERT(c != 'Z');
default:
return "unknown";
diff --git a/Zend/zend_constants.c b/Zend/zend_constants.c
index 57e65a596b..d917fed502 100644
--- a/Zend/zend_constants.c
+++ b/Zend/zend_constants.c
@@ -39,7 +39,7 @@ void free_zend_constant(zval *zv)
if (c->name) {
STR_RELEASE(c->name);
}
- free(c);
+ pefree(c, c->flags & CONST_PERSISTENT);
}
@@ -47,20 +47,17 @@ static void copy_zend_constant(zval *zv)
{
zend_constant *c = Z_PTR_P(zv);
- Z_PTR_P(zv) = malloc(sizeof(zend_constant)/*, c->flags & CONST_PERSISTENT*/);
+ Z_PTR_P(zv) = pemalloc(sizeof(zend_constant), c->flags & CONST_PERSISTENT);
memcpy(Z_PTR_P(zv), c, sizeof(zend_constant));
c = Z_PTR_P(zv);
-//??? c->name = STR_DUP(c->name, c->flags & CONST_PERSISTENT);
c->name = STR_COPY(c->name);
if (!(c->flags & CONST_PERSISTENT)) {
zval_copy_ctor(&c->value);
} else {
-//??? internal_copy_ctor needed
if (Z_TYPE(c->value) == IS_STRING) {
Z_STR(c->value) = STR_DUP(Z_STR(c->value), 1);
}
-
}
}
@@ -213,7 +210,6 @@ ZEND_API void zend_register_stringl_constant(const char *name, uint name_len, ch
{
zend_constant c;
-//??? ZVAL_STRINGL(&c.value, strval, strlen, 0);
ZVAL_NEW_STR(&c.value, STR_INIT(strval, strlen, flags & CONST_PERSISTENT));
c.flags = flags;
c.name = STR_INIT(name, name_len, flags & CONST_PERSISTENT);
@@ -247,7 +243,7 @@ static zend_constant *zend_get_special_constant(const char *name, uint name_len
memcpy(const_name->val, "\0__CLASS__", sizeof("\0__CLASS__")-1);
zend_str_tolower_copy(const_name->val + sizeof("\0__CLASS__")-1, EG(scope)->name->val, EG(scope)->name->len);
if ((c = zend_hash_find_ptr(EG(zend_constants), const_name)) == NULL) {
- c = malloc(sizeof(zend_constant));
+ c = emalloc(sizeof(zend_constant));
memset(c, 0, sizeof(zend_constant));
ZVAL_STR(&c->value, STR_COPY(EG(scope)->name));
zend_hash_add_ptr(EG(zend_constants), const_name, c);
@@ -256,7 +252,7 @@ static zend_constant *zend_get_special_constant(const char *name, uint name_len
} else {
zend_string *const_name = STR_INIT("\0__CLASS__", sizeof("\0__CLASS__")-1, 0);
if ((c = zend_hash_find_ptr(EG(zend_constants), const_name)) == NULL) {
- c = malloc(sizeof(zend_constant));
+ c = emalloc(sizeof(zend_constant));
memset(c, 0, sizeof(zend_constant));
ZVAL_EMPTY_STRING(&c->value);
zend_hash_add_ptr(EG(zend_constants), const_name, c);
@@ -472,6 +468,19 @@ zend_constant *zend_quick_get_constant(const zend_literal *key, ulong flags TSRM
return c;
}
+static void* zend_hash_add_constant(HashTable *ht, zend_string *key, zend_constant *c)
+{
+ void *ret;
+ zend_constant *copy = pemalloc(sizeof(zend_constant), c->flags & CONST_PERSISTENT);
+
+ memcpy(copy, c, sizeof(zend_constant));
+ ret = zend_hash_add_ptr(ht, key, copy);
+ if (!ret) {
+ pefree(copy, c->flags & CONST_PERSISTENT);
+ }
+ return ret;
+}
+
ZEND_API int zend_register_constant(zend_constant *c TSRMLS_DC)
{
zend_string *lowercase_name = NULL;
@@ -502,7 +511,7 @@ ZEND_API int zend_register_constant(zend_constant *c TSRMLS_DC)
/* Check if the user is trying to define the internal pseudo constant name __COMPILER_HALT_OFFSET__ */
if ((c->name->len == sizeof("__COMPILER_HALT_OFFSET__")-1
&& !memcmp(name->val, "__COMPILER_HALT_OFFSET__", sizeof("__COMPILER_HALT_OFFSET__")-1))
- || zend_hash_add_mem(EG(zend_constants), name, c, sizeof(zend_constant)) == NULL) {
+ || zend_hash_add_constant(EG(zend_constants), name, c) == NULL) {
/* The internal __COMPILER_HALT_OFFSET__ is prefixed by NULL byte */
if (c->name->val[0] == '\0' && c->name->len > sizeof("\0__COMPILER_HALT_OFFSET__")-1
diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c
index 0a1f9d6d6f..d548c4b695 100644
--- a/Zend/zend_execute.c
+++ b/Zend/zend_execute.c
@@ -1155,11 +1155,6 @@ convert_to_array:
if (!Z_OBJ_HT_P(container)->read_dimension) {
zend_error_noreturn(E_ERROR, "Cannot use object as array");
} else {
-//??? if (dim_type == IS_TMP_VAR) {
-//??? zval *orig = dim;
-//??? MAKE_REAL_ZVAL_PTR(dim);
-//??? ZVAL_NULL(orig);
-//??? }
retval = Z_OBJ_HT_P(container)->read_dimension(container, dim, type, result TSRMLS_CC);
if (UNEXPECTED(retval == &EG(uninitialized_zval))) {
@@ -1182,9 +1177,6 @@ convert_to_array:
zend_error(E_NOTICE, "Indirect modification of overloaded element of %s has no effect", ce->name->val);
}
}
-//??? AI_SET_PTR(result, retval);
-//??? PZVAL_LOCK(retval);
-//??? ZVAL_COPY(result, retval);
if (result != retval) {
if (is_ref) {
SEPARATE_ZVAL_TO_MAKE_IS_REF(retval);
@@ -1196,9 +1188,6 @@ convert_to_array:
} else {
ZVAL_INDIRECT(result, &EG(error_zval));
}
-//??? if (dim_type == IS_TMP_VAR) {
-//??? zval_ptr_dtor(dim);
-//??? }
}
} else if (EXPECTED(Z_TYPE_P(container) == IS_NULL)) {
if (container == &EG(error_zval)) {
@@ -1302,11 +1291,6 @@ static zend_always_inline void zend_fetch_dimension_address_read(zval *result, z
if (!Z_OBJ_HT_P(container)->read_dimension) {
zend_error_noreturn(E_ERROR, "Cannot use object as array");
} else {
-//??? if (dim_type == IS_TMP_VAR) {
-//??? zval *orig = dim;
-//??? MAKE_REAL_ZVAL_PTR(dim);
-//??? ZVAL_NULL(orig);
-//??? }
retval = Z_OBJ_HT_P(container)->read_dimension(container, dim, type, result TSRMLS_CC);
if (result) {
@@ -1318,9 +1302,6 @@ static zend_always_inline void zend_fetch_dimension_address_read(zval *result, z
ZVAL_NULL(result);
}
}
-//??? if (dim_type == IS_TMP_VAR) {
-//??? zval_ptr_dtor(dim);
-//??? }
}
} else {
ZVAL_NULL(result);
diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c
index fce8c85ea5..31caf41789 100644
--- a/Zend/zend_execute_API.c
+++ b/Zend/zend_execute_API.c
@@ -483,15 +483,6 @@ ZEND_API int zend_is_true(zval *op TSRMLS_DC) /* {{{ */
#define Z_REAL_TYPE_P(p) (Z_TYPE_P(p) & ~IS_VISITED_CONSTANT)
#define MARK_CONSTANT_VISITED(p) Z_TYPE_INFO_P(p) |= IS_VISITED_CONSTANT
-static void zval_deep_copy(zval *p)
-{
-//??? zval value;
-//???
-//??? ZVAL_DUP(&value, p);
-//??? ZVAL_COPY_VALUE(p, &value);
- zval_copy_ctor(p);
-}
-
ZEND_API int zval_update_constant_ex(zval *p, void *arg, zend_class_entry *scope TSRMLS_DC) /* {{{ */
{
zend_bool inline_change = (zend_bool) (zend_uintptr_t) arg;
@@ -502,15 +493,10 @@ ZEND_API int zval_update_constant_ex(zval *p, void *arg, zend_class_entry *scope
zend_error(E_ERROR, "Cannot declare self-referencing constant '%s'", Z_STRVAL_P(p));
} else if (Z_TYPE_P(p) == IS_CONSTANT) {
int refcount;
-//??? zend_uchar is_ref;
SEPARATE_ZVAL_IF_NOT_REF(p);
-
MARK_CONSTANT_VISITED(p);
-
refcount = Z_REFCOUNTED_P(p) ? Z_REFCOUNT_P(p) : 1;
-//??? is_ref = Z_ISREF_P(p);
-
if (!zend_get_constant_ex(Z_STRVAL_P(p), Z_STRLEN_P(p), &const_value, scope, Z_CONST_FLAGS_P(p) TSRMLS_CC)) {
char *actual = Z_STRVAL_P(p);
@@ -524,7 +510,6 @@ ZEND_API int zval_update_constant_ex(zval *p, void *arg, zend_class_entry *scope
STR_RELEASE(Z_STR_P(p));
Z_STR_P(p) = tmp;
} else {
-//??? Z_STRVAL_P(p) = colon + 1;
Z_STR_P(p) = STR_INIT(colon + 1, len, 0);
}
Z_TYPE_FLAGS_P(p) = IS_TYPE_REFCOUNTED | IS_TYPE_COPYABLE;
@@ -581,7 +566,6 @@ ZEND_API int zval_update_constant_ex(zval *p, void *arg, zend_class_entry *scope
}
if (Z_REFCOUNTED_P(p)) Z_SET_REFCOUNT_P(p, refcount);
-//??? Z_SET_ISREF_TO_P(p, is_ref);
} else if (Z_TYPE_P(p) == IS_CONSTANT_ARRAY) {
zval *element, new_val;
zend_string *str_index;
@@ -595,7 +579,7 @@ ZEND_API int zval_update_constant_ex(zval *p, void *arg, zend_class_entry *scope
HashTable *ht = Z_ARRVAL_P(p);
ZVAL_NEW_ARR(p);
zend_hash_init(Z_ARRVAL_P(p), zend_hash_num_elements(ht), NULL, ZVAL_PTR_DTOR, 0);
- zend_hash_copy(Z_ARRVAL_P(p), ht, zval_deep_copy);
+ zend_hash_copy(Z_ARRVAL_P(p), ht, ZVAL_COPY_CTOR);
}
/* First go over the array and see if there are any constant indices */
@@ -616,7 +600,6 @@ ZEND_API int zval_update_constant_ex(zval *p, void *arg, zend_class_entry *scope
zend_ast_evaluate(&const_value, ast->ast, scope TSRMLS_CC);
zend_ast_destroy(ast->ast);
efree(ast);
-//???
} else if (!zend_get_constant_ex(str_index->val, str_index->len, &const_value, scope, GC_FLAGS(str_index) & ~(IS_STR_PERSISTENT | IS_STR_INTERNED |IS_STR_PERMANENT) TSRMLS_CC)) {
char *actual, *str;
const char *save = str_index->val;
@@ -657,9 +640,6 @@ ZEND_API int zval_update_constant_ex(zval *p, void *arg, zend_class_entry *scope
if (Z_REFCOUNTED_P(element) && Z_REFCOUNT_P(element) > 1) {
ZVAL_DUP(&new_val, element);
-
- /* preserve this bit for inheritance */
-//??? Z_TYPE_P(element) |= IS_CONSTANT_INDEX;
zval_ptr_dtor(element);
ZVAL_COPY_VALUE(element, &new_val);
}
@@ -990,7 +970,7 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS
fci_cache->initialized = 0;
}
} else { /* ZEND_OVERLOADED_FUNCTION */
-//??? ALLOC_INIT_ZVAL(*fci->retval_ptr_ptr);
+ ZVAL_NULL(fci->retval);
/* Not sure what should be done here if it's a static method */
if (fci->object) {
diff --git a/Zend/zend_language_scanner.c b/Zend/zend_language_scanner.c
index d1c93bc32e..cd7119f43d 100644
--- a/Zend/zend_language_scanner.c
+++ b/Zend/zend_language_scanner.c
@@ -865,7 +865,7 @@ ZEND_API void zend_multibyte_yyinput_again(zend_encoding_filter old_input_filter
}
-//??? use zend_string saving memalloc
+// TODO: avoid reallocation ???
# define zend_copy_value(zendlval, yytext, yyleng) \
if (SCNG(output_filter)) { \
size_t sz = 0; \
@@ -877,6 +877,15 @@ ZEND_API void zend_multibyte_yyinput_again(zend_encoding_filter old_input_filter
ZVAL_STRINGL(zendlval, yytext, yyleng); \
}
+// TODO: some extensions might need content, but we don't copy it intentional ???
+#if 0
+# define DUMMY_STRINGL(zendlval, yytext, yyleng) \
+ ZVAL_STRINGL(zendlval, yytext, yyleng)
+#else
+# define DUMMY_STRINGL(zendlval, yytext, yyleng) \
+ ZVAL_EMPTY_STRING(zendlval)
+#endif
+
static void zend_scan_escape_string(zval *zendlval, char *str, int len, char quote_type TSRMLS_DC)
{
register char *s, *t;
@@ -990,7 +999,7 @@ static void zend_scan_escape_string(zval *zendlval, char *str, int len, char quo
if (SCNG(output_filter)) {
size_t sz = 0;
unsigned char *str;
- //??? use zend_string saving memalloc
+ // TODO: avoid realocation ???
s = Z_STRVAL_P(zendlval);
SCNG(output_filter)(&str, &sz, (unsigned char *)s, (size_t)Z_STRLEN_P(zendlval) TSRMLS_CC);
zval_ptr_dtor(zendlval);
@@ -1008,7 +1017,7 @@ restart:
yymore_restart:
-#line 1012 "Zend/zend_language_scanner.c"
+#line 1021 "Zend/zend_language_scanner.c"
{
YYCTYPE yych;
unsigned int yyaccept = 0;
@@ -1107,7 +1116,7 @@ yyc_INITIAL:
yy3:
YYDEBUG(3, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1770 "Zend/zend_language_scanner.l"
+#line 1772 "Zend/zend_language_scanner.l"
{
if (YYCURSOR > YYLIMIT) {
return 0;
@@ -1155,7 +1164,7 @@ inline_html:
int readsize;
char *s = NULL;
size_t sz = 0;
- //??? use zend_string saving memalloc
+ // TODO: avoid reallocation ???
readsize = SCNG(output_filter)((unsigned char **)&s, &sz, (unsigned char *)yytext, (size_t)yyleng TSRMLS_CC);
ZVAL_STRINGL(zendlval, s, sz);
efree(s);
@@ -1168,7 +1177,7 @@ inline_html:
HANDLE_NEWLINES(yytext, yyleng);
return T_INLINE_HTML;
}
-#line 1172 "Zend/zend_language_scanner.c"
+#line 1181 "Zend/zend_language_scanner.c"
yy4:
YYDEBUG(4, *YYCURSOR);
yych = *++YYCURSOR;
@@ -1186,36 +1195,34 @@ yy5:
yy6:
YYDEBUG(6, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1759 "Zend/zend_language_scanner.l"
+#line 1762 "Zend/zend_language_scanner.l"
{
if (CG(short_tags)) {
-//??? ZVAL_STRINGL(zendlval, yytext, yyleng);
- ZVAL_EMPTY_STRING(zendlval); /* tricky way, no copying intentional */
+ DUMMY_STRINGL(zendlval, yytext, yyleng);
BEGIN(ST_IN_SCRIPTING);
return T_OPEN_TAG;
} else {
goto inline_char_handler;
}
}
-#line 1201 "Zend/zend_language_scanner.c"
+#line 1209 "Zend/zend_language_scanner.c"
yy7:
YYDEBUG(7, *YYCURSOR);
++YYCURSOR;
if ((yych = *YYCURSOR) == '=') goto yy43;
YYDEBUG(8, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1738 "Zend/zend_language_scanner.l"
+#line 1743 "Zend/zend_language_scanner.l"
{
if (CG(asp_tags)) {
-//??? ZVAL_STRINGL(zendlval, yytext, yyleng);
- ZVAL_EMPTY_STRING(zendlval); /* tricky way to no copying - intentional */
+ DUMMY_STRINGL(zendlval, yytext, yyleng);
BEGIN(ST_IN_SCRIPTING);
return T_OPEN_TAG;
} else {
goto inline_char_handler;
}
}
-#line 1219 "Zend/zend_language_scanner.c"
+#line 1226 "Zend/zend_language_scanner.c"
yy9:
YYDEBUG(9, *YYCURSOR);
yych = *++YYCURSOR;
@@ -1401,7 +1408,7 @@ yy35:
++YYCURSOR;
YYDEBUG(38, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1701 "Zend/zend_language_scanner.l"
+#line 1709 "Zend/zend_language_scanner.l"
{
YYCTYPE *bracket = (YYCTYPE*)zend_memrchr(yytext, '<', yyleng - (sizeof("script language=php>") - 1));
@@ -1412,12 +1419,11 @@ yy35:
}
HANDLE_NEWLINES(yytext, yyleng);
-//??? ZVAL_STRINGL(zendlval, yytext, yyleng);
- ZVAL_EMPTY_STRING(zendlval); /* tricky way to no copying - intentional */
+ DUMMY_STRINGL(zendlval, yytext, yyleng);
BEGIN(ST_IN_SCRIPTING);
return T_OPEN_TAG;
}
-#line 1421 "Zend/zend_language_scanner.c"
+#line 1427 "Zend/zend_language_scanner.c"
yy39:
YYDEBUG(39, *YYCURSOR);
yych = *++YYCURSOR;
@@ -1444,31 +1450,29 @@ yy43:
++YYCURSOR;
YYDEBUG(44, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1718 "Zend/zend_language_scanner.l"
+#line 1725 "Zend/zend_language_scanner.l"
{
if (CG(asp_tags)) {
-//??? ZVAL_STRINGL(zendlval, yytext, yyleng);
- ZVAL_EMPTY_STRING(zendlval); /* tricky way to no copying - intentional */
+ DUMMY_STRINGL(zendlval, yytext, yyleng);
BEGIN(ST_IN_SCRIPTING);
return T_OPEN_TAG_WITH_ECHO;
} else {
goto inline_char_handler;
}
}
-#line 1459 "Zend/zend_language_scanner.c"
+#line 1464 "Zend/zend_language_scanner.c"
yy45:
YYDEBUG(45, *YYCURSOR);
++YYCURSOR;
YYDEBUG(46, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1730 "Zend/zend_language_scanner.l"
+#line 1736 "Zend/zend_language_scanner.l"
{
-//??? ZVAL_STRINGL(zendlval, yytext, yyleng);
- ZVAL_EMPTY_STRING(zendlval); /* tricky way to no copying - intentional */
+ DUMMY_STRINGL(zendlval, yytext, yyleng);
BEGIN(ST_IN_SCRIPTING);
return T_OPEN_TAG_WITH_ECHO;
}
-#line 1472 "Zend/zend_language_scanner.c"
+#line 1476 "Zend/zend_language_scanner.c"
yy47:
YYDEBUG(47, *YYCURSOR);
yych = *++YYCURSOR;
@@ -1495,15 +1499,14 @@ yy50:
yy51:
YYDEBUG(51, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1750 "Zend/zend_language_scanner.l"
+#line 1754 "Zend/zend_language_scanner.l"
{
-//??? ZVAL_STRINGL(zendlval, yytext, yyleng);
- ZVAL_EMPTY_STRING(zendlval); /* tricky way, no copying intentional */
+ DUMMY_STRINGL(zendlval, yytext, yyleng);
HANDLE_NEWLINE(yytext[yyleng-1]);
BEGIN(ST_IN_SCRIPTING);
return T_OPEN_TAG;
}
-#line 1507 "Zend/zend_language_scanner.c"
+#line 1510 "Zend/zend_language_scanner.c"
yy52:
YYDEBUG(52, *YYCURSOR);
++YYCURSOR;
@@ -1615,7 +1618,7 @@ yy56:
zend_scan_escape_string(zendlval, yytext, yyleng, '`' TSRMLS_CC);
return T_ENCAPSED_AND_WHITESPACE;
}
-#line 1619 "Zend/zend_language_scanner.c"
+#line 1622 "Zend/zend_language_scanner.c"
yy57:
YYDEBUG(57, *YYCURSOR);
yych = *++YYCURSOR;
@@ -1631,7 +1634,7 @@ yy58:
BEGIN(ST_IN_SCRIPTING);
return '`';
}
-#line 1635 "Zend/zend_language_scanner.c"
+#line 1638 "Zend/zend_language_scanner.c"
yy60:
YYDEBUG(60, *YYCURSOR);
yych = *++YYCURSOR;
@@ -1648,7 +1651,7 @@ yy61:
yyless(1);
return T_CURLY_OPEN;
}
-#line 1652 "Zend/zend_language_scanner.c"
+#line 1655 "Zend/zend_language_scanner.c"
yy63:
YYDEBUG(63, *YYCURSOR);
yyaccept = 0;
@@ -1664,23 +1667,23 @@ yy63:
yy65:
YYDEBUG(65, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1851 "Zend/zend_language_scanner.l"
+#line 1853 "Zend/zend_language_scanner.l"
{
zend_copy_value(zendlval, (yytext+1), (yyleng-1));
return T_VARIABLE;
}
-#line 1673 "Zend/zend_language_scanner.c"
+#line 1676 "Zend/zend_language_scanner.c"
yy66:
YYDEBUG(66, *YYCURSOR);
++YYCURSOR;
YYDEBUG(67, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1468 "Zend/zend_language_scanner.l"
+#line 1476 "Zend/zend_language_scanner.l"
{
yy_push_state(ST_LOOKING_FOR_VARNAME TSRMLS_CC);
return T_DOLLAR_OPEN_CURLY_BRACES;
}
-#line 1684 "Zend/zend_language_scanner.c"
+#line 1687 "Zend/zend_language_scanner.c"
yy68:
YYDEBUG(68, *YYCURSOR);
yych = *++YYCURSOR;
@@ -1694,14 +1697,14 @@ yy70:
++YYCURSOR;
YYDEBUG(71, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1844 "Zend/zend_language_scanner.l"
+#line 1846 "Zend/zend_language_scanner.l"
{
yyless(yyleng - 1);
yy_push_state(ST_VAR_OFFSET TSRMLS_CC);
zend_copy_value(zendlval, (yytext+1), (yyleng-1));
return T_VARIABLE;
}
-#line 1705 "Zend/zend_language_scanner.c"
+#line 1708 "Zend/zend_language_scanner.c"
yy72:
YYDEBUG(72, *YYCURSOR);
yych = *++YYCURSOR;
@@ -1719,14 +1722,14 @@ yy73:
++YYCURSOR;
YYDEBUG(74, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1835 "Zend/zend_language_scanner.l"
+#line 1837 "Zend/zend_language_scanner.l"
{
yyless(yyleng - 3);
yy_push_state(ST_LOOKING_FOR_PROPERTY TSRMLS_CC);
zend_copy_value(zendlval, (yytext+1), (yyleng-1));
return T_VARIABLE;
}
-#line 1730 "Zend/zend_language_scanner.c"
+#line 1733 "Zend/zend_language_scanner.c"
}
/* *********************************** */
yyc_ST_DOUBLE_QUOTES:
@@ -1843,7 +1846,7 @@ double_quotes_scan_done:
zend_scan_escape_string(zendlval, yytext, yyleng, '"' TSRMLS_CC);
return T_ENCAPSED_AND_WHITESPACE;
}
-#line 1847 "Zend/zend_language_scanner.c"
+#line 1850 "Zend/zend_language_scanner.c"
yy79:
YYDEBUG(79, *YYCURSOR);
yych = *++YYCURSOR;
@@ -1859,7 +1862,7 @@ yy80:
BEGIN(ST_IN_SCRIPTING);
return '"';
}
-#line 1863 "Zend/zend_language_scanner.c"
+#line 1866 "Zend/zend_language_scanner.c"
yy82:
YYDEBUG(82, *YYCURSOR);
yych = *++YYCURSOR;
@@ -1876,7 +1879,7 @@ yy83:
yyless(1);
return T_CURLY_OPEN;
}
-#line 1880 "Zend/zend_language_scanner.c"
+#line 1883 "Zend/zend_language_scanner.c"
yy85:
YYDEBUG(85, *YYCURSOR);
yyaccept = 0;
@@ -1892,23 +1895,23 @@ yy85:
yy87:
YYDEBUG(87, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1851 "Zend/zend_language_scanner.l"
+#line 1853 "Zend/zend_language_scanner.l"
{
zend_copy_value(zendlval, (yytext+1), (yyleng-1));
return T_VARIABLE;
}
-#line 1901 "Zend/zend_language_scanner.c"
+#line 1904 "Zend/zend_language_scanner.c"
yy88:
YYDEBUG(88, *YYCURSOR);
++YYCURSOR;
YYDEBUG(89, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1468 "Zend/zend_language_scanner.l"
+#line 1476 "Zend/zend_language_scanner.l"
{
yy_push_state(ST_LOOKING_FOR_VARNAME TSRMLS_CC);
return T_DOLLAR_OPEN_CURLY_BRACES;
}
-#line 1912 "Zend/zend_language_scanner.c"
+#line 1915 "Zend/zend_language_scanner.c"
yy90:
YYDEBUG(90, *YYCURSOR);
yych = *++YYCURSOR;
@@ -1922,14 +1925,14 @@ yy92:
++YYCURSOR;
YYDEBUG(93, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1844 "Zend/zend_language_scanner.l"
+#line 1846 "Zend/zend_language_scanner.l"
{
yyless(yyleng - 1);
yy_push_state(ST_VAR_OFFSET TSRMLS_CC);
zend_copy_value(zendlval, (yytext+1), (yyleng-1));
return T_VARIABLE;
}
-#line 1933 "Zend/zend_language_scanner.c"
+#line 1936 "Zend/zend_language_scanner.c"
yy94:
YYDEBUG(94, *YYCURSOR);
yych = *++YYCURSOR;
@@ -1947,14 +1950,14 @@ yy95:
++YYCURSOR;
YYDEBUG(96, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1835 "Zend/zend_language_scanner.l"
+#line 1837 "Zend/zend_language_scanner.l"
{
yyless(yyleng - 3);
yy_push_state(ST_LOOKING_FOR_PROPERTY TSRMLS_CC);
zend_copy_value(zendlval, (yytext+1), (yyleng-1));
return T_VARIABLE;
}
-#line 1958 "Zend/zend_language_scanner.c"
+#line 1961 "Zend/zend_language_scanner.c"
}
/* *********************************** */
yyc_ST_END_HEREDOC:
@@ -1978,7 +1981,7 @@ yyc_ST_END_HEREDOC:
BEGIN(ST_IN_SCRIPTING);
return T_END_HEREDOC;
}
-#line 1982 "Zend/zend_language_scanner.c"
+#line 1985 "Zend/zend_language_scanner.c"
/* *********************************** */
yyc_ST_HEREDOC:
{
@@ -2113,7 +2116,7 @@ heredoc_scan_done:
zend_scan_escape_string(zendlval, yytext, yyleng - newline, 0 TSRMLS_CC);
return T_ENCAPSED_AND_WHITESPACE;
}
-#line 2117 "Zend/zend_language_scanner.c"
+#line 2120 "Zend/zend_language_scanner.c"
yy105:
YYDEBUG(105, *YYCURSOR);
yych = *++YYCURSOR;
@@ -2135,7 +2138,7 @@ yy107:
yyless(1);
return T_CURLY_OPEN;
}
-#line 2139 "Zend/zend_language_scanner.c"
+#line 2142 "Zend/zend_language_scanner.c"
yy109:
YYDEBUG(109, *YYCURSOR);
yyaccept = 0;
@@ -2151,23 +2154,23 @@ yy109:
yy111:
YYDEBUG(111, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1851 "Zend/zend_language_scanner.l"
+#line 1853 "Zend/zend_language_scanner.l"
{
zend_copy_value(zendlval, (yytext+1), (yyleng-1));
return T_VARIABLE;
}
-#line 2160 "Zend/zend_language_scanner.c"
+#line 2163 "Zend/zend_language_scanner.c"
yy112:
YYDEBUG(112, *YYCURSOR);
++YYCURSOR;
YYDEBUG(113, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1468 "Zend/zend_language_scanner.l"
+#line 1476 "Zend/zend_language_scanner.l"
{
yy_push_state(ST_LOOKING_FOR_VARNAME TSRMLS_CC);
return T_DOLLAR_OPEN_CURLY_BRACES;
}
-#line 2171 "Zend/zend_language_scanner.c"
+#line 2174 "Zend/zend_language_scanner.c"
yy114:
YYDEBUG(114, *YYCURSOR);
yych = *++YYCURSOR;
@@ -2181,14 +2184,14 @@ yy116:
++YYCURSOR;
YYDEBUG(117, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1844 "Zend/zend_language_scanner.l"
+#line 1846 "Zend/zend_language_scanner.l"
{
yyless(yyleng - 1);
yy_push_state(ST_VAR_OFFSET TSRMLS_CC);
zend_copy_value(zendlval, (yytext+1), (yyleng-1));
return T_VARIABLE;
}
-#line 2192 "Zend/zend_language_scanner.c"
+#line 2195 "Zend/zend_language_scanner.c"
yy118:
YYDEBUG(118, *YYCURSOR);
yych = *++YYCURSOR;
@@ -2206,14 +2209,14 @@ yy119:
++YYCURSOR;
YYDEBUG(120, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1835 "Zend/zend_language_scanner.l"
+#line 1837 "Zend/zend_language_scanner.l"
{
yyless(yyleng - 3);
yy_push_state(ST_LOOKING_FOR_PROPERTY TSRMLS_CC);
zend_copy_value(zendlval, (yytext+1), (yyleng-1));
return T_VARIABLE;
}
-#line 2217 "Zend/zend_language_scanner.c"
+#line 2220 "Zend/zend_language_scanner.c"
}
/* *********************************** */
yyc_ST_IN_SCRIPTING:
@@ -2396,12 +2399,12 @@ yy123:
yy124:
YYDEBUG(124, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1873 "Zend/zend_language_scanner.l"
+#line 1875 "Zend/zend_language_scanner.l"
{
zend_copy_value(zendlval, yytext, yyleng);
return T_STRING;
}
-#line 2405 "Zend/zend_language_scanner.c"
+#line 2408 "Zend/zend_language_scanner.c"
yy125:
YYDEBUG(125, *YYCURSOR);
yych = *++YYCURSOR;
@@ -2633,11 +2636,11 @@ yy138:
yy139:
YYDEBUG(139, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1457 "Zend/zend_language_scanner.l"
+#line 1465 "Zend/zend_language_scanner.l"
{
return yytext[0];
}
-#line 2641 "Zend/zend_language_scanner.c"
+#line 2644 "Zend/zend_language_scanner.c"
yy140:
YYDEBUG(140, *YYCURSOR);
++YYCURSOR;
@@ -2646,14 +2649,13 @@ yy140:
yy141:
YYDEBUG(141, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1186 "Zend/zend_language_scanner.l"
+#line 1195 "Zend/zend_language_scanner.l"
{
-//??? ZVAL_STRINGL(zendlval, yytext, yyleng);
- ZVAL_EMPTY_STRING(zendlval); /* tricky way to no copying - intentional */
+ DUMMY_STRINGL(zendlval, yytext, yyleng);
HANDLE_NEWLINES(yytext, yyleng);
return T_WHITESPACE;
}
-#line 2657 "Zend/zend_language_scanner.c"
+#line 2659 "Zend/zend_language_scanner.c"
yy142:
YYDEBUG(142, *YYCURSOR);
yych = *++YYCURSOR;
@@ -2664,11 +2666,11 @@ yy143:
++YYCURSOR;
YYDEBUG(144, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1213 "Zend/zend_language_scanner.l"
+#line 1221 "Zend/zend_language_scanner.l"
{
return T_NS_SEPARATOR;
}
-#line 2672 "Zend/zend_language_scanner.c"
+#line 2674 "Zend/zend_language_scanner.c"
yy145:
YYDEBUG(145, *YYCURSOR);
yyaccept = 1;
@@ -2901,18 +2903,18 @@ yy168:
++YYCURSOR;
YYDEBUG(169, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1462 "Zend/zend_language_scanner.l"
+#line 1470 "Zend/zend_language_scanner.l"
{
yy_push_state(ST_IN_SCRIPTING TSRMLS_CC);
return '{';
}
-#line 2910 "Zend/zend_language_scanner.c"
+#line 2912 "Zend/zend_language_scanner.c"
yy170:
YYDEBUG(170, *YYCURSOR);
++YYCURSOR;
YYDEBUG(171, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1474 "Zend/zend_language_scanner.l"
+#line 1482 "Zend/zend_language_scanner.l"
{
RESET_DOC_COMMENT();
if (!zend_stack_is_empty(&SCNG(state_stack))) {
@@ -2920,7 +2922,7 @@ yy170:
}
return '}';
}
-#line 2924 "Zend/zend_language_scanner.c"
+#line 2926 "Zend/zend_language_scanner.c"
yy172:
YYDEBUG(172, *YYCURSOR);
yyaccept = 2;
@@ -2948,7 +2950,7 @@ yy172:
yy173:
YYDEBUG(173, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1522 "Zend/zend_language_scanner.l"
+#line 1530 "Zend/zend_language_scanner.l"
{
if (yyleng < MAX_LENGTH_OF_LONG - 1) { /* Won't overflow */
ZVAL_LONG(zendlval, strtol(yytext, NULL, 0));
@@ -2966,7 +2968,7 @@ yy173:
}
return T_LNUMBER;
}
-#line 2970 "Zend/zend_language_scanner.c"
+#line 2972 "Zend/zend_language_scanner.c"
yy174:
YYDEBUG(174, *YYCURSOR);
yyaccept = 2;
@@ -2994,7 +2996,7 @@ yy176:
yy177:
YYDEBUG(177, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1879 "Zend/zend_language_scanner.l"
+#line 1881 "Zend/zend_language_scanner.l"
{
while (YYCURSOR < YYLIMIT) {
switch (*YYCURSOR++) {
@@ -3028,7 +3030,7 @@ yy177:
return T_COMMENT;
}
-#line 3032 "Zend/zend_language_scanner.c"
+#line 3034 "Zend/zend_language_scanner.c"
yy178:
YYDEBUG(178, *YYCURSOR);
++YYCURSOR;
@@ -3096,14 +3098,14 @@ yy179:
size_t sz = 0;
char *str = NULL;
s = Z_STRVAL_P(zendlval);
- //??? use zend_string saving memalloc
+ // TODO: avoid reallocation ???
SCNG(output_filter)((unsigned char **)&str, &sz, (unsigned char *)s, (size_t)Z_STRLEN_P(zendlval) TSRMLS_CC);
ZVAL_STRINGL(zendlval, str, sz);
efree(s);
}
return T_CONSTANT_ENCAPSED_STRING;
}
-#line 3107 "Zend/zend_language_scanner.c"
+#line 3109 "Zend/zend_language_scanner.c"
yy180:
YYDEBUG(180, *YYCURSOR);
++YYCURSOR;
@@ -3151,7 +3153,7 @@ yy181:
BEGIN(ST_DOUBLE_QUOTES);
return '"';
}
-#line 3155 "Zend/zend_language_scanner.c"
+#line 3157 "Zend/zend_language_scanner.c"
yy182:
YYDEBUG(182, *YYCURSOR);
++YYCURSOR;
@@ -3162,7 +3164,7 @@ yy182:
BEGIN(ST_BACKQUOTE);
return '`';
}
-#line 3166 "Zend/zend_language_scanner.c"
+#line 3168 "Zend/zend_language_scanner.c"
yy184:
YYDEBUG(184, *YYCURSOR);
++YYCURSOR;
@@ -3177,7 +3179,7 @@ yy184:
zend_error(E_COMPILE_WARNING,"Unexpected character in input: '%c' (ASCII=%d) state=%d", yytext[0], yytext[0], YYSTATE);
goto restart;
}
-#line 3181 "Zend/zend_language_scanner.c"
+#line 3183 "Zend/zend_language_scanner.c"
yy186:
YYDEBUG(186, *YYCURSOR);
++YYCURSOR;
@@ -3204,12 +3206,12 @@ yy188:
yy190:
YYDEBUG(190, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1577 "Zend/zend_language_scanner.l"
+#line 1585 "Zend/zend_language_scanner.l"
{
ZVAL_DOUBLE(zendlval, zend_strtod(yytext, NULL));
return T_DNUMBER;
}
-#line 3213 "Zend/zend_language_scanner.c"
+#line 3215 "Zend/zend_language_scanner.c"
yy191:
YYDEBUG(191, *YYCURSOR);
yyaccept = 2;
@@ -3301,7 +3303,7 @@ yy200:
}
YYDEBUG(202, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1499 "Zend/zend_language_scanner.l"
+#line 1507 "Zend/zend_language_scanner.l"
{
char *bin = yytext + 2; /* Skip "0b" */
int len = yyleng - 2;
@@ -3324,7 +3326,7 @@ yy200:
return T_DNUMBER;
}
}
-#line 3328 "Zend/zend_language_scanner.c"
+#line 3330 "Zend/zend_language_scanner.c"
yy203:
YYDEBUG(203, *YYCURSOR);
++YYCURSOR;
@@ -3336,7 +3338,7 @@ yy203:
}
YYDEBUG(205, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1540 "Zend/zend_language_scanner.l"
+#line 1548 "Zend/zend_language_scanner.l"
{
char *hex = yytext + 2; /* Skip "0x" */
int len = yyleng - 2;
@@ -3359,7 +3361,7 @@ yy203:
return T_DNUMBER;
}
}
-#line 3363 "Zend/zend_language_scanner.c"
+#line 3365 "Zend/zend_language_scanner.c"
yy206:
YYDEBUG(206, *YYCURSOR);
++YYCURSOR;
@@ -3368,14 +3370,13 @@ yy206:
yy207:
YYDEBUG(207, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1946 "Zend/zend_language_scanner.l"
+#line 1948 "Zend/zend_language_scanner.l"
{
-//??? ZVAL_STRINGL(zendlval, yytext, yyleng);
- ZVAL_EMPTY_STRING(zendlval); /* tricky way to no copying - intentional */
+ DUMMY_STRINGL(zendlval, yytext, yyleng);
BEGIN(INITIAL);
return T_CLOSE_TAG; /* implicit ';' at php-end tag */
}
-#line 3379 "Zend/zend_language_scanner.c"
+#line 3380 "Zend/zend_language_scanner.c"
yy208:
YYDEBUG(208, *YYCURSOR);
yych = *++YYCURSOR;
@@ -3409,12 +3410,12 @@ yy210:
yy212:
YYDEBUG(212, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1851 "Zend/zend_language_scanner.l"
+#line 1853 "Zend/zend_language_scanner.l"
{
zend_copy_value(zendlval, (yytext+1), (yyleng-1));
return T_VARIABLE;
}
-#line 3418 "Zend/zend_language_scanner.c"
+#line 3419 "Zend/zend_language_scanner.c"
yy213:
YYDEBUG(213, *YYCURSOR);
yych = *++YYCURSOR;
@@ -3428,11 +3429,11 @@ yy214:
}
YYDEBUG(215, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1445 "Zend/zend_language_scanner.l"
+#line 1453 "Zend/zend_language_scanner.l"
{
return T_LOGICAL_XOR;
}
-#line 3436 "Zend/zend_language_scanner.c"
+#line 3437 "Zend/zend_language_scanner.c"
yy216:
YYDEBUG(216, *YYCURSOR);
++YYCURSOR;
@@ -3441,61 +3442,61 @@ yy216:
}
YYDEBUG(217, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1437 "Zend/zend_language_scanner.l"
+#line 1445 "Zend/zend_language_scanner.l"
{
return T_LOGICAL_OR;
}
-#line 3449 "Zend/zend_language_scanner.c"
+#line 3450 "Zend/zend_language_scanner.c"
yy218:
YYDEBUG(218, *YYCURSOR);
++YYCURSOR;
YYDEBUG(219, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1425 "Zend/zend_language_scanner.l"
+#line 1433 "Zend/zend_language_scanner.l"
{
return T_XOR_EQUAL;
}
-#line 3459 "Zend/zend_language_scanner.c"
+#line 3460 "Zend/zend_language_scanner.c"
yy220:
YYDEBUG(220, *YYCURSOR);
++YYCURSOR;
YYDEBUG(221, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1429 "Zend/zend_language_scanner.l"
+#line 1437 "Zend/zend_language_scanner.l"
{
return T_BOOLEAN_OR;
}
-#line 3469 "Zend/zend_language_scanner.c"
+#line 3470 "Zend/zend_language_scanner.c"
yy222:
YYDEBUG(222, *YYCURSOR);
++YYCURSOR;
YYDEBUG(223, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1421 "Zend/zend_language_scanner.l"
+#line 1429 "Zend/zend_language_scanner.l"
{
return T_OR_EQUAL;
}
-#line 3479 "Zend/zend_language_scanner.c"
+#line 3480 "Zend/zend_language_scanner.c"
yy224:
YYDEBUG(224, *YYCURSOR);
++YYCURSOR;
YYDEBUG(225, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1433 "Zend/zend_language_scanner.l"
+#line 1441 "Zend/zend_language_scanner.l"
{
return T_BOOLEAN_AND;
}
-#line 3489 "Zend/zend_language_scanner.c"
+#line 3490 "Zend/zend_language_scanner.c"
yy226:
YYDEBUG(226, *YYCURSOR);
++YYCURSOR;
YYDEBUG(227, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1417 "Zend/zend_language_scanner.l"
+#line 1425 "Zend/zend_language_scanner.l"
{
return T_AND_EQUAL;
}
-#line 3499 "Zend/zend_language_scanner.c"
+#line 3500 "Zend/zend_language_scanner.c"
yy228:
YYDEBUG(228, *YYCURSOR);
++YYCURSOR;
@@ -3504,12 +3505,11 @@ yy228:
yy229:
YYDEBUG(229, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1954 "Zend/zend_language_scanner.l"
+#line 1955 "Zend/zend_language_scanner.l"
{
if (CG(asp_tags)) {
BEGIN(INITIAL);
-//??? ZVAL_STRINGL(zendlval, yytext, yyleng);
- ZVAL_EMPTY_STRING(zendlval); /* tricky way to no copying - intentional */
+ DUMMY_STRINGL(zendlval, yytext, yyleng);
return T_CLOSE_TAG; /* implicit ';' at php-end tag */
} else {
yyless(1);
@@ -3522,7 +3522,7 @@ yy230:
++YYCURSOR;
YYDEBUG(231, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1405 "Zend/zend_language_scanner.l"
+#line 1413 "Zend/zend_language_scanner.l"
{
return T_MOD_EQUAL;
}
@@ -3544,7 +3544,7 @@ yy234:
yy235:
YYDEBUG(235, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1913 "Zend/zend_language_scanner.l"
+#line 1915 "Zend/zend_language_scanner.l"
{
int doc_com;
@@ -3587,7 +3587,7 @@ yy237:
++YYCURSOR;
YYDEBUG(238, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1397 "Zend/zend_language_scanner.l"
+#line 1405 "Zend/zend_language_scanner.l"
{
return T_DIV_EQUAL;
}
@@ -3614,7 +3614,7 @@ yy242:
++YYCURSOR;
YYDEBUG(243, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1393 "Zend/zend_language_scanner.l"
+#line 1401 "Zend/zend_language_scanner.l"
{
return T_MUL_EQUAL;
}
@@ -3625,7 +3625,7 @@ yy244:
if ((yych = *YYCURSOR) == '=') goto yy248;
YYDEBUG(245, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1453 "Zend/zend_language_scanner.l"
+#line 1461 "Zend/zend_language_scanner.l"
{
return T_SR;
}
@@ -3635,7 +3635,7 @@ yy246:
++YYCURSOR;
YYDEBUG(247, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1381 "Zend/zend_language_scanner.l"
+#line 1389 "Zend/zend_language_scanner.l"
{
return T_IS_GREATER_OR_EQUAL;
}
@@ -3645,7 +3645,7 @@ yy248:
++YYCURSOR;
YYDEBUG(249, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1413 "Zend/zend_language_scanner.l"
+#line 1421 "Zend/zend_language_scanner.l"
{
return T_SR_EQUAL;
}
@@ -3660,7 +3660,7 @@ yy250:
yy251:
YYDEBUG(251, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1449 "Zend/zend_language_scanner.l"
+#line 1457 "Zend/zend_language_scanner.l"
{
return T_SL;
}
@@ -3676,7 +3676,7 @@ yy253:
++YYCURSOR;
YYDEBUG(254, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1377 "Zend/zend_language_scanner.l"
+#line 1385 "Zend/zend_language_scanner.l"
{
return T_IS_SMALLER_OR_EQUAL;
}
@@ -3687,7 +3687,7 @@ yy255:
yy256:
YYDEBUG(256, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1373 "Zend/zend_language_scanner.l"
+#line 1381 "Zend/zend_language_scanner.l"
{
return T_IS_NOT_EQUAL;
}
@@ -3742,7 +3742,7 @@ yy264:
++YYCURSOR;
YYDEBUG(265, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1409 "Zend/zend_language_scanner.l"
+#line 1417 "Zend/zend_language_scanner.l"
{
return T_SL_EQUAL;
}
@@ -3938,7 +3938,7 @@ yy280:
++YYCURSOR;
YYDEBUG(282, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1365 "Zend/zend_language_scanner.l"
+#line 1373 "Zend/zend_language_scanner.l"
{
return T_IS_NOT_IDENTICAL;
}
@@ -3948,7 +3948,7 @@ yy283:
++YYCURSOR;
YYDEBUG(284, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1385 "Zend/zend_language_scanner.l"
+#line 1393 "Zend/zend_language_scanner.l"
{
return T_PLUS_EQUAL;
}
@@ -3958,7 +3958,7 @@ yy285:
++YYCURSOR;
YYDEBUG(286, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1353 "Zend/zend_language_scanner.l"
+#line 1361 "Zend/zend_language_scanner.l"
{
return T_INC;
}
@@ -3981,7 +3981,7 @@ yy289:
}
YYDEBUG(290, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1341 "Zend/zend_language_scanner.l"
+#line 1349 "Zend/zend_language_scanner.l"
{
return T_LIST;
}
@@ -3992,7 +3992,7 @@ yy291:
if ((yych = *YYCURSOR) == '=') goto yy295;
YYDEBUG(292, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1369 "Zend/zend_language_scanner.l"
+#line 1377 "Zend/zend_language_scanner.l"
{
return T_IS_EQUAL;
}
@@ -4002,7 +4002,7 @@ yy293:
++YYCURSOR;
YYDEBUG(294, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1337 "Zend/zend_language_scanner.l"
+#line 1345 "Zend/zend_language_scanner.l"
{
return T_DOUBLE_ARROW;
}
@@ -4012,7 +4012,7 @@ yy295:
++YYCURSOR;
YYDEBUG(296, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1361 "Zend/zend_language_scanner.l"
+#line 1369 "Zend/zend_language_scanner.l"
{
return T_IS_IDENTICAL;
}
@@ -4146,7 +4146,7 @@ yy313:
}
YYDEBUG(316, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1692 "Zend/zend_language_scanner.l"
+#line 1700 "Zend/zend_language_scanner.l"
{
if (Z_TYPE(CG(current_namespace)) != IS_UNDEF) {
ZVAL_DUP(zendlval, &CG(current_namespace));
@@ -4175,7 +4175,7 @@ yy318:
}
YYDEBUG(321, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1667 "Zend/zend_language_scanner.l"
+#line 1675 "Zend/zend_language_scanner.l"
{
zend_string *filename = zend_get_compiled_filename(TSRMLS_C);
zend_string *dirname;
@@ -4225,7 +4225,7 @@ yy324:
}
YYDEBUG(327, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1651 "Zend/zend_language_scanner.l"
+#line 1659 "Zend/zend_language_scanner.l"
{
ZVAL_LONG(zendlval, CG(zend_lineno));
return T_LINE;
@@ -4265,7 +4265,7 @@ yy332:
}
YYDEBUG(335, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1619 "Zend/zend_language_scanner.l"
+#line 1627 "Zend/zend_language_scanner.l"
{
if (CG(active_class_entry)) {
int len = 0;
@@ -4348,7 +4348,7 @@ yy343:
}
YYDEBUG(346, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1609 "Zend/zend_language_scanner.l"
+#line 1617 "Zend/zend_language_scanner.l"
{
zend_op_array *op_array = CG(active_op_array);
if (op_array && op_array->function_name) {
@@ -4378,7 +4378,7 @@ yy348:
}
YYDEBUG(351, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1656 "Zend/zend_language_scanner.l"
+#line 1664 "Zend/zend_language_scanner.l"
{
zend_string *filename = zend_get_compiled_filename(TSRMLS_C);
@@ -4419,7 +4419,7 @@ yy355:
}
YYDEBUG(358, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1599 "Zend/zend_language_scanner.l"
+#line 1607 "Zend/zend_language_scanner.l"
{
zend_class_entry *ce = CG(active_class_entry);
if (ce && ce->name && ZEND_ACC_TRAIT == (ce->ce_flags & ZEND_ACC_TRAIT)) {
@@ -4459,7 +4459,7 @@ yy362:
}
YYDEBUG(365, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1582 "Zend/zend_language_scanner.l"
+#line 1590 "Zend/zend_language_scanner.l"
{
zend_class_entry *ce = CG(active_class_entry);
if (ce && ZEND_ACC_TRAIT == (ce->ce_flags & ZEND_ACC_TRAIT)) {
@@ -4538,7 +4538,7 @@ yy377:
}
YYDEBUG(378, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1305 "Zend/zend_language_scanner.l"
+#line 1313 "Zend/zend_language_scanner.l"
{
return T_HALT_COMPILER;
}
@@ -4562,7 +4562,7 @@ yy381:
}
YYDEBUG(382, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1285 "Zend/zend_language_scanner.l"
+#line 1293 "Zend/zend_language_scanner.l"
{
return T_USE;
}
@@ -4585,7 +4585,7 @@ yy385:
}
YYDEBUG(386, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1333 "Zend/zend_language_scanner.l"
+#line 1341 "Zend/zend_language_scanner.l"
{
return T_UNSET;
}
@@ -4761,7 +4761,7 @@ yy402:
++YYCURSOR;
YYDEBUG(404, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1233 "Zend/zend_language_scanner.l"
+#line 1241 "Zend/zend_language_scanner.l"
{
return T_INT_CAST;
}
@@ -4809,7 +4809,7 @@ yy410:
++YYCURSOR;
YYDEBUG(413, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1237 "Zend/zend_language_scanner.l"
+#line 1245 "Zend/zend_language_scanner.l"
{
return T_DOUBLE_CAST;
}
@@ -4883,7 +4883,7 @@ yy424:
++YYCURSOR;
YYDEBUG(427, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1241 "Zend/zend_language_scanner.l"
+#line 1249 "Zend/zend_language_scanner.l"
{
return T_STRING_CAST;
}
@@ -4920,7 +4920,7 @@ yy431:
++YYCURSOR;
YYDEBUG(434, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1245 "Zend/zend_language_scanner.l"
+#line 1253 "Zend/zend_language_scanner.l"
{
return T_ARRAY_CAST;
}
@@ -4962,7 +4962,7 @@ yy439:
++YYCURSOR;
YYDEBUG(442, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1249 "Zend/zend_language_scanner.l"
+#line 1257 "Zend/zend_language_scanner.l"
{
return T_OBJECT_CAST;
}
@@ -5007,7 +5007,7 @@ yy448:
++YYCURSOR;
YYDEBUG(450, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1253 "Zend/zend_language_scanner.l"
+#line 1261 "Zend/zend_language_scanner.l"
{
return T_BOOL_CAST;
}
@@ -5071,7 +5071,7 @@ yy459:
++YYCURSOR;
YYDEBUG(462, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1257 "Zend/zend_language_scanner.l"
+#line 1265 "Zend/zend_language_scanner.l"
{
return T_UNSET_CAST;
}
@@ -5089,7 +5089,7 @@ yy464:
}
YYDEBUG(465, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1229 "Zend/zend_language_scanner.l"
+#line 1237 "Zend/zend_language_scanner.l"
{
return T_VAR;
}
@@ -5113,7 +5113,7 @@ yy468:
}
YYDEBUG(469, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1221 "Zend/zend_language_scanner.l"
+#line 1229 "Zend/zend_language_scanner.l"
{
return T_NEW;
}
@@ -5156,7 +5156,7 @@ yy476:
}
YYDEBUG(477, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1281 "Zend/zend_language_scanner.l"
+#line 1289 "Zend/zend_language_scanner.l"
{
return T_NAMESPACE;
}
@@ -5182,7 +5182,7 @@ yy480:
++YYCURSOR;
YYDEBUG(481, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1401 "Zend/zend_language_scanner.l"
+#line 1409 "Zend/zend_language_scanner.l"
{
return T_CONCAT_EQUAL;
}
@@ -5195,7 +5195,7 @@ yy482:
++YYCURSOR;
YYDEBUG(484, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1217 "Zend/zend_language_scanner.l"
+#line 1225 "Zend/zend_language_scanner.l"
{
return T_ELLIPSIS;
}
@@ -5205,7 +5205,7 @@ yy485:
++YYCURSOR;
YYDEBUG(486, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1209 "Zend/zend_language_scanner.l"
+#line 1217 "Zend/zend_language_scanner.l"
{
return T_PAAMAYIM_NEKUDOTAYIM;
}
@@ -5231,7 +5231,7 @@ yy489:
++YYCURSOR;
YYDEBUG(490, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1389 "Zend/zend_language_scanner.l"
+#line 1397 "Zend/zend_language_scanner.l"
{
return T_MINUS_EQUAL;
}
@@ -5241,7 +5241,7 @@ yy491:
++YYCURSOR;
YYDEBUG(492, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1357 "Zend/zend_language_scanner.l"
+#line 1365 "Zend/zend_language_scanner.l"
{
return T_DEC;
}
@@ -5251,7 +5251,7 @@ yy493:
++YYCURSOR;
YYDEBUG(494, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1181 "Zend/zend_language_scanner.l"
+#line 1190 "Zend/zend_language_scanner.l"
{
yy_push_state(ST_LOOKING_FOR_PROPERTY TSRMLS_CC);
return T_OBJECT_OPERATOR;
@@ -5301,7 +5301,7 @@ yy500:
}
YYDEBUG(501, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1329 "Zend/zend_language_scanner.l"
+#line 1337 "Zend/zend_language_scanner.l"
{
return T_PUBLIC;
}
@@ -5360,7 +5360,7 @@ yy509:
}
YYDEBUG(510, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1325 "Zend/zend_language_scanner.l"
+#line 1333 "Zend/zend_language_scanner.l"
{
return T_PROTECTED;
}
@@ -5394,7 +5394,7 @@ yy515:
}
YYDEBUG(516, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1321 "Zend/zend_language_scanner.l"
+#line 1329 "Zend/zend_language_scanner.l"
{
return T_PRIVATE;
}
@@ -5407,7 +5407,7 @@ yy517:
}
YYDEBUG(518, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1157 "Zend/zend_language_scanner.l"
+#line 1166 "Zend/zend_language_scanner.l"
{
return T_PRINT;
}
@@ -5436,7 +5436,7 @@ yy522:
}
YYDEBUG(523, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1149 "Zend/zend_language_scanner.l"
+#line 1158 "Zend/zend_language_scanner.l"
{
return T_GOTO;
}
@@ -5464,7 +5464,7 @@ yy527:
}
YYDEBUG(528, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1293 "Zend/zend_language_scanner.l"
+#line 1301 "Zend/zend_language_scanner.l"
{
return T_GLOBAL;
}
@@ -5505,7 +5505,7 @@ yy535:
}
YYDEBUG(536, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1141 "Zend/zend_language_scanner.l"
+#line 1150 "Zend/zend_language_scanner.l"
{
return T_BREAK;
}
@@ -5549,7 +5549,7 @@ yy543:
}
YYDEBUG(544, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1125 "Zend/zend_language_scanner.l"
+#line 1134 "Zend/zend_language_scanner.l"
{
return T_SWITCH;
}
@@ -5577,7 +5577,7 @@ yy548:
}
YYDEBUG(549, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1309 "Zend/zend_language_scanner.l"
+#line 1317 "Zend/zend_language_scanner.l"
{
return T_STATIC;
}
@@ -5608,7 +5608,7 @@ yy553:
}
YYDEBUG(554, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1121 "Zend/zend_language_scanner.l"
+#line 1130 "Zend/zend_language_scanner.l"
{
return T_AS;
}
@@ -5631,7 +5631,7 @@ yy557:
}
YYDEBUG(558, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1345 "Zend/zend_language_scanner.l"
+#line 1353 "Zend/zend_language_scanner.l"
{
return T_ARRAY;
}
@@ -5644,7 +5644,7 @@ yy559:
}
YYDEBUG(560, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1441 "Zend/zend_language_scanner.l"
+#line 1449 "Zend/zend_language_scanner.l"
{
return T_LOGICAL_AND;
}
@@ -5682,7 +5682,7 @@ yy566:
}
YYDEBUG(567, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1313 "Zend/zend_language_scanner.l"
+#line 1321 "Zend/zend_language_scanner.l"
{
return T_ABSTRACT;
}
@@ -5710,7 +5710,7 @@ yy571:
}
YYDEBUG(572, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1081 "Zend/zend_language_scanner.l"
+#line 1090 "Zend/zend_language_scanner.l"
{
return T_WHILE;
}
@@ -5723,7 +5723,7 @@ yy573:
}
YYDEBUG(574, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1065 "Zend/zend_language_scanner.l"
+#line 1074 "Zend/zend_language_scanner.l"
{
return T_IF;
}
@@ -5779,7 +5779,7 @@ yy580:
}
YYDEBUG(581, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1297 "Zend/zend_language_scanner.l"
+#line 1305 "Zend/zend_language_scanner.l"
{
return T_ISSET;
}
@@ -5837,7 +5837,7 @@ yy588:
yy589:
YYDEBUG(589, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1265 "Zend/zend_language_scanner.l"
+#line 1273 "Zend/zend_language_scanner.l"
{
return T_INCLUDE;
}
@@ -5870,7 +5870,7 @@ yy594:
}
YYDEBUG(595, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1269 "Zend/zend_language_scanner.l"
+#line 1277 "Zend/zend_language_scanner.l"
{
return T_INCLUDE_ONCE;
}
@@ -5908,7 +5908,7 @@ yy601:
}
YYDEBUG(602, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1165 "Zend/zend_language_scanner.l"
+#line 1174 "Zend/zend_language_scanner.l"
{
return T_INTERFACE;
}
@@ -5962,7 +5962,7 @@ yy609:
}
YYDEBUG(610, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1289 "Zend/zend_language_scanner.l"
+#line 1297 "Zend/zend_language_scanner.l"
{
return T_INSTEADOF;
}
@@ -5995,7 +5995,7 @@ yy615:
}
YYDEBUG(616, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1117 "Zend/zend_language_scanner.l"
+#line 1126 "Zend/zend_language_scanner.l"
{
return T_INSTANCEOF;
}
@@ -6043,7 +6043,7 @@ yy624:
}
YYDEBUG(625, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1177 "Zend/zend_language_scanner.l"
+#line 1186 "Zend/zend_language_scanner.l"
{
return T_IMPLEMENTS;
}
@@ -6075,7 +6075,7 @@ yy627:
}
YYDEBUG(629, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1049 "Zend/zend_language_scanner.l"
+#line 1058 "Zend/zend_language_scanner.l"
{
return T_TRY;
}
@@ -6098,7 +6098,7 @@ yy632:
}
YYDEBUG(633, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1169 "Zend/zend_language_scanner.l"
+#line 1178 "Zend/zend_language_scanner.l"
{
return T_TRAIT;
}
@@ -6121,7 +6121,7 @@ yy636:
}
YYDEBUG(637, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1061 "Zend/zend_language_scanner.l"
+#line 1070 "Zend/zend_language_scanner.l"
{
return T_THROW;
}
@@ -6149,7 +6149,7 @@ yy641:
}
YYDEBUG(642, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1045 "Zend/zend_language_scanner.l"
+#line 1054 "Zend/zend_language_scanner.l"
{
return T_YIELD;
}
@@ -6214,7 +6214,7 @@ yy649:
yy650:
YYDEBUG(650, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1273 "Zend/zend_language_scanner.l"
+#line 1281 "Zend/zend_language_scanner.l"
{
return T_REQUIRE;
}
@@ -6247,7 +6247,7 @@ yy655:
}
YYDEBUG(656, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1277 "Zend/zend_language_scanner.l"
+#line 1285 "Zend/zend_language_scanner.l"
{
return T_REQUIRE_ONCE;
}
@@ -6270,7 +6270,7 @@ yy659:
}
YYDEBUG(660, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1041 "Zend/zend_language_scanner.l"
+#line 1050 "Zend/zend_language_scanner.l"
{
return T_RETURN;
}
@@ -6364,7 +6364,7 @@ yy670:
}
YYDEBUG(671, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1145 "Zend/zend_language_scanner.l"
+#line 1154 "Zend/zend_language_scanner.l"
{
return T_CONTINUE;
}
@@ -6377,7 +6377,7 @@ yy672:
}
YYDEBUG(673, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1037 "Zend/zend_language_scanner.l"
+#line 1046 "Zend/zend_language_scanner.l"
{
return T_CONST;
}
@@ -6406,7 +6406,7 @@ yy677:
}
YYDEBUG(678, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1225 "Zend/zend_language_scanner.l"
+#line 1233 "Zend/zend_language_scanner.l"
{
return T_CLONE;
}
@@ -6424,7 +6424,7 @@ yy680:
}
YYDEBUG(681, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1161 "Zend/zend_language_scanner.l"
+#line 1170 "Zend/zend_language_scanner.l"
{
return T_CLASS;
}
@@ -6474,7 +6474,7 @@ yy689:
}
YYDEBUG(690, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1349 "Zend/zend_language_scanner.l"
+#line 1357 "Zend/zend_language_scanner.l"
{
return T_CALLABLE;
}
@@ -6487,7 +6487,7 @@ yy691:
}
YYDEBUG(692, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1133 "Zend/zend_language_scanner.l"
+#line 1142 "Zend/zend_language_scanner.l"
{
return T_CASE;
}
@@ -6505,7 +6505,7 @@ yy694:
}
YYDEBUG(695, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1053 "Zend/zend_language_scanner.l"
+#line 1062 "Zend/zend_language_scanner.l"
{
return T_CATCH;
}
@@ -6560,7 +6560,7 @@ yy704:
}
YYDEBUG(705, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1033 "Zend/zend_language_scanner.l"
+#line 1042 "Zend/zend_language_scanner.l"
{
return T_FUNCTION;
}
@@ -6588,7 +6588,7 @@ yy706:
yy707:
YYDEBUG(707, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1093 "Zend/zend_language_scanner.l"
+#line 1102 "Zend/zend_language_scanner.l"
{
return T_FOR;
}
@@ -6616,7 +6616,7 @@ yy711:
}
YYDEBUG(712, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1101 "Zend/zend_language_scanner.l"
+#line 1110 "Zend/zend_language_scanner.l"
{
return T_FOREACH;
}
@@ -6654,7 +6654,7 @@ yy715:
yy716:
YYDEBUG(716, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1317 "Zend/zend_language_scanner.l"
+#line 1325 "Zend/zend_language_scanner.l"
{
return T_FINAL;
}
@@ -6672,7 +6672,7 @@ yy718:
}
YYDEBUG(719, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1057 "Zend/zend_language_scanner.l"
+#line 1066 "Zend/zend_language_scanner.l"
{
return T_FINALLY;
}
@@ -6707,7 +6707,7 @@ yy722:
}
YYDEBUG(723, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1089 "Zend/zend_language_scanner.l"
+#line 1098 "Zend/zend_language_scanner.l"
{
return T_DO;
}
@@ -6720,7 +6720,7 @@ yy724:
}
YYDEBUG(725, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1029 "Zend/zend_language_scanner.l"
+#line 1038 "Zend/zend_language_scanner.l"
{
return T_EXIT;
}
@@ -6759,7 +6759,7 @@ yy731:
}
YYDEBUG(732, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1137 "Zend/zend_language_scanner.l"
+#line 1146 "Zend/zend_language_scanner.l"
{
return T_DEFAULT;
}
@@ -6787,7 +6787,7 @@ yy736:
}
YYDEBUG(737, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1109 "Zend/zend_language_scanner.l"
+#line 1118 "Zend/zend_language_scanner.l"
{
return T_DECLARE;
}
@@ -6871,7 +6871,7 @@ yy749:
}
YYDEBUG(750, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1173 "Zend/zend_language_scanner.l"
+#line 1182 "Zend/zend_language_scanner.l"
{
return T_EXTENDS;
}
@@ -6884,7 +6884,7 @@ yy751:
}
YYDEBUG(752, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1025 "Zend/zend_language_scanner.l"
+#line 1034 "Zend/zend_language_scanner.l"
{
return T_EXIT;
}
@@ -6902,7 +6902,7 @@ yy754:
}
YYDEBUG(755, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1261 "Zend/zend_language_scanner.l"
+#line 1269 "Zend/zend_language_scanner.l"
{
return T_EVAL;
}
@@ -6976,7 +6976,7 @@ yy765:
}
YYDEBUG(766, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1085 "Zend/zend_language_scanner.l"
+#line 1094 "Zend/zend_language_scanner.l"
{
return T_ENDWHILE;
}
@@ -7009,7 +7009,7 @@ yy771:
}
YYDEBUG(772, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1129 "Zend/zend_language_scanner.l"
+#line 1138 "Zend/zend_language_scanner.l"
{
return T_ENDSWITCH;
}
@@ -7022,7 +7022,7 @@ yy773:
}
YYDEBUG(774, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1073 "Zend/zend_language_scanner.l"
+#line 1082 "Zend/zend_language_scanner.l"
{
return T_ENDIF;
}
@@ -7055,7 +7055,7 @@ yy776:
yy777:
YYDEBUG(777, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1097 "Zend/zend_language_scanner.l"
+#line 1106 "Zend/zend_language_scanner.l"
{
return T_ENDFOR;
}
@@ -7083,7 +7083,7 @@ yy781:
}
YYDEBUG(782, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1105 "Zend/zend_language_scanner.l"
+#line 1114 "Zend/zend_language_scanner.l"
{
return T_ENDFOREACH;
}
@@ -7121,7 +7121,7 @@ yy788:
}
YYDEBUG(789, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1113 "Zend/zend_language_scanner.l"
+#line 1122 "Zend/zend_language_scanner.l"
{
return T_ENDDECLARE;
}
@@ -7144,7 +7144,7 @@ yy792:
}
YYDEBUG(793, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1301 "Zend/zend_language_scanner.l"
+#line 1309 "Zend/zend_language_scanner.l"
{
return T_EMPTY;
}
@@ -7177,7 +7177,7 @@ yy795:
yy796:
YYDEBUG(796, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1077 "Zend/zend_language_scanner.l"
+#line 1086 "Zend/zend_language_scanner.l"
{
return T_ELSE;
}
@@ -7195,7 +7195,7 @@ yy798:
}
YYDEBUG(799, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1069 "Zend/zend_language_scanner.l"
+#line 1078 "Zend/zend_language_scanner.l"
{
return T_ELSEIF;
}
@@ -7213,7 +7213,7 @@ yy801:
}
YYDEBUG(802, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1153 "Zend/zend_language_scanner.l"
+#line 1162 "Zend/zend_language_scanner.l"
{
return T_ECHO;
}
@@ -7290,14 +7290,13 @@ yy805:
yy806:
YYDEBUG(806, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1186 "Zend/zend_language_scanner.l"
+#line 1195 "Zend/zend_language_scanner.l"
{
-//??? ZVAL_STRINGL(zendlval, yytext, yyleng);
- ZVAL_EMPTY_STRING(zendlval); /* tricky way to no copying - intentional */
+ DUMMY_STRINGL(zendlval, yytext, yyleng);
HANDLE_NEWLINES(yytext, yyleng);
return T_WHITESPACE;
}
-#line 7301 "Zend/zend_language_scanner.c"
+#line 7300 "Zend/zend_language_scanner.c"
yy807:
YYDEBUG(807, *YYCURSOR);
++YYCURSOR;
@@ -7305,13 +7304,13 @@ yy807:
yy808:
YYDEBUG(808, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1203 "Zend/zend_language_scanner.l"
+#line 1211 "Zend/zend_language_scanner.l"
{
yyless(0);
yy_pop_state(TSRMLS_C);
goto restart;
}
-#line 7315 "Zend/zend_language_scanner.c"
+#line 7314 "Zend/zend_language_scanner.c"
yy809:
YYDEBUG(809, *YYCURSOR);
++YYCURSOR;
@@ -7320,13 +7319,13 @@ yy809:
yy810:
YYDEBUG(810, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1197 "Zend/zend_language_scanner.l"
+#line 1205 "Zend/zend_language_scanner.l"
{
yy_pop_state(TSRMLS_C);
zend_copy_value(zendlval, yytext, yyleng);
return T_STRING;
}
-#line 7330 "Zend/zend_language_scanner.c"
+#line 7329 "Zend/zend_language_scanner.c"
yy811:
YYDEBUG(811, *YYCURSOR);
yych = *++YYCURSOR;
@@ -7347,11 +7346,11 @@ yy814:
++YYCURSOR;
YYDEBUG(815, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1193 "Zend/zend_language_scanner.l"
+#line 1201 "Zend/zend_language_scanner.l"
{
return T_OBJECT_OPERATOR;
}
-#line 7355 "Zend/zend_language_scanner.c"
+#line 7354 "Zend/zend_language_scanner.c"
yy816:
YYDEBUG(816, *YYCURSOR);
++YYCURSOR;
@@ -7436,14 +7435,14 @@ yy820:
yy821:
YYDEBUG(821, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1492 "Zend/zend_language_scanner.l"
+#line 1500 "Zend/zend_language_scanner.l"
{
yyless(0);
yy_pop_state(TSRMLS_C);
yy_push_state(ST_IN_SCRIPTING TSRMLS_CC);
goto restart;
}
-#line 7447 "Zend/zend_language_scanner.c"
+#line 7446 "Zend/zend_language_scanner.c"
yy822:
YYDEBUG(822, *YYCURSOR);
yych = *++YYCURSOR;
@@ -7468,7 +7467,7 @@ yy826:
++YYCURSOR;
YYDEBUG(827, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1483 "Zend/zend_language_scanner.l"
+#line 1491 "Zend/zend_language_scanner.l"
{
yyless(yyleng - 1);
zend_copy_value(zendlval, yytext, yyleng);
@@ -7476,7 +7475,7 @@ yy826:
yy_push_state(ST_IN_SCRIPTING TSRMLS_CC);
return T_STRING_VARNAME;
}
-#line 7480 "Zend/zend_language_scanner.c"
+#line 7479 "Zend/zend_language_scanner.c"
}
/* *********************************** */
yyc_ST_NOWDOC:
@@ -7543,7 +7542,7 @@ nowdoc_scan_done:
HANDLE_NEWLINES(yytext, yyleng - newline);
return T_ENCAPSED_AND_WHITESPACE;
}
-#line 7547 "Zend/zend_language_scanner.c"
+#line 7546 "Zend/zend_language_scanner.c"
/* *********************************** */
yyc_ST_VAR_OFFSET:
{
@@ -7650,7 +7649,7 @@ yy834:
yy835:
YYDEBUG(835, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1563 "Zend/zend_language_scanner.l"
+#line 1571 "Zend/zend_language_scanner.l"
{ /* Offset could be treated as a long */
if (yyleng < MAX_LENGTH_OF_LONG - 1 || (yyleng == MAX_LENGTH_OF_LONG - 1 && strcmp(yytext, long_min_digits) < 0)) {
ZVAL_LONG(zendlval, strtol(yytext, NULL, 10));
@@ -7659,7 +7658,7 @@ yy835:
}
return T_NUM_STRING;
}
-#line 7663 "Zend/zend_language_scanner.c"
+#line 7662 "Zend/zend_language_scanner.c"
yy836:
YYDEBUG(836, *YYCURSOR);
yych = *++YYCURSOR;
@@ -7679,23 +7678,23 @@ yy837:
yy838:
YYDEBUG(838, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1861 "Zend/zend_language_scanner.l"
+#line 1863 "Zend/zend_language_scanner.l"
{
/* Only '[' can be valid, but returning other tokens will allow a more explicit parse error */
return yytext[0];
}
-#line 7688 "Zend/zend_language_scanner.c"
+#line 7687 "Zend/zend_language_scanner.c"
yy839:
YYDEBUG(839, *YYCURSOR);
++YYCURSOR;
YYDEBUG(840, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1856 "Zend/zend_language_scanner.l"
+#line 1858 "Zend/zend_language_scanner.l"
{
yy_pop_state(TSRMLS_C);
return ']';
}
-#line 7699 "Zend/zend_language_scanner.c"
+#line 7698 "Zend/zend_language_scanner.c"
yy841:
YYDEBUG(841, *YYCURSOR);
yych = *++YYCURSOR;
@@ -7705,14 +7704,14 @@ yy842:
++YYCURSOR;
YYDEBUG(843, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1866 "Zend/zend_language_scanner.l"
+#line 1868 "Zend/zend_language_scanner.l"
{
/* Invalid rule to return a more explicit parse error with proper line number */
yyless(0);
yy_pop_state(TSRMLS_C);
return T_ENCAPSED_AND_WHITESPACE;
}
-#line 7716 "Zend/zend_language_scanner.c"
+#line 7715 "Zend/zend_language_scanner.c"
yy844:
YYDEBUG(844, *YYCURSOR);
++YYCURSOR;
@@ -7721,12 +7720,12 @@ yy844:
yy845:
YYDEBUG(845, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1873 "Zend/zend_language_scanner.l"
+#line 1875 "Zend/zend_language_scanner.l"
{
zend_copy_value(zendlval, yytext, yyleng);
return T_STRING;
}
-#line 7730 "Zend/zend_language_scanner.c"
+#line 7729 "Zend/zend_language_scanner.c"
yy846:
YYDEBUG(846, *YYCURSOR);
++YYCURSOR;
@@ -7741,7 +7740,7 @@ yy846:
zend_error(E_COMPILE_WARNING,"Unexpected character in input: '%c' (ASCII=%d) state=%d", yytext[0], yytext[0], YYSTATE);
goto restart;
}
-#line 7745 "Zend/zend_language_scanner.c"
+#line 7744 "Zend/zend_language_scanner.c"
yy848:
YYDEBUG(848, *YYCURSOR);
++YYCURSOR;
@@ -7777,12 +7776,12 @@ yy850:
yy852:
YYDEBUG(852, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1851 "Zend/zend_language_scanner.l"
+#line 1853 "Zend/zend_language_scanner.l"
{
zend_copy_value(zendlval, (yytext+1), (yyleng-1));
return T_VARIABLE;
}
-#line 7786 "Zend/zend_language_scanner.c"
+#line 7785 "Zend/zend_language_scanner.c"
yy853:
YYDEBUG(853, *YYCURSOR);
++YYCURSOR;
@@ -7822,12 +7821,12 @@ yy858:
yy860:
YYDEBUG(860, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1572 "Zend/zend_language_scanner.l"
+#line 1580 "Zend/zend_language_scanner.l"
{ /* Offset must be treated as a string */
ZVAL_STRINGL(zendlval, yytext, yyleng);
return T_NUM_STRING;
}
-#line 7831 "Zend/zend_language_scanner.c"
+#line 7830 "Zend/zend_language_scanner.c"
yy861:
YYDEBUG(861, *YYCURSOR);
++YYCURSOR;
diff --git a/Zend/zend_language_scanner.l b/Zend/zend_language_scanner.l
index 69aa1e3864..02401df2a9 100644
--- a/Zend/zend_language_scanner.l
+++ b/Zend/zend_language_scanner.l
@@ -863,7 +863,7 @@ ZEND_API void zend_multibyte_yyinput_again(zend_encoding_filter old_input_filter
}
-//??? use zend_string saving memalloc
+// TODO: avoid reallocation ???
# define zend_copy_value(zendlval, yytext, yyleng) \
if (SCNG(output_filter)) { \
size_t sz = 0; \
@@ -875,6 +875,15 @@ ZEND_API void zend_multibyte_yyinput_again(zend_encoding_filter old_input_filter
ZVAL_STRINGL(zendlval, yytext, yyleng); \
}
+// TODO: some extensions might need content, but we don't copy it intentional ???
+#if 0
+# define DUMMY_STRINGL(zendlval, yytext, yyleng) \
+ ZVAL_STRINGL(zendlval, yytext, yyleng)
+#else
+# define DUMMY_STRINGL(zendlval, yytext, yyleng) \
+ ZVAL_EMPTY_STRING(zendlval)
+#endif
+
static void zend_scan_escape_string(zval *zendlval, char *str, int len, char quote_type TSRMLS_DC)
{
register char *s, *t;
@@ -988,7 +997,7 @@ static void zend_scan_escape_string(zval *zendlval, char *str, int len, char quo
if (SCNG(output_filter)) {
size_t sz = 0;
unsigned char *str;
- //??? use zend_string saving memalloc
+ // TODO: avoid realocation ???
s = Z_STRVAL_P(zendlval);
SCNG(output_filter)(&str, &sz, (unsigned char *)s, (size_t)Z_STRLEN_P(zendlval) TSRMLS_CC);
zval_ptr_dtor(zendlval);
@@ -1184,8 +1193,7 @@ NEWLINE ("\r"|"\n"|"\r\n")
}
<ST_IN_SCRIPTING,ST_LOOKING_FOR_PROPERTY>{WHITESPACE}+ {
-//??? ZVAL_STRINGL(zendlval, yytext, yyleng);
- ZVAL_EMPTY_STRING(zendlval); /* tricky way to no copying - intentional */
+ DUMMY_STRINGL(zendlval, yytext, yyleng);
HANDLE_NEWLINES(yytext, yyleng);
return T_WHITESPACE;
}
@@ -1708,8 +1716,7 @@ NEWLINE ("\r"|"\n"|"\r\n")
}
HANDLE_NEWLINES(yytext, yyleng);
-//??? ZVAL_STRINGL(zendlval, yytext, yyleng);
- ZVAL_EMPTY_STRING(zendlval); /* tricky way to no copying - intentional */
+ DUMMY_STRINGL(zendlval, yytext, yyleng);
BEGIN(ST_IN_SCRIPTING);
return T_OPEN_TAG;
}
@@ -1717,8 +1724,7 @@ NEWLINE ("\r"|"\n"|"\r\n")
<INITIAL>"<%=" {
if (CG(asp_tags)) {
-//??? ZVAL_STRINGL(zendlval, yytext, yyleng);
- ZVAL_EMPTY_STRING(zendlval); /* tricky way to no copying - intentional */
+ DUMMY_STRINGL(zendlval, yytext, yyleng);
BEGIN(ST_IN_SCRIPTING);
return T_OPEN_TAG_WITH_ECHO;
} else {
@@ -1728,8 +1734,7 @@ NEWLINE ("\r"|"\n"|"\r\n")
<INITIAL>"<?=" {
-//??? ZVAL_STRINGL(zendlval, yytext, yyleng);
- ZVAL_EMPTY_STRING(zendlval); /* tricky way to no copying - intentional */
+ DUMMY_STRINGL(zendlval, yytext, yyleng);
BEGIN(ST_IN_SCRIPTING);
return T_OPEN_TAG_WITH_ECHO;
}
@@ -1737,8 +1742,7 @@ NEWLINE ("\r"|"\n"|"\r\n")
<INITIAL>"<%" {
if (CG(asp_tags)) {
-//??? ZVAL_STRINGL(zendlval, yytext, yyleng);
- ZVAL_EMPTY_STRING(zendlval); /* tricky way to no copying - intentional */
+ DUMMY_STRINGL(zendlval, yytext, yyleng);
BEGIN(ST_IN_SCRIPTING);
return T_OPEN_TAG;
} else {
@@ -1748,8 +1752,7 @@ NEWLINE ("\r"|"\n"|"\r\n")
<INITIAL>"<?php"([ \t]|{NEWLINE}) {
-//??? ZVAL_STRINGL(zendlval, yytext, yyleng);
- ZVAL_EMPTY_STRING(zendlval); /* tricky way, no copying intentional */
+ DUMMY_STRINGL(zendlval, yytext, yyleng);
HANDLE_NEWLINE(yytext[yyleng-1]);
BEGIN(ST_IN_SCRIPTING);
return T_OPEN_TAG;
@@ -1758,8 +1761,7 @@ NEWLINE ("\r"|"\n"|"\r\n")
<INITIAL>"<?" {
if (CG(short_tags)) {
-//??? ZVAL_STRINGL(zendlval, yytext, yyleng);
- ZVAL_EMPTY_STRING(zendlval); /* tricky way, no copying intentional */
+ DUMMY_STRINGL(zendlval, yytext, yyleng);
BEGIN(ST_IN_SCRIPTING);
return T_OPEN_TAG;
} else {
@@ -1814,7 +1816,7 @@ inline_html:
int readsize;
char *s = NULL;
size_t sz = 0;
- //??? use zend_string saving memalloc
+ // TODO: avoid reallocation ???
readsize = SCNG(output_filter)((unsigned char **)&s, &sz, (unsigned char *)yytext, (size_t)yyleng TSRMLS_CC);
ZVAL_STRINGL(zendlval, s, sz);
efree(s);
@@ -1944,8 +1946,7 @@ inline_html:
}
<ST_IN_SCRIPTING>("?>"|"</script"{WHITESPACE}*">"){NEWLINE}? {
-//??? ZVAL_STRINGL(zendlval, yytext, yyleng);
- ZVAL_EMPTY_STRING(zendlval); /* tricky way to no copying - intentional */
+ DUMMY_STRINGL(zendlval, yytext, yyleng);
BEGIN(INITIAL);
return T_CLOSE_TAG; /* implicit ';' at php-end tag */
}
@@ -1954,8 +1955,7 @@ inline_html:
<ST_IN_SCRIPTING>"%>"{NEWLINE}? {
if (CG(asp_tags)) {
BEGIN(INITIAL);
-//??? ZVAL_STRINGL(zendlval, yytext, yyleng);
- ZVAL_EMPTY_STRING(zendlval); /* tricky way to no copying - intentional */
+ DUMMY_STRINGL(zendlval, yytext, yyleng);
return T_CLOSE_TAG; /* implicit ';' at php-end tag */
} else {
yyless(1);
@@ -2024,7 +2024,7 @@ inline_html:
size_t sz = 0;
char *str = NULL;
s = Z_STRVAL_P(zendlval);
- //??? use zend_string saving memalloc
+ // TODO: avoid reallocation ???
SCNG(output_filter)((unsigned char **)&str, &sz, (unsigned char *)s, (size_t)Z_STRLEN_P(zendlval) TSRMLS_CC);
ZVAL_STRINGL(zendlval, str, sz);
efree(s);
diff --git a/Zend/zend_string.h b/Zend/zend_string.h
index 6ff35fb22c..5226c06e79 100644
--- a/Zend/zend_string.h
+++ b/Zend/zend_string.h
@@ -44,10 +44,12 @@ END_EXTERN_C()
#define STR_ADDREF(s) zend_str_addref(s)
#define STR_DELREF(s) zend_str_delref(s)
#define STR_ALLOC(len, persistent) zend_str_alloc(len, persistent)
+#define STR_SAFE_ALLOC(n, m, l, p) zend_str_safe_alloc(n, m, l, p)
#define STR_INIT(str, len, persistent) zend_str_init(str, len, persistent)
#define STR_COPY(s) zend_str_copy(s)
#define STR_DUP(s, persistent) zend_str_dup(s, persistent)
#define STR_REALLOC(s, len, persistent) zend_str_realloc(s, len, persistent)
+#define STR_SAFE_REALLOC(s, n, m, l, p) zend_str_safe_realloc(s, n, m, l, p)
#define STR_FREE(s) zend_str_free(s)
#define STR_RELEASE(s) zend_str_release(s)
#define STR_EMPTY_ALLOC() CG(empty_string)
@@ -107,6 +109,24 @@ static zend_always_inline zend_string *zend_str_alloc(int len, int persistent)
return ret;
}
+static zend_always_inline zend_string *zend_str_safe_alloc(size_t n, size_t m, size_t l, int persistent)
+{
+ zend_string *ret = safe_pemalloc(n, m, sizeof(zend_string) + l - 1, persistent);
+
+ GC_REFCOUNT(ret) = 1;
+#if 1
+ /* optimized single assignment */
+ GC_TYPE_INFO(ret) = IS_STRING | ((persistent ? IS_STR_PERSISTENT : 0) << 8);
+#else
+ GC_TYPE(ret) = IS_STRING;
+ GC_FLAGS(ret) = (persistent ? IS_STR_PERSISTENT : 0);
+ GC_INFO(ret) = 0;
+#endif
+ ret->h = 0;
+ ret->len = (n * m) + l;
+ return ret;
+}
+
static zend_always_inline zend_string *zend_str_init(const char *str, int len, int persistent)
{
zend_string *ret = STR_ALLOC(len, persistent);
@@ -152,6 +172,25 @@ static zend_always_inline zend_string *zend_str_realloc(zend_string *s, int len,
return ret;
}
+static zend_always_inline zend_string *zend_str_safe_realloc(zend_string *s, size_t n, size_t m, size_t l, int persistent)
+{
+ zend_string *ret;
+
+ if (IS_INTERNED(s)) {
+ ret = STR_SAFE_ALLOC(n, m, l, persistent);
+ memcpy(ret->val, s->val, ((n * m) + l > s->len ? s->len : ((n * m) + l)) + 1);
+ } else if (STR_REFCOUNT(s) == 1) {
+ ret = safe_perealloc(s, n, m, sizeof(zend_string) + l - 1, persistent);
+ ret->len = (n * m) + l;
+ STR_FORGET_HASH_VAL(ret);
+ } else {
+ ret = STR_SAFE_ALLOC(n, m, l, persistent);
+ memcpy(ret->val, s->val, ((n * m) + l > s->len ? s->len : ((n * m) + l)) + 1);
+ STR_DELREF(s);
+ }
+ return ret;
+}
+
static zend_always_inline void zend_str_free(zend_string *s)
{
if (!IS_INTERNED(s)) {
diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h
index d526f98318..2cbbedc762 100644
--- a/Zend/zend_vm_def.h
+++ b/Zend/zend_vm_def.h
@@ -354,11 +354,6 @@ ZEND_VM_HELPER_EX(zend_binary_assign_op_obj_helper, VAR|UNUSED|CV, CONST|TMP|VAR
}
} else {
/* here we are sure we are dealing with an object */
-//??? if (IS_OP2_TMP_FREE()) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
-
- /* here property is a string */
if (opline->extended_value == ZEND_ASSIGN_OBJ
&& Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval *zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((OP2_TYPE == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
@@ -416,11 +411,7 @@ ZEND_VM_HELPER_EX(zend_binary_assign_op_obj_helper, VAR|UNUSED|CV, CONST|TMP|VAR
}
}
-//??? if (IS_OP2_TMP_FREE()) {
-//??? zval_ptr_dtor(property);
-//??? } else {
- FREE_OP2();
-//??? }
+ FREE_OP2();
FREE_OP(free_op_data1);
}
@@ -723,10 +714,6 @@ ZEND_VM_HELPER_EX(zend_pre_incdec_property_helper, VAR|UNUSED|CV, CONST|TMP|VAR|
/* here we are sure we are dealing with an object */
-//??? if (IS_OP2_TMP_FREE()) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
-
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval *zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((OP2_TYPE == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
@@ -770,11 +757,7 @@ ZEND_VM_HELPER_EX(zend_pre_incdec_property_helper, VAR|UNUSED|CV, CONST|TMP|VAR|
}
}
-//??? if (IS_OP2_TMP_FREE()) {
-//??? zval_ptr_dtor(property);
-//??? } else {
- FREE_OP2();
-//??? }
+ FREE_OP2();
FREE_OP1_VAR_PTR();
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
@@ -821,10 +804,6 @@ ZEND_VM_HELPER_EX(zend_post_incdec_property_helper, VAR|UNUSED|CV, CONST|TMP|VAR
/* here we are sure we are dealing with an object */
-//??? if (IS_OP2_TMP_FREE()) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
-
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval *zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((OP2_TYPE == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
@@ -866,11 +845,7 @@ ZEND_VM_HELPER_EX(zend_post_incdec_property_helper, VAR|UNUSED|CV, CONST|TMP|VAR
}
}
-//??? if (IS_OP2_TMP_FREE()) {
-//??? zval_ptr_dtor(property);
-//??? } else {
- FREE_OP2();
-//??? }
+ FREE_OP2();
FREE_OP1_VAR_PTR();
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
@@ -1403,28 +1378,18 @@ ZEND_VM_HELPER(zend_fetch_property_address_read_helper, VAR|UNUSED|CV, CONST|TMP
UNEXPECTED(Z_OBJ_HT_P(container)->read_property == NULL)) {
zend_error(E_NOTICE, "Trying to get property of non-object");
ZVAL_NULL(EX_VAR(opline->result.var));
- FREE_OP2();
} else {
zval *retval;
-//??? if (IS_OP2_TMP_FREE()) {
-//??? MAKE_REAL_ZVAL_PTR(offset);
-//??? }
-
/* here we are sure we are dealing with an object */
retval = Z_OBJ_HT_P(container)->read_property(container, offset, BP_VAR_R, ((OP2_TYPE == IS_CONST) ? opline->op2.literal : NULL), EX_VAR(opline->result.var) TSRMLS_CC);
if (retval != EX_VAR(opline->result.var)) {
ZVAL_COPY(EX_VAR(opline->result.var), retval);
}
-
-//??? if (IS_OP2_TMP_FREE()) {
-//??? zval_ptr_dtor(offset);
-//??? } else {
- FREE_OP2();
-//??? }
}
+ FREE_OP2();
FREE_OP1();
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
@@ -1445,21 +1410,13 @@ ZEND_VM_HANDLER(85, ZEND_FETCH_OBJ_W, VAR|UNUSED|CV, CONST|TMP|VAR|CV)
SAVE_OPLINE();
property = GET_OP2_ZVAL_PTR(BP_VAR_R);
-//??? if (IS_OP2_TMP_FREE()) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
container = GET_OP1_OBJ_ZVAL_PTR_PTR(BP_VAR_W);
if (OP1_TYPE == IS_VAR && UNEXPECTED(Z_TYPE_P(container) == IS_STR_OFFSET)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
zend_fetch_property_address(EX_VAR(opline->result.var), container, property, ((OP2_TYPE == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_W, (opline->extended_value & ZEND_FETCH_MAKE_REF) != 0 TSRMLS_CC);
-//??? if (IS_OP2_TMP_FREE()) {
-//??? zval_ptr_dtor(property);
-//??? } else {
- FREE_OP2();
-//??? }
-
+ FREE_OP2();
if (OP1_TYPE == IS_VAR && OP1_FREE && READY_TO_DESTROY(free_op1.var)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
@@ -1479,19 +1436,11 @@ ZEND_VM_HANDLER(88, ZEND_FETCH_OBJ_RW, VAR|UNUSED|CV, CONST|TMP|VAR|CV)
property = GET_OP2_ZVAL_PTR(BP_VAR_R);
container = GET_OP1_OBJ_ZVAL_PTR_PTR(BP_VAR_RW);
-//??? if (IS_OP2_TMP_FREE()) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
if (OP1_TYPE == IS_VAR && UNEXPECTED(Z_TYPE_P(container) == IS_STR_OFFSET)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
zend_fetch_property_address(EX_VAR(opline->result.var), container, property, ((OP2_TYPE == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_RW, 0 TSRMLS_CC);
-//??? if (IS_OP2_TMP_FREE()) {
-//??? zval_ptr_dtor(property);
-//??? } else {
- FREE_OP2();
-//??? }
-
+ FREE_OP2();
if (OP1_TYPE == IS_VAR && OP1_FREE && READY_TO_DESTROY(free_op1.var)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
@@ -1515,28 +1464,18 @@ ZEND_VM_HANDLER(91, ZEND_FETCH_OBJ_IS, VAR|UNUSED|CV, CONST|TMP|VAR|CV)
if (UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT) ||
UNEXPECTED(Z_OBJ_HT_P(container)->read_property == NULL)) {
ZVAL_NULL(EX_VAR(opline->result.var));
- FREE_OP2();
} else {
zval *retval;
-//??? if (IS_OP2_TMP_FREE()) {
-//??? MAKE_REAL_ZVAL_PTR(offset);
-//??? }
-
/* here we are sure we are dealing with an object */
retval = Z_OBJ_HT_P(container)->read_property(container, offset, BP_VAR_IS, ((OP2_TYPE == IS_CONST) ? opline->op2.literal : NULL), EX_VAR(opline->result.var) TSRMLS_CC);
if (retval != EX_VAR(opline->result.var)) {
ZVAL_COPY(EX_VAR(opline->result.var), retval);
}
-
-//??? if (IS_OP2_TMP_FREE()) {
-//??? zval_ptr_dtor(offset);
-//??? } else {
- FREE_OP2();
-//??? }
}
+ FREE_OP2();
FREE_OP1();
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
@@ -1556,19 +1495,11 @@ ZEND_VM_HANDLER(94, ZEND_FETCH_OBJ_FUNC_ARG, VAR|UNUSED|CV, CONST|TMP|VAR|CV)
property = GET_OP2_ZVAL_PTR(BP_VAR_R);
container = GET_OP1_OBJ_ZVAL_PTR_PTR(BP_VAR_W);
-//??? if (IS_OP2_TMP_FREE()) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
if (OP1_TYPE == IS_VAR && UNEXPECTED(Z_TYPE_P(container) == IS_STR_OFFSET)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
zend_fetch_property_address(EX_VAR(opline->result.var), container, property, ((OP2_TYPE == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_W, 0 TSRMLS_CC);
-//??? if (IS_OP2_TMP_FREE()) {
-//??? zval_ptr_dtor(property);
-//??? } else {
- FREE_OP2();
-//??? }
-
+ FREE_OP2();
if (OP1_TYPE == IS_VAR && OP1_FREE && READY_TO_DESTROY(free_op1.var)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
@@ -1590,19 +1521,11 @@ ZEND_VM_HANDLER(97, ZEND_FETCH_OBJ_UNSET, VAR|UNUSED|CV, CONST|TMP|VAR|CV)
container = GET_OP1_OBJ_ZVAL_PTR_PTR(BP_VAR_UNSET);
property = GET_OP2_ZVAL_PTR(BP_VAR_R);
-//??? if (IS_OP2_TMP_FREE()) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
if (OP1_TYPE == IS_VAR && UNEXPECTED(Z_TYPE_P(container) == IS_STR_OFFSET)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
zend_fetch_property_address(EX_VAR(opline->result.var), container, property, ((OP2_TYPE == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_UNSET, 0 TSRMLS_CC);
-//??? if (IS_OP2_TMP_FREE()) {
-//??? zval_ptr_dtor(property);
-//??? } else {
- FREE_OP2();
-//??? }
-
+ FREE_OP2();
if (OP1_TYPE == IS_VAR && OP1_FREE && READY_TO_DESTROY(free_op1.var)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
@@ -1644,18 +1567,11 @@ ZEND_VM_HANDLER(136, ZEND_ASSIGN_OBJ, VAR|UNUSED|CV, CONST|TMP|VAR|CV)
object = GET_OP1_OBJ_ZVAL_PTR_PTR(BP_VAR_W);
property_name = GET_OP2_ZVAL_PTR(BP_VAR_R);
-//??? if (IS_OP2_TMP_FREE()) {
-//??? MAKE_REAL_ZVAL_PTR(property_name);
-//??? }
if (OP1_TYPE == IS_VAR && UNEXPECTED(Z_TYPE_P(object) == IS_STR_OFFSET)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
}
zend_assign_to_object(RETURN_VALUE_USED(opline)?EX_VAR(opline->result.var):NULL, object, property_name, (opline+1)->op1_type, &(opline+1)->op1, execute_data, ZEND_ASSIGN_OBJ, ((OP2_TYPE == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
-//??? if (IS_OP2_TMP_FREE()) {
-//??? zval_ptr_dtor(property_name);
-//??? } else {
- FREE_OP2();
-//??? }
+ FREE_OP2();
FREE_OP1_VAR_PTR();
/* assign_obj has two opcodes! */
CHECK_EXCEPTION();
@@ -1682,15 +1598,8 @@ ZEND_VM_HANDLER(147, ZEND_ASSIGN_DIM, VAR|CV, CONST|TMP|VAR|UNUSED|CV)
zend_free_op free_op2;
zval *property_name = GET_OP2_ZVAL_PTR(BP_VAR_R);
-//??? if (IS_OP2_TMP_FREE()) {
-//??? MAKE_REAL_ZVAL_PTR(property_name);
-//??? }
zend_assign_to_object(RETURN_VALUE_USED(opline)?EX_VAR(opline->result.var):NULL, object_ptr, property_name, (opline+1)->op1_type, &(opline+1)->op1, execute_data, ZEND_ASSIGN_DIM, ((OP2_TYPE == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
-//??? if (IS_OP2_TMP_FREE()) {
-//??? zval_ptr_dtor(property_name);
-//??? } else {
- FREE_OP2();
-//??? }
+ FREE_OP2();
} else {
zend_free_op free_op2, free_op_data1, free_op_data2;
zval *value;
@@ -2985,8 +2894,7 @@ ZEND_VM_HANDLER(107, ZEND_CATCH, CONST, CV)
CACHE_PTR(opline->op1.literal->cache_slot, catch_ce);
}
-//??? ce = Z_OBJCE_P(EG(exception));
- ce = EG(exception)->ce;
+ ce = zend_get_class_entry(EG(exception) TSRMLS_CC);
#ifdef HAVE_DTRACE
if (DTRACE_EXCEPTION_CAUGHT_ENABLED()) {
@@ -4201,24 +4109,14 @@ ZEND_VM_HANDLER(76, ZEND_UNSET_OBJ, VAR|UNUSED|CV, CONST|TMP|VAR|CV)
ZVAL_DEREF(container);
if (Z_TYPE_P(container) == IS_OBJECT) {
-//??? if (IS_OP2_TMP_FREE()) {
-//??? MAKE_REAL_ZVAL_PTR(offset);
-//??? }
if (Z_OBJ_HT_P(container)->unset_property) {
Z_OBJ_HT_P(container)->unset_property(container, offset, ((OP2_TYPE == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
} else {
zend_error(E_NOTICE, "Trying to unset property of non-object");
}
-//??? if (IS_OP2_TMP_FREE()) {
-//??? zval_ptr_dtor(offset);
-//??? } else {
- FREE_OP2();
-//??? }
- } else {
- FREE_OP2();
}
+ FREE_OP2();
FREE_OP1_VAR_PTR();
-
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -4304,12 +4202,9 @@ ZEND_VM_HANDLER(77, ZEND_FE_RESET, CONST|TMP|VAR|CV, ANY)
ZVAL_DUP(&tmp, array_ref);
array_ptr = array_ref = &tmp;
} else if (OP1_TYPE == IS_CV) {
-//??? dereference
- if (Z_ISREF_P(array_ref)) {
- if (Z_REFCOUNT_P(array_ref) == 1) {
- ZVAL_UNREF(array_ref);
- array_ptr = array_ref;
- }
+ if (Z_ISREF_P(array_ref) && Z_REFCOUNT_P(array_ref) == 1) {
+ ZVAL_UNREF(array_ref);
+ array_ptr = array_ref;
}
Z_ADDREF_P(array_ref);
}
@@ -4671,11 +4566,7 @@ ZEND_VM_C_LABEL(str_index_prop):
} else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
result = (value == NULL || !i_zend_is_true(value TSRMLS_CC));
}
- FREE_OP2();
} else if (Z_TYPE_P(container) == IS_OBJECT) {
-//??? if (IS_OP2_TMP_FREE()) {
-//??? MAKE_REAL_ZVAL_PTR(offset);
-//??? }
if (prop_dim) {
if (Z_OBJ_HT_P(container)->has_property) {
result = Z_OBJ_HT_P(container)->has_property(container, offset, (opline->extended_value & ZEND_ISSET) == 0, ((OP2_TYPE == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
@@ -4694,11 +4585,6 @@ ZEND_VM_C_LABEL(str_index_prop):
if ((opline->extended_value & ZEND_ISSET) == 0) {
result = !result;
}
-//??? if (IS_OP2_TMP_FREE()) {
-//??? zval_ptr_dtor(offset);
-//??? } else {
- FREE_OP2();
-//??? }
} else if (Z_TYPE_P(container) == IS_STRING && !prop_dim) { /* string offsets */
zval tmp;
@@ -4723,12 +4609,11 @@ ZEND_VM_C_LABEL(str_index_prop):
if ((opline->extended_value & ZEND_ISSET) == 0) {
result = !result;
}
- FREE_OP2();
} else {
result = ((opline->extended_value & ZEND_ISSET) == 0);
- FREE_OP2();
}
+ FREE_OP2();
ZVAL_BOOL(EX_VAR(opline->result.var), result);
FREE_OP1_IF_VAR();
CHECK_EXCEPTION();
diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h
index d8fcab0a63..eae7d0820a 100644
--- a/Zend/zend_vm_execute.h
+++ b/Zend/zend_vm_execute.h
@@ -3024,12 +3024,9 @@ static int ZEND_FASTCALL ZEND_FE_RESET_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_A
ZVAL_DUP(&tmp, array_ref);
array_ptr = array_ref = &tmp;
} else if (IS_CONST == IS_CV) {
-//??? dereference
- if (Z_ISREF_P(array_ref)) {
- if (Z_REFCOUNT_P(array_ref) == 1) {
- ZVAL_UNREF(array_ref);
- array_ptr = array_ref;
- }
+ if (Z_ISREF_P(array_ref) && Z_REFCOUNT_P(array_ref) == 1) {
+ ZVAL_UNREF(array_ref);
+ array_ptr = array_ref;
}
Z_ADDREF_P(array_ref);
}
@@ -7028,8 +7025,7 @@ static int ZEND_FASTCALL ZEND_CATCH_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_A
CACHE_PTR(opline->op1.literal->cache_slot, catch_ce);
}
-//??? ce = Z_OBJCE_P(EG(exception));
- ce = EG(exception)->ce;
+ ce = zend_get_class_entry(EG(exception) TSRMLS_CC);
#ifdef HAVE_DTRACE
if (DTRACE_EXCEPTION_CAUGHT_ENABLED()) {
@@ -8017,12 +8013,9 @@ static int ZEND_FASTCALL ZEND_FE_RESET_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARG
ZVAL_DUP(&tmp, array_ref);
array_ptr = array_ref = &tmp;
} else if (IS_TMP_VAR == IS_CV) {
-//??? dereference
- if (Z_ISREF_P(array_ref)) {
- if (Z_REFCOUNT_P(array_ref) == 1) {
- ZVAL_UNREF(array_ref);
- array_ptr = array_ref;
- }
+ if (Z_ISREF_P(array_ref) && Z_REFCOUNT_P(array_ref) == 1) {
+ ZVAL_UNREF(array_ref);
+ array_ptr = array_ref;
}
Z_ADDREF_P(array_ref);
}
@@ -13056,12 +13049,9 @@ static int ZEND_FASTCALL ZEND_FE_RESET_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARG
ZVAL_DUP(&tmp, array_ref);
array_ptr = array_ref = &tmp;
} else if (IS_VAR == IS_CV) {
-//??? dereference
- if (Z_ISREF_P(array_ref)) {
- if (Z_REFCOUNT_P(array_ref) == 1) {
- ZVAL_UNREF(array_ref);
- array_ptr = array_ref;
- }
+ if (Z_ISREF_P(array_ref) && Z_REFCOUNT_P(array_ref) == 1) {
+ ZVAL_UNREF(array_ref);
+ array_ptr = array_ref;
}
Z_ADDREF_P(array_ref);
}
@@ -13730,11 +13720,6 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_VAR_CONST(int (*b
}
} else {
/* here we are sure we are dealing with an object */
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
-
- /* here property is a string */
if (opline->extended_value == ZEND_ASSIGN_OBJ
&& Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval *zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
@@ -13792,11 +13777,6 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_VAR_CONST(int (*b
}
}
-//??? if (0) {
-//??? zval_ptr_dtor(property);
-//??? } else {
-
-//??? }
FREE_OP(free_op_data1);
}
@@ -14099,10 +14079,6 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_VAR_CONST(incdec_t
/* here we are sure we are dealing with an object */
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
-
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval *zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
@@ -14146,11 +14122,6 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_VAR_CONST(incdec_t
}
}
-//??? if (0) {
-//??? zval_ptr_dtor(property);
-//??? } else {
-
-//??? }
if (free_op1.var) {zval_ptr_dtor_nogc(free_op1.var);};
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
@@ -14197,10 +14168,6 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_VAR_CONST(incdec_
/* here we are sure we are dealing with an object */
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
-
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval *zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
@@ -14242,11 +14209,6 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_VAR_CONST(incdec_
}
}
-//??? if (0) {
-//??? zval_ptr_dtor(property);
-//??? } else {
-
-//??? }
if (free_op1.var) {zval_ptr_dtor_nogc(free_op1.var);};
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
@@ -14559,26 +14521,15 @@ static int ZEND_FASTCALL zend_fetch_property_address_read_helper_SPEC_VAR_CONST(
UNEXPECTED(Z_OBJ_HT_P(container)->read_property == NULL)) {
zend_error(E_NOTICE, "Trying to get property of non-object");
ZVAL_NULL(EX_VAR(opline->result.var));
-
} else {
zval *retval;
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(offset);
-//??? }
-
/* here we are sure we are dealing with an object */
retval = Z_OBJ_HT_P(container)->read_property(container, offset, BP_VAR_R, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL), EX_VAR(opline->result.var) TSRMLS_CC);
if (retval != EX_VAR(opline->result.var)) {
ZVAL_COPY(EX_VAR(opline->result.var), retval);
}
-
-//??? if (0) {
-//??? zval_ptr_dtor(offset);
-//??? } else {
-
-//??? }
}
zval_ptr_dtor_nogc(free_op1.var);
@@ -14601,20 +14552,12 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_W_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HA
SAVE_OPLINE();
property = opline->op2.zv;
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
container = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1 TSRMLS_CC);
if (IS_VAR == IS_VAR && UNEXPECTED(Z_TYPE_P(container) == IS_STR_OFFSET)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
zend_fetch_property_address(EX_VAR(opline->result.var), container, property, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_W, (opline->extended_value & ZEND_FETCH_MAKE_REF) != 0 TSRMLS_CC);
-//??? if (0) {
-//??? zval_ptr_dtor(property);
-//??? } else {
-
-//??? }
if (IS_VAR == IS_VAR && (free_op1.var != NULL) && READY_TO_DESTROY(free_op1.var)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
@@ -14635,18 +14578,10 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_RW_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_H
property = opline->op2.zv;
container = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1 TSRMLS_CC);
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
if (IS_VAR == IS_VAR && UNEXPECTED(Z_TYPE_P(container) == IS_STR_OFFSET)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
zend_fetch_property_address(EX_VAR(opline->result.var), container, property, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_RW, 0 TSRMLS_CC);
-//??? if (0) {
-//??? zval_ptr_dtor(property);
-//??? } else {
-
-//??? }
if (IS_VAR == IS_VAR && (free_op1.var != NULL) && READY_TO_DESTROY(free_op1.var)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
@@ -14671,26 +14606,15 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_H
if (UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT) ||
UNEXPECTED(Z_OBJ_HT_P(container)->read_property == NULL)) {
ZVAL_NULL(EX_VAR(opline->result.var));
-
} else {
zval *retval;
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(offset);
-//??? }
-
/* here we are sure we are dealing with an object */
retval = Z_OBJ_HT_P(container)->read_property(container, offset, BP_VAR_IS, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL), EX_VAR(opline->result.var) TSRMLS_CC);
if (retval != EX_VAR(opline->result.var)) {
ZVAL_COPY(EX_VAR(opline->result.var), retval);
}
-
-//??? if (0) {
-//??? zval_ptr_dtor(offset);
-//??? } else {
-
-//??? }
}
zval_ptr_dtor_nogc(free_op1.var);
@@ -14712,18 +14636,10 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_VAR_CONST_HANDLER(ZEND_OP
property = opline->op2.zv;
container = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1 TSRMLS_CC);
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
if (IS_VAR == IS_VAR && UNEXPECTED(Z_TYPE_P(container) == IS_STR_OFFSET)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
zend_fetch_property_address(EX_VAR(opline->result.var), container, property, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_W, 0 TSRMLS_CC);
-//??? if (0) {
-//??? zval_ptr_dtor(property);
-//??? } else {
-
-//??? }
if (IS_VAR == IS_VAR && (free_op1.var != NULL) && READY_TO_DESTROY(free_op1.var)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
@@ -14746,18 +14662,10 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_UNSET_SPEC_VAR_CONST_HANDLER(ZEND_OPCOD
container = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1 TSRMLS_CC);
property = opline->op2.zv;
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
if (IS_VAR == IS_VAR && UNEXPECTED(Z_TYPE_P(container) == IS_STR_OFFSET)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
zend_fetch_property_address(EX_VAR(opline->result.var), container, property, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_UNSET, 0 TSRMLS_CC);
-//??? if (0) {
-//??? zval_ptr_dtor(property);
-//??? } else {
-
-//??? }
if (IS_VAR == IS_VAR && (free_op1.var != NULL) && READY_TO_DESTROY(free_op1.var)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
@@ -14778,18 +14686,11 @@ static int ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HAN
object = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1 TSRMLS_CC);
property_name = opline->op2.zv;
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(property_name);
-//??? }
if (IS_VAR == IS_VAR && UNEXPECTED(Z_TYPE_P(object) == IS_STR_OFFSET)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
}
zend_assign_to_object(RETURN_VALUE_USED(opline)?EX_VAR(opline->result.var):NULL, object, property_name, (opline+1)->op1_type, &(opline+1)->op1, execute_data, ZEND_ASSIGN_OBJ, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
-//??? if (0) {
-//??? zval_ptr_dtor(property_name);
-//??? } else {
-//??? }
if (free_op1.var) {zval_ptr_dtor_nogc(free_op1.var);};
/* assign_obj has two opcodes! */
CHECK_EXCEPTION();
@@ -14816,15 +14717,8 @@ static int ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HAN
zval *property_name = opline->op2.zv;
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(property_name);
-//??? }
zend_assign_to_object(RETURN_VALUE_USED(opline)?EX_VAR(opline->result.var):NULL, object_ptr, property_name, (opline+1)->op1_type, &(opline+1)->op1, execute_data, ZEND_ASSIGN_DIM, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
-//??? if (0) {
-//??? zval_ptr_dtor(property_name);
-//??? } else {
-//??? }
} else {
zend_free_op free_op_data1, free_op_data2;
zval *value;
@@ -15483,24 +15377,14 @@ static int ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HAND
ZVAL_DEREF(container);
if (Z_TYPE_P(container) == IS_OBJECT) {
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(offset);
-//??? }
if (Z_OBJ_HT_P(container)->unset_property) {
Z_OBJ_HT_P(container)->unset_property(container, offset, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
} else {
zend_error(E_NOTICE, "Trying to unset property of non-object");
}
-//??? if (0) {
-//??? zval_ptr_dtor(offset);
-//??? } else {
-
-//??? }
- } else {
-
}
- if (free_op1.var) {zval_ptr_dtor_nogc(free_op1.var);};
+ if (free_op1.var) {zval_ptr_dtor_nogc(free_op1.var);};
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -15641,11 +15525,7 @@ str_index_prop:
} else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
result = (value == NULL || !i_zend_is_true(value TSRMLS_CC));
}
-
} else if (Z_TYPE_P(container) == IS_OBJECT) {
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(offset);
-//??? }
if (prop_dim) {
if (Z_OBJ_HT_P(container)->has_property) {
result = Z_OBJ_HT_P(container)->has_property(container, offset, (opline->extended_value & ZEND_ISSET) == 0, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
@@ -15664,11 +15544,6 @@ str_index_prop:
if ((opline->extended_value & ZEND_ISSET) == 0) {
result = !result;
}
-//??? if (0) {
-//??? zval_ptr_dtor(offset);
-//??? } else {
-
-//??? }
} else if (Z_TYPE_P(container) == IS_STRING && !prop_dim) { /* string offsets */
zval tmp;
@@ -15693,10 +15568,8 @@ str_index_prop:
if ((opline->extended_value & ZEND_ISSET) == 0) {
result = !result;
}
-
} else {
result = ((opline->extended_value & ZEND_ISSET) == 0);
-
}
ZVAL_BOOL(EX_VAR(opline->result.var), result);
@@ -16159,11 +16032,6 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_VAR_TMP(int (*bin
}
} else {
/* here we are sure we are dealing with an object */
-//??? if (1) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
-
- /* here property is a string */
if (opline->extended_value == ZEND_ASSIGN_OBJ
&& Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval *zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
@@ -16221,11 +16089,7 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_VAR_TMP(int (*bin
}
}
-//??? if (1) {
-//??? zval_ptr_dtor(property);
-//??? } else {
- zval_dtor(free_op2.var);
-//??? }
+ zval_dtor(free_op2.var);
FREE_OP(free_op_data1);
}
@@ -16528,10 +16392,6 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_VAR_TMP(incdec_t i
/* here we are sure we are dealing with an object */
-//??? if (1) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
-
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval *zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
@@ -16575,11 +16435,7 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_VAR_TMP(incdec_t i
}
}
-//??? if (1) {
-//??? zval_ptr_dtor(property);
-//??? } else {
- zval_dtor(free_op2.var);
-//??? }
+ zval_dtor(free_op2.var);
if (free_op1.var) {zval_ptr_dtor_nogc(free_op1.var);};
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
@@ -16626,10 +16482,6 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_VAR_TMP(incdec_t
/* here we are sure we are dealing with an object */
-//??? if (1) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
-
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval *zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
@@ -16671,11 +16523,7 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_VAR_TMP(incdec_t
}
}
-//??? if (1) {
-//??? zval_ptr_dtor(property);
-//??? } else {
- zval_dtor(free_op2.var);
-//??? }
+ zval_dtor(free_op2.var);
if (free_op1.var) {zval_ptr_dtor_nogc(free_op1.var);};
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
@@ -16841,28 +16689,18 @@ static int ZEND_FASTCALL zend_fetch_property_address_read_helper_SPEC_VAR_TMP(ZE
UNEXPECTED(Z_OBJ_HT_P(container)->read_property == NULL)) {
zend_error(E_NOTICE, "Trying to get property of non-object");
ZVAL_NULL(EX_VAR(opline->result.var));
- zval_dtor(free_op2.var);
} else {
zval *retval;
-//??? if (1) {
-//??? MAKE_REAL_ZVAL_PTR(offset);
-//??? }
-
/* here we are sure we are dealing with an object */
retval = Z_OBJ_HT_P(container)->read_property(container, offset, BP_VAR_R, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL), EX_VAR(opline->result.var) TSRMLS_CC);
if (retval != EX_VAR(opline->result.var)) {
ZVAL_COPY(EX_VAR(opline->result.var), retval);
}
-
-//??? if (1) {
-//??? zval_ptr_dtor(offset);
-//??? } else {
- zval_dtor(free_op2.var);
-//??? }
}
+ zval_dtor(free_op2.var);
zval_ptr_dtor_nogc(free_op1.var);
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
@@ -16883,21 +16721,13 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_W_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HAND
SAVE_OPLINE();
property = _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC);
-//??? if (1) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
container = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1 TSRMLS_CC);
if (IS_VAR == IS_VAR && UNEXPECTED(Z_TYPE_P(container) == IS_STR_OFFSET)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
zend_fetch_property_address(EX_VAR(opline->result.var), container, property, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_W, (opline->extended_value & ZEND_FETCH_MAKE_REF) != 0 TSRMLS_CC);
-//??? if (1) {
-//??? zval_ptr_dtor(property);
-//??? } else {
- zval_dtor(free_op2.var);
-//??? }
-
+ zval_dtor(free_op2.var);
if (IS_VAR == IS_VAR && (free_op1.var != NULL) && READY_TO_DESTROY(free_op1.var)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
@@ -16917,19 +16747,11 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_RW_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HAN
property = _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC);
container = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1 TSRMLS_CC);
-//??? if (1) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
if (IS_VAR == IS_VAR && UNEXPECTED(Z_TYPE_P(container) == IS_STR_OFFSET)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
zend_fetch_property_address(EX_VAR(opline->result.var), container, property, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_RW, 0 TSRMLS_CC);
-//??? if (1) {
-//??? zval_ptr_dtor(property);
-//??? } else {
- zval_dtor(free_op2.var);
-//??? }
-
+ zval_dtor(free_op2.var);
if (IS_VAR == IS_VAR && (free_op1.var != NULL) && READY_TO_DESTROY(free_op1.var)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
@@ -16953,28 +16775,18 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HAN
if (UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT) ||
UNEXPECTED(Z_OBJ_HT_P(container)->read_property == NULL)) {
ZVAL_NULL(EX_VAR(opline->result.var));
- zval_dtor(free_op2.var);
} else {
zval *retval;
-//??? if (1) {
-//??? MAKE_REAL_ZVAL_PTR(offset);
-//??? }
-
/* here we are sure we are dealing with an object */
retval = Z_OBJ_HT_P(container)->read_property(container, offset, BP_VAR_IS, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL), EX_VAR(opline->result.var) TSRMLS_CC);
if (retval != EX_VAR(opline->result.var)) {
ZVAL_COPY(EX_VAR(opline->result.var), retval);
}
-
-//??? if (1) {
-//??? zval_ptr_dtor(offset);
-//??? } else {
- zval_dtor(free_op2.var);
-//??? }
}
+ zval_dtor(free_op2.var);
zval_ptr_dtor_nogc(free_op1.var);
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
@@ -16994,19 +16806,11 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_VAR_TMP_HANDLER(ZEND_OPCO
property = _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC);
container = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1 TSRMLS_CC);
-//??? if (1) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
if (IS_VAR == IS_VAR && UNEXPECTED(Z_TYPE_P(container) == IS_STR_OFFSET)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
zend_fetch_property_address(EX_VAR(opline->result.var), container, property, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_W, 0 TSRMLS_CC);
-//??? if (1) {
-//??? zval_ptr_dtor(property);
-//??? } else {
- zval_dtor(free_op2.var);
-//??? }
-
+ zval_dtor(free_op2.var);
if (IS_VAR == IS_VAR && (free_op1.var != NULL) && READY_TO_DESTROY(free_op1.var)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
@@ -17028,19 +16832,11 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_UNSET_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_
container = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1 TSRMLS_CC);
property = _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC);
-//??? if (1) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
if (IS_VAR == IS_VAR && UNEXPECTED(Z_TYPE_P(container) == IS_STR_OFFSET)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
zend_fetch_property_address(EX_VAR(opline->result.var), container, property, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_UNSET, 0 TSRMLS_CC);
-//??? if (1) {
-//??? zval_ptr_dtor(property);
-//??? } else {
- zval_dtor(free_op2.var);
-//??? }
-
+ zval_dtor(free_op2.var);
if (IS_VAR == IS_VAR && (free_op1.var != NULL) && READY_TO_DESTROY(free_op1.var)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
@@ -17060,18 +16856,11 @@ static int ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDL
object = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1 TSRMLS_CC);
property_name = _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC);
-//??? if (1) {
-//??? MAKE_REAL_ZVAL_PTR(property_name);
-//??? }
if (IS_VAR == IS_VAR && UNEXPECTED(Z_TYPE_P(object) == IS_STR_OFFSET)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
}
zend_assign_to_object(RETURN_VALUE_USED(opline)?EX_VAR(opline->result.var):NULL, object, property_name, (opline+1)->op1_type, &(opline+1)->op1, execute_data, ZEND_ASSIGN_OBJ, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
-//??? if (1) {
-//??? zval_ptr_dtor(property_name);
-//??? } else {
- zval_dtor(free_op2.var);
-//??? }
+ zval_dtor(free_op2.var);
if (free_op1.var) {zval_ptr_dtor_nogc(free_op1.var);};
/* assign_obj has two opcodes! */
CHECK_EXCEPTION();
@@ -17098,15 +16887,8 @@ static int ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDL
zend_free_op free_op2;
zval *property_name = _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC);
-//??? if (1) {
-//??? MAKE_REAL_ZVAL_PTR(property_name);
-//??? }
zend_assign_to_object(RETURN_VALUE_USED(opline)?EX_VAR(opline->result.var):NULL, object_ptr, property_name, (opline+1)->op1_type, &(opline+1)->op1, execute_data, ZEND_ASSIGN_DIM, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
-//??? if (1) {
-//??? zval_ptr_dtor(property_name);
-//??? } else {
- zval_dtor(free_op2.var);
-//??? }
+ zval_dtor(free_op2.var);
} else {
zend_free_op free_op2, free_op_data1, free_op_data2;
zval *value;
@@ -17600,24 +17382,14 @@ static int ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLE
ZVAL_DEREF(container);
if (Z_TYPE_P(container) == IS_OBJECT) {
-//??? if (1) {
-//??? MAKE_REAL_ZVAL_PTR(offset);
-//??? }
if (Z_OBJ_HT_P(container)->unset_property) {
Z_OBJ_HT_P(container)->unset_property(container, offset, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
} else {
zend_error(E_NOTICE, "Trying to unset property of non-object");
}
-//??? if (1) {
-//??? zval_ptr_dtor(offset);
-//??? } else {
- zval_dtor(free_op2.var);
-//??? }
- } else {
- zval_dtor(free_op2.var);
}
+ zval_dtor(free_op2.var);
if (free_op1.var) {zval_ptr_dtor_nogc(free_op1.var);};
-
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -17679,11 +17451,7 @@ str_index_prop:
} else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
result = (value == NULL || !i_zend_is_true(value TSRMLS_CC));
}
- zval_dtor(free_op2.var);
} else if (Z_TYPE_P(container) == IS_OBJECT) {
-//??? if (1) {
-//??? MAKE_REAL_ZVAL_PTR(offset);
-//??? }
if (prop_dim) {
if (Z_OBJ_HT_P(container)->has_property) {
result = Z_OBJ_HT_P(container)->has_property(container, offset, (opline->extended_value & ZEND_ISSET) == 0, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
@@ -17702,11 +17470,6 @@ str_index_prop:
if ((opline->extended_value & ZEND_ISSET) == 0) {
result = !result;
}
-//??? if (1) {
-//??? zval_ptr_dtor(offset);
-//??? } else {
- zval_dtor(free_op2.var);
-//??? }
} else if (Z_TYPE_P(container) == IS_STRING && !prop_dim) { /* string offsets */
zval tmp;
@@ -17731,12 +17494,11 @@ str_index_prop:
if ((opline->extended_value & ZEND_ISSET) == 0) {
result = !result;
}
- zval_dtor(free_op2.var);
} else {
result = ((opline->extended_value & ZEND_ISSET) == 0);
- zval_dtor(free_op2.var);
}
+ zval_dtor(free_op2.var);
ZVAL_BOOL(EX_VAR(opline->result.var), result);
zval_ptr_dtor_nogc(free_op1.var);
CHECK_EXCEPTION();
@@ -18197,11 +17959,6 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_VAR_VAR(int (*bin
}
} else {
/* here we are sure we are dealing with an object */
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
-
- /* here property is a string */
if (opline->extended_value == ZEND_ASSIGN_OBJ
&& Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval *zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
@@ -18259,11 +18016,7 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_VAR_VAR(int (*bin
}
}
-//??? if (0) {
-//??? zval_ptr_dtor(property);
-//??? } else {
- zval_ptr_dtor_nogc(free_op2.var);
-//??? }
+ zval_ptr_dtor_nogc(free_op2.var);
FREE_OP(free_op_data1);
}
@@ -18566,10 +18319,6 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_VAR_VAR(incdec_t i
/* here we are sure we are dealing with an object */
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
-
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval *zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
@@ -18613,11 +18362,7 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_VAR_VAR(incdec_t i
}
}
-//??? if (0) {
-//??? zval_ptr_dtor(property);
-//??? } else {
- zval_ptr_dtor_nogc(free_op2.var);
-//??? }
+ zval_ptr_dtor_nogc(free_op2.var);
if (free_op1.var) {zval_ptr_dtor_nogc(free_op1.var);};
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
@@ -18664,10 +18409,6 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_VAR_VAR(incdec_t
/* here we are sure we are dealing with an object */
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
-
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval *zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
@@ -18709,11 +18450,7 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_VAR_VAR(incdec_t
}
}
-//??? if (0) {
-//??? zval_ptr_dtor(property);
-//??? } else {
- zval_ptr_dtor_nogc(free_op2.var);
-//??? }
+ zval_ptr_dtor_nogc(free_op2.var);
if (free_op1.var) {zval_ptr_dtor_nogc(free_op1.var);};
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
@@ -19026,28 +18763,18 @@ static int ZEND_FASTCALL zend_fetch_property_address_read_helper_SPEC_VAR_VAR(ZE
UNEXPECTED(Z_OBJ_HT_P(container)->read_property == NULL)) {
zend_error(E_NOTICE, "Trying to get property of non-object");
ZVAL_NULL(EX_VAR(opline->result.var));
- zval_ptr_dtor_nogc(free_op2.var);
} else {
zval *retval;
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(offset);
-//??? }
-
/* here we are sure we are dealing with an object */
retval = Z_OBJ_HT_P(container)->read_property(container, offset, BP_VAR_R, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL), EX_VAR(opline->result.var) TSRMLS_CC);
if (retval != EX_VAR(opline->result.var)) {
ZVAL_COPY(EX_VAR(opline->result.var), retval);
}
-
-//??? if (0) {
-//??? zval_ptr_dtor(offset);
-//??? } else {
- zval_ptr_dtor_nogc(free_op2.var);
-//??? }
}
+ zval_ptr_dtor_nogc(free_op2.var);
zval_ptr_dtor_nogc(free_op1.var);
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
@@ -19068,21 +18795,13 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_W_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HAND
SAVE_OPLINE();
property = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2 TSRMLS_CC);
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
container = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1 TSRMLS_CC);
if (IS_VAR == IS_VAR && UNEXPECTED(Z_TYPE_P(container) == IS_STR_OFFSET)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
zend_fetch_property_address(EX_VAR(opline->result.var), container, property, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_W, (opline->extended_value & ZEND_FETCH_MAKE_REF) != 0 TSRMLS_CC);
-//??? if (0) {
-//??? zval_ptr_dtor(property);
-//??? } else {
- zval_ptr_dtor_nogc(free_op2.var);
-//??? }
-
+ zval_ptr_dtor_nogc(free_op2.var);
if (IS_VAR == IS_VAR && (free_op1.var != NULL) && READY_TO_DESTROY(free_op1.var)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
@@ -19102,19 +18821,11 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_RW_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HAN
property = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2 TSRMLS_CC);
container = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1 TSRMLS_CC);
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
if (IS_VAR == IS_VAR && UNEXPECTED(Z_TYPE_P(container) == IS_STR_OFFSET)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
zend_fetch_property_address(EX_VAR(opline->result.var), container, property, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_RW, 0 TSRMLS_CC);
-//??? if (0) {
-//??? zval_ptr_dtor(property);
-//??? } else {
- zval_ptr_dtor_nogc(free_op2.var);
-//??? }
-
+ zval_ptr_dtor_nogc(free_op2.var);
if (IS_VAR == IS_VAR && (free_op1.var != NULL) && READY_TO_DESTROY(free_op1.var)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
@@ -19138,28 +18849,18 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HAN
if (UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT) ||
UNEXPECTED(Z_OBJ_HT_P(container)->read_property == NULL)) {
ZVAL_NULL(EX_VAR(opline->result.var));
- zval_ptr_dtor_nogc(free_op2.var);
} else {
zval *retval;
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(offset);
-//??? }
-
/* here we are sure we are dealing with an object */
retval = Z_OBJ_HT_P(container)->read_property(container, offset, BP_VAR_IS, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL), EX_VAR(opline->result.var) TSRMLS_CC);
if (retval != EX_VAR(opline->result.var)) {
ZVAL_COPY(EX_VAR(opline->result.var), retval);
}
-
-//??? if (0) {
-//??? zval_ptr_dtor(offset);
-//??? } else {
- zval_ptr_dtor_nogc(free_op2.var);
-//??? }
}
+ zval_ptr_dtor_nogc(free_op2.var);
zval_ptr_dtor_nogc(free_op1.var);
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
@@ -19179,19 +18880,11 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_VAR_VAR_HANDLER(ZEND_OPCO
property = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2 TSRMLS_CC);
container = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1 TSRMLS_CC);
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
if (IS_VAR == IS_VAR && UNEXPECTED(Z_TYPE_P(container) == IS_STR_OFFSET)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
zend_fetch_property_address(EX_VAR(opline->result.var), container, property, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_W, 0 TSRMLS_CC);
-//??? if (0) {
-//??? zval_ptr_dtor(property);
-//??? } else {
- zval_ptr_dtor_nogc(free_op2.var);
-//??? }
-
+ zval_ptr_dtor_nogc(free_op2.var);
if (IS_VAR == IS_VAR && (free_op1.var != NULL) && READY_TO_DESTROY(free_op1.var)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
@@ -19213,19 +18906,11 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_UNSET_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_
container = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1 TSRMLS_CC);
property = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2 TSRMLS_CC);
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
if (IS_VAR == IS_VAR && UNEXPECTED(Z_TYPE_P(container) == IS_STR_OFFSET)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
zend_fetch_property_address(EX_VAR(opline->result.var), container, property, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_UNSET, 0 TSRMLS_CC);
-//??? if (0) {
-//??? zval_ptr_dtor(property);
-//??? } else {
- zval_ptr_dtor_nogc(free_op2.var);
-//??? }
-
+ zval_ptr_dtor_nogc(free_op2.var);
if (IS_VAR == IS_VAR && (free_op1.var != NULL) && READY_TO_DESTROY(free_op1.var)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
@@ -19245,18 +18930,11 @@ static int ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDL
object = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1 TSRMLS_CC);
property_name = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2 TSRMLS_CC);
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(property_name);
-//??? }
if (IS_VAR == IS_VAR && UNEXPECTED(Z_TYPE_P(object) == IS_STR_OFFSET)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
}
zend_assign_to_object(RETURN_VALUE_USED(opline)?EX_VAR(opline->result.var):NULL, object, property_name, (opline+1)->op1_type, &(opline+1)->op1, execute_data, ZEND_ASSIGN_OBJ, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
-//??? if (0) {
-//??? zval_ptr_dtor(property_name);
-//??? } else {
- zval_ptr_dtor_nogc(free_op2.var);
-//??? }
+ zval_ptr_dtor_nogc(free_op2.var);
if (free_op1.var) {zval_ptr_dtor_nogc(free_op1.var);};
/* assign_obj has two opcodes! */
CHECK_EXCEPTION();
@@ -19283,15 +18961,8 @@ static int ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDL
zend_free_op free_op2;
zval *property_name = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2 TSRMLS_CC);
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(property_name);
-//??? }
zend_assign_to_object(RETURN_VALUE_USED(opline)?EX_VAR(opline->result.var):NULL, object_ptr, property_name, (opline+1)->op1_type, &(opline+1)->op1, execute_data, ZEND_ASSIGN_DIM, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
-//??? if (0) {
-//??? zval_ptr_dtor(property_name);
-//??? } else {
- zval_ptr_dtor_nogc(free_op2.var);
-//??? }
+ zval_ptr_dtor_nogc(free_op2.var);
} else {
zend_free_op free_op2, free_op_data1, free_op_data2;
zval *value;
@@ -19921,24 +19592,14 @@ static int ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLE
ZVAL_DEREF(container);
if (Z_TYPE_P(container) == IS_OBJECT) {
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(offset);
-//??? }
if (Z_OBJ_HT_P(container)->unset_property) {
Z_OBJ_HT_P(container)->unset_property(container, offset, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
} else {
zend_error(E_NOTICE, "Trying to unset property of non-object");
}
-//??? if (0) {
-//??? zval_ptr_dtor(offset);
-//??? } else {
- zval_ptr_dtor_nogc(free_op2.var);
-//??? }
- } else {
- zval_ptr_dtor_nogc(free_op2.var);
}
+ zval_ptr_dtor_nogc(free_op2.var);
if (free_op1.var) {zval_ptr_dtor_nogc(free_op1.var);};
-
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -20079,11 +19740,7 @@ str_index_prop:
} else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
result = (value == NULL || !i_zend_is_true(value TSRMLS_CC));
}
- zval_ptr_dtor_nogc(free_op2.var);
} else if (Z_TYPE_P(container) == IS_OBJECT) {
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(offset);
-//??? }
if (prop_dim) {
if (Z_OBJ_HT_P(container)->has_property) {
result = Z_OBJ_HT_P(container)->has_property(container, offset, (opline->extended_value & ZEND_ISSET) == 0, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
@@ -20102,11 +19759,6 @@ str_index_prop:
if ((opline->extended_value & ZEND_ISSET) == 0) {
result = !result;
}
-//??? if (0) {
-//??? zval_ptr_dtor(offset);
-//??? } else {
- zval_ptr_dtor_nogc(free_op2.var);
-//??? }
} else if (Z_TYPE_P(container) == IS_STRING && !prop_dim) { /* string offsets */
zval tmp;
@@ -20131,12 +19783,11 @@ str_index_prop:
if ((opline->extended_value & ZEND_ISSET) == 0) {
result = !result;
}
- zval_ptr_dtor_nogc(free_op2.var);
} else {
result = ((opline->extended_value & ZEND_ISSET) == 0);
- zval_ptr_dtor_nogc(free_op2.var);
}
+ zval_ptr_dtor_nogc(free_op2.var);
ZVAL_BOOL(EX_VAR(opline->result.var), result);
zval_ptr_dtor_nogc(free_op1.var);
CHECK_EXCEPTION();
@@ -20322,11 +19973,6 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_VAR_UNUSED(int (*
}
} else {
/* here we are sure we are dealing with an object */
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
-
- /* here property is a string */
if (opline->extended_value == ZEND_ASSIGN_OBJ
&& Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval *zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_UNUSED == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
@@ -20384,11 +20030,6 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_VAR_UNUSED(int (*
}
}
-//??? if (0) {
-//??? zval_ptr_dtor(property);
-//??? } else {
-
-//??? }
FREE_OP(free_op_data1);
}
@@ -20904,15 +20545,8 @@ static int ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_UNUSED_HANDLER(ZEND_OPCODE_HA
zval *property_name = NULL;
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(property_name);
-//??? }
zend_assign_to_object(RETURN_VALUE_USED(opline)?EX_VAR(opline->result.var):NULL, object_ptr, property_name, (opline+1)->op1_type, &(opline+1)->op1, execute_data, ZEND_ASSIGN_DIM, ((IS_UNUSED == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
-//??? if (0) {
-//??? zval_ptr_dtor(property_name);
-//??? } else {
-//??? }
} else {
zend_free_op free_op_data1, free_op_data2;
zval *value;
@@ -21773,11 +21407,6 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_VAR_CV(int (*bina
}
} else {
/* here we are sure we are dealing with an object */
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
-
- /* here property is a string */
if (opline->extended_value == ZEND_ASSIGN_OBJ
&& Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval *zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
@@ -21835,11 +21464,6 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_VAR_CV(int (*bina
}
}
-//??? if (0) {
-//??? zval_ptr_dtor(property);
-//??? } else {
-
-//??? }
FREE_OP(free_op_data1);
}
@@ -22142,10 +21766,6 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_VAR_CV(incdec_t in
/* here we are sure we are dealing with an object */
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
-
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval *zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
@@ -22189,11 +21809,6 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_VAR_CV(incdec_t in
}
}
-//??? if (0) {
-//??? zval_ptr_dtor(property);
-//??? } else {
-
-//??? }
if (free_op1.var) {zval_ptr_dtor_nogc(free_op1.var);};
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
@@ -22240,10 +21855,6 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_VAR_CV(incdec_t i
/* here we are sure we are dealing with an object */
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
-
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval *zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
@@ -22285,11 +21896,6 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_VAR_CV(incdec_t i
}
}
-//??? if (0) {
-//??? zval_ptr_dtor(property);
-//??? } else {
-
-//??? }
if (free_op1.var) {zval_ptr_dtor_nogc(free_op1.var);};
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
@@ -22455,26 +22061,15 @@ static int ZEND_FASTCALL zend_fetch_property_address_read_helper_SPEC_VAR_CV(ZEN
UNEXPECTED(Z_OBJ_HT_P(container)->read_property == NULL)) {
zend_error(E_NOTICE, "Trying to get property of non-object");
ZVAL_NULL(EX_VAR(opline->result.var));
-
} else {
zval *retval;
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(offset);
-//??? }
-
/* here we are sure we are dealing with an object */
retval = Z_OBJ_HT_P(container)->read_property(container, offset, BP_VAR_R, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL), EX_VAR(opline->result.var) TSRMLS_CC);
if (retval != EX_VAR(opline->result.var)) {
ZVAL_COPY(EX_VAR(opline->result.var), retval);
}
-
-//??? if (0) {
-//??? zval_ptr_dtor(offset);
-//??? } else {
-
-//??? }
}
zval_ptr_dtor_nogc(free_op1.var);
@@ -22497,20 +22092,12 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_W_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDL
SAVE_OPLINE();
property = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC);
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
container = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1 TSRMLS_CC);
if (IS_VAR == IS_VAR && UNEXPECTED(Z_TYPE_P(container) == IS_STR_OFFSET)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
zend_fetch_property_address(EX_VAR(opline->result.var), container, property, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_W, (opline->extended_value & ZEND_FETCH_MAKE_REF) != 0 TSRMLS_CC);
-//??? if (0) {
-//??? zval_ptr_dtor(property);
-//??? } else {
-
-//??? }
if (IS_VAR == IS_VAR && (free_op1.var != NULL) && READY_TO_DESTROY(free_op1.var)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
@@ -22531,18 +22118,10 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_RW_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HAND
property = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC);
container = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1 TSRMLS_CC);
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
if (IS_VAR == IS_VAR && UNEXPECTED(Z_TYPE_P(container) == IS_STR_OFFSET)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
zend_fetch_property_address(EX_VAR(opline->result.var), container, property, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_RW, 0 TSRMLS_CC);
-//??? if (0) {
-//??? zval_ptr_dtor(property);
-//??? } else {
-
-//??? }
if (IS_VAR == IS_VAR && (free_op1.var != NULL) && READY_TO_DESTROY(free_op1.var)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
@@ -22567,26 +22146,15 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HAND
if (UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT) ||
UNEXPECTED(Z_OBJ_HT_P(container)->read_property == NULL)) {
ZVAL_NULL(EX_VAR(opline->result.var));
-
} else {
zval *retval;
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(offset);
-//??? }
-
/* here we are sure we are dealing with an object */
retval = Z_OBJ_HT_P(container)->read_property(container, offset, BP_VAR_IS, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL), EX_VAR(opline->result.var) TSRMLS_CC);
if (retval != EX_VAR(opline->result.var)) {
ZVAL_COPY(EX_VAR(opline->result.var), retval);
}
-
-//??? if (0) {
-//??? zval_ptr_dtor(offset);
-//??? } else {
-
-//??? }
}
zval_ptr_dtor_nogc(free_op1.var);
@@ -22608,18 +22176,10 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_VAR_CV_HANDLER(ZEND_OPCOD
property = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC);
container = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1 TSRMLS_CC);
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
if (IS_VAR == IS_VAR && UNEXPECTED(Z_TYPE_P(container) == IS_STR_OFFSET)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
zend_fetch_property_address(EX_VAR(opline->result.var), container, property, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_W, 0 TSRMLS_CC);
-//??? if (0) {
-//??? zval_ptr_dtor(property);
-//??? } else {
-
-//??? }
if (IS_VAR == IS_VAR && (free_op1.var != NULL) && READY_TO_DESTROY(free_op1.var)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
@@ -22642,18 +22202,10 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_UNSET_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_H
container = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1 TSRMLS_CC);
property = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC);
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
if (IS_VAR == IS_VAR && UNEXPECTED(Z_TYPE_P(container) == IS_STR_OFFSET)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
zend_fetch_property_address(EX_VAR(opline->result.var), container, property, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_UNSET, 0 TSRMLS_CC);
-//??? if (0) {
-//??? zval_ptr_dtor(property);
-//??? } else {
-
-//??? }
if (IS_VAR == IS_VAR && (free_op1.var != NULL) && READY_TO_DESTROY(free_op1.var)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
@@ -22674,18 +22226,11 @@ static int ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLE
object = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1 TSRMLS_CC);
property_name = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC);
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(property_name);
-//??? }
if (IS_VAR == IS_VAR && UNEXPECTED(Z_TYPE_P(object) == IS_STR_OFFSET)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
}
zend_assign_to_object(RETURN_VALUE_USED(opline)?EX_VAR(opline->result.var):NULL, object, property_name, (opline+1)->op1_type, &(opline+1)->op1, execute_data, ZEND_ASSIGN_OBJ, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
-//??? if (0) {
-//??? zval_ptr_dtor(property_name);
-//??? } else {
-//??? }
if (free_op1.var) {zval_ptr_dtor_nogc(free_op1.var);};
/* assign_obj has two opcodes! */
CHECK_EXCEPTION();
@@ -22712,15 +22257,8 @@ static int ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLE
zval *property_name = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC);
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(property_name);
-//??? }
zend_assign_to_object(RETURN_VALUE_USED(opline)?EX_VAR(opline->result.var):NULL, object_ptr, property_name, (opline+1)->op1_type, &(opline+1)->op1, execute_data, ZEND_ASSIGN_DIM, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
-//??? if (0) {
-//??? zval_ptr_dtor(property_name);
-//??? } else {
-//??? }
} else {
zend_free_op free_op_data1, free_op_data2;
zval *value;
@@ -23273,24 +22811,14 @@ static int ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER
ZVAL_DEREF(container);
if (Z_TYPE_P(container) == IS_OBJECT) {
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(offset);
-//??? }
if (Z_OBJ_HT_P(container)->unset_property) {
Z_OBJ_HT_P(container)->unset_property(container, offset, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
} else {
zend_error(E_NOTICE, "Trying to unset property of non-object");
}
-//??? if (0) {
-//??? zval_ptr_dtor(offset);
-//??? } else {
-
-//??? }
- } else {
-
}
- if (free_op1.var) {zval_ptr_dtor_nogc(free_op1.var);};
+ if (free_op1.var) {zval_ptr_dtor_nogc(free_op1.var);};
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -23352,11 +22880,7 @@ str_index_prop:
} else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
result = (value == NULL || !i_zend_is_true(value TSRMLS_CC));
}
-
} else if (Z_TYPE_P(container) == IS_OBJECT) {
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(offset);
-//??? }
if (prop_dim) {
if (Z_OBJ_HT_P(container)->has_property) {
result = Z_OBJ_HT_P(container)->has_property(container, offset, (opline->extended_value & ZEND_ISSET) == 0, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
@@ -23375,11 +22899,6 @@ str_index_prop:
if ((opline->extended_value & ZEND_ISSET) == 0) {
result = !result;
}
-//??? if (0) {
-//??? zval_ptr_dtor(offset);
-//??? } else {
-
-//??? }
} else if (Z_TYPE_P(container) == IS_STRING && !prop_dim) { /* string offsets */
zval tmp;
@@ -23404,10 +22923,8 @@ str_index_prop:
if ((opline->extended_value & ZEND_ISSET) == 0) {
result = !result;
}
-
} else {
result = ((opline->extended_value & ZEND_ISSET) == 0);
-
}
ZVAL_BOOL(EX_VAR(opline->result.var), result);
@@ -23675,11 +23192,6 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_UNUSED_CONST(int
}
} else {
/* here we are sure we are dealing with an object */
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
-
- /* here property is a string */
if (opline->extended_value == ZEND_ASSIGN_OBJ
&& Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval *zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
@@ -23737,11 +23249,6 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_UNUSED_CONST(int
}
}
-//??? if (0) {
-//??? zval_ptr_dtor(property);
-//??? } else {
-
-//??? }
FREE_OP(free_op_data1);
}
@@ -24043,10 +23550,6 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_UNUSED_CONST(incde
/* here we are sure we are dealing with an object */
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
-
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval *zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
@@ -24090,11 +23593,6 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_UNUSED_CONST(incde
}
}
-//??? if (0) {
-//??? zval_ptr_dtor(property);
-//??? } else {
-
-//??? }
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
@@ -24141,10 +23639,6 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_UNUSED_CONST(incd
/* here we are sure we are dealing with an object */
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
-
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval *zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
@@ -24186,11 +23680,6 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_UNUSED_CONST(incd
}
}
-//??? if (0) {
-//??? zval_ptr_dtor(property);
-//??? } else {
-
-//??? }
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
@@ -24222,28 +23711,18 @@ static int ZEND_FASTCALL zend_fetch_property_address_read_helper_SPEC_UNUSED_CON
UNEXPECTED(Z_OBJ_HT_P(container)->read_property == NULL)) {
zend_error(E_NOTICE, "Trying to get property of non-object");
ZVAL_NULL(EX_VAR(opline->result.var));
-
} else {
zval *retval;
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(offset);
-//??? }
-
/* here we are sure we are dealing with an object */
retval = Z_OBJ_HT_P(container)->read_property(container, offset, BP_VAR_R, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL), EX_VAR(opline->result.var) TSRMLS_CC);
if (retval != EX_VAR(opline->result.var)) {
ZVAL_COPY(EX_VAR(opline->result.var), retval);
}
-
-//??? if (0) {
-//??? zval_ptr_dtor(offset);
-//??? } else {
-
-//??? }
}
+
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -24263,20 +23742,12 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_W_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE
SAVE_OPLINE();
property = opline->op2.zv;
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
container = _get_obj_zval_ptr_unused(TSRMLS_C);
if (IS_UNUSED == IS_VAR && UNEXPECTED(Z_TYPE_P(container) == IS_STR_OFFSET)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
zend_fetch_property_address(EX_VAR(opline->result.var), container, property, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_W, (opline->extended_value & ZEND_FETCH_MAKE_REF) != 0 TSRMLS_CC);
-//??? if (0) {
-//??? zval_ptr_dtor(property);
-//??? } else {
-
-//??? }
if (IS_UNUSED == IS_VAR && 0 && READY_TO_DESTROY(free_op1.var)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
@@ -24297,18 +23768,10 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_RW_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCOD
property = opline->op2.zv;
container = _get_obj_zval_ptr_unused(TSRMLS_C);
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
if (IS_UNUSED == IS_VAR && UNEXPECTED(Z_TYPE_P(container) == IS_STR_OFFSET)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
zend_fetch_property_address(EX_VAR(opline->result.var), container, property, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_RW, 0 TSRMLS_CC);
-//??? if (0) {
-//??? zval_ptr_dtor(property);
-//??? } else {
-
-//??? }
if (IS_UNUSED == IS_VAR && 0 && READY_TO_DESTROY(free_op1.var)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
@@ -24333,28 +23796,18 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCOD
if (UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT) ||
UNEXPECTED(Z_OBJ_HT_P(container)->read_property == NULL)) {
ZVAL_NULL(EX_VAR(opline->result.var));
-
} else {
zval *retval;
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(offset);
-//??? }
-
/* here we are sure we are dealing with an object */
retval = Z_OBJ_HT_P(container)->read_property(container, offset, BP_VAR_IS, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL), EX_VAR(opline->result.var) TSRMLS_CC);
if (retval != EX_VAR(opline->result.var)) {
ZVAL_COPY(EX_VAR(opline->result.var), retval);
}
-
-//??? if (0) {
-//??? zval_ptr_dtor(offset);
-//??? } else {
-
-//??? }
}
+
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -24373,18 +23826,10 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_UNUSED_CONST_HANDLER(ZEND
property = opline->op2.zv;
container = _get_obj_zval_ptr_unused(TSRMLS_C);
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
if (IS_UNUSED == IS_VAR && UNEXPECTED(Z_TYPE_P(container) == IS_STR_OFFSET)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
zend_fetch_property_address(EX_VAR(opline->result.var), container, property, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_W, 0 TSRMLS_CC);
-//??? if (0) {
-//??? zval_ptr_dtor(property);
-//??? } else {
-
-//??? }
if (IS_UNUSED == IS_VAR && 0 && READY_TO_DESTROY(free_op1.var)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
@@ -24407,18 +23852,10 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_UNSET_SPEC_UNUSED_CONST_HANDLER(ZEND_OP
container = _get_obj_zval_ptr_unused(TSRMLS_C);
property = opline->op2.zv;
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
if (IS_UNUSED == IS_VAR && UNEXPECTED(Z_TYPE_P(container) == IS_STR_OFFSET)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
zend_fetch_property_address(EX_VAR(opline->result.var), container, property, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_UNSET, 0 TSRMLS_CC);
-//??? if (0) {
-//??? zval_ptr_dtor(property);
-//??? } else {
-
-//??? }
if (IS_UNUSED == IS_VAR && 0 && READY_TO_DESTROY(free_op1.var)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
@@ -24439,18 +23876,11 @@ static int ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_
object = _get_obj_zval_ptr_unused(TSRMLS_C);
property_name = opline->op2.zv;
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(property_name);
-//??? }
if (IS_UNUSED == IS_VAR && UNEXPECTED(Z_TYPE_P(object) == IS_STR_OFFSET)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
}
zend_assign_to_object(RETURN_VALUE_USED(opline)?EX_VAR(opline->result.var):NULL, object, property_name, (opline+1)->op1_type, &(opline+1)->op1, execute_data, ZEND_ASSIGN_OBJ, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
-//??? if (0) {
-//??? zval_ptr_dtor(property_name);
-//??? } else {
-//??? }
/* assign_obj has two opcodes! */
CHECK_EXCEPTION();
@@ -24793,23 +24223,14 @@ static int ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_H
ZVAL_DEREF(container);
if (Z_TYPE_P(container) == IS_OBJECT) {
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(offset);
-//??? }
if (Z_OBJ_HT_P(container)->unset_property) {
Z_OBJ_HT_P(container)->unset_property(container, offset, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
} else {
zend_error(E_NOTICE, "Trying to unset property of non-object");
}
-//??? if (0) {
-//??? zval_ptr_dtor(offset);
-//??? } else {
-
-//??? }
- } else {
-
}
+
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -24871,11 +24292,7 @@ str_index_prop:
} else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
result = (value == NULL || !i_zend_is_true(value TSRMLS_CC));
}
-
} else if (Z_TYPE_P(container) == IS_OBJECT) {
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(offset);
-//??? }
if (prop_dim) {
if (Z_OBJ_HT_P(container)->has_property) {
result = Z_OBJ_HT_P(container)->has_property(container, offset, (opline->extended_value & ZEND_ISSET) == 0, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
@@ -24894,11 +24311,6 @@ str_index_prop:
if ((opline->extended_value & ZEND_ISSET) == 0) {
result = !result;
}
-//??? if (0) {
-//??? zval_ptr_dtor(offset);
-//??? } else {
-
-//??? }
} else if (Z_TYPE_P(container) == IS_STRING && !prop_dim) { /* string offsets */
zval tmp;
@@ -24923,10 +24335,8 @@ str_index_prop:
if ((opline->extended_value & ZEND_ISSET) == 0) {
result = !result;
}
-
} else {
result = ((opline->extended_value & ZEND_ISSET) == 0);
-
}
ZVAL_BOOL(EX_VAR(opline->result.var), result);
@@ -25111,11 +24521,6 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_UNUSED_TMP(int (*
}
} else {
/* here we are sure we are dealing with an object */
-//??? if (1) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
-
- /* here property is a string */
if (opline->extended_value == ZEND_ASSIGN_OBJ
&& Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval *zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
@@ -25173,11 +24578,7 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_UNUSED_TMP(int (*
}
}
-//??? if (1) {
-//??? zval_ptr_dtor(property);
-//??? } else {
- zval_dtor(free_op2.var);
-//??? }
+ zval_dtor(free_op2.var);
FREE_OP(free_op_data1);
}
@@ -25479,10 +24880,6 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_UNUSED_TMP(incdec_
/* here we are sure we are dealing with an object */
-//??? if (1) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
-
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval *zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
@@ -25526,11 +24923,7 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_UNUSED_TMP(incdec_
}
}
-//??? if (1) {
-//??? zval_ptr_dtor(property);
-//??? } else {
- zval_dtor(free_op2.var);
-//??? }
+ zval_dtor(free_op2.var);
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
@@ -25577,10 +24970,6 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_UNUSED_TMP(incdec
/* here we are sure we are dealing with an object */
-//??? if (1) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
-
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval *zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
@@ -25622,11 +25011,7 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_UNUSED_TMP(incdec
}
}
-//??? if (1) {
-//??? zval_ptr_dtor(property);
-//??? } else {
- zval_dtor(free_op2.var);
-//??? }
+ zval_dtor(free_op2.var);
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
@@ -25658,28 +25043,19 @@ static int ZEND_FASTCALL zend_fetch_property_address_read_helper_SPEC_UNUSED_TMP
UNEXPECTED(Z_OBJ_HT_P(container)->read_property == NULL)) {
zend_error(E_NOTICE, "Trying to get property of non-object");
ZVAL_NULL(EX_VAR(opline->result.var));
- zval_dtor(free_op2.var);
} else {
zval *retval;
-//??? if (1) {
-//??? MAKE_REAL_ZVAL_PTR(offset);
-//??? }
-
/* here we are sure we are dealing with an object */
retval = Z_OBJ_HT_P(container)->read_property(container, offset, BP_VAR_R, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL), EX_VAR(opline->result.var) TSRMLS_CC);
if (retval != EX_VAR(opline->result.var)) {
ZVAL_COPY(EX_VAR(opline->result.var), retval);
}
-
-//??? if (1) {
-//??? zval_ptr_dtor(offset);
-//??? } else {
- zval_dtor(free_op2.var);
-//??? }
}
+ zval_dtor(free_op2.var);
+
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -25699,21 +25075,13 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_W_SPEC_UNUSED_TMP_HANDLER(ZEND_OPCODE_H
SAVE_OPLINE();
property = _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC);
-//??? if (1) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
container = _get_obj_zval_ptr_unused(TSRMLS_C);
if (IS_UNUSED == IS_VAR && UNEXPECTED(Z_TYPE_P(container) == IS_STR_OFFSET)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
zend_fetch_property_address(EX_VAR(opline->result.var), container, property, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_W, (opline->extended_value & ZEND_FETCH_MAKE_REF) != 0 TSRMLS_CC);
-//??? if (1) {
-//??? zval_ptr_dtor(property);
-//??? } else {
- zval_dtor(free_op2.var);
-//??? }
-
+ zval_dtor(free_op2.var);
if (IS_UNUSED == IS_VAR && 0 && READY_TO_DESTROY(free_op1.var)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
@@ -25733,19 +25101,11 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_RW_SPEC_UNUSED_TMP_HANDLER(ZEND_OPCODE_
property = _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC);
container = _get_obj_zval_ptr_unused(TSRMLS_C);
-//??? if (1) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
if (IS_UNUSED == IS_VAR && UNEXPECTED(Z_TYPE_P(container) == IS_STR_OFFSET)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
zend_fetch_property_address(EX_VAR(opline->result.var), container, property, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_RW, 0 TSRMLS_CC);
-//??? if (1) {
-//??? zval_ptr_dtor(property);
-//??? } else {
- zval_dtor(free_op2.var);
-//??? }
-
+ zval_dtor(free_op2.var);
if (IS_UNUSED == IS_VAR && 0 && READY_TO_DESTROY(free_op1.var)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
@@ -25769,28 +25129,19 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC_UNUSED_TMP_HANDLER(ZEND_OPCODE_
if (UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT) ||
UNEXPECTED(Z_OBJ_HT_P(container)->read_property == NULL)) {
ZVAL_NULL(EX_VAR(opline->result.var));
- zval_dtor(free_op2.var);
} else {
zval *retval;
-//??? if (1) {
-//??? MAKE_REAL_ZVAL_PTR(offset);
-//??? }
-
/* here we are sure we are dealing with an object */
retval = Z_OBJ_HT_P(container)->read_property(container, offset, BP_VAR_IS, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL), EX_VAR(opline->result.var) TSRMLS_CC);
if (retval != EX_VAR(opline->result.var)) {
ZVAL_COPY(EX_VAR(opline->result.var), retval);
}
-
-//??? if (1) {
-//??? zval_ptr_dtor(offset);
-//??? } else {
- zval_dtor(free_op2.var);
-//??? }
}
+ zval_dtor(free_op2.var);
+
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -25809,19 +25160,11 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_UNUSED_TMP_HANDLER(ZEND_O
property = _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC);
container = _get_obj_zval_ptr_unused(TSRMLS_C);
-//??? if (1) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
if (IS_UNUSED == IS_VAR && UNEXPECTED(Z_TYPE_P(container) == IS_STR_OFFSET)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
zend_fetch_property_address(EX_VAR(opline->result.var), container, property, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_W, 0 TSRMLS_CC);
-//??? if (1) {
-//??? zval_ptr_dtor(property);
-//??? } else {
- zval_dtor(free_op2.var);
-//??? }
-
+ zval_dtor(free_op2.var);
if (IS_UNUSED == IS_VAR && 0 && READY_TO_DESTROY(free_op1.var)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
@@ -25843,19 +25186,11 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_UNSET_SPEC_UNUSED_TMP_HANDLER(ZEND_OPCO
container = _get_obj_zval_ptr_unused(TSRMLS_C);
property = _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC);
-//??? if (1) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
if (IS_UNUSED == IS_VAR && UNEXPECTED(Z_TYPE_P(container) == IS_STR_OFFSET)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
zend_fetch_property_address(EX_VAR(opline->result.var), container, property, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_UNSET, 0 TSRMLS_CC);
-//??? if (1) {
-//??? zval_ptr_dtor(property);
-//??? } else {
- zval_dtor(free_op2.var);
-//??? }
-
+ zval_dtor(free_op2.var);
if (IS_UNUSED == IS_VAR && 0 && READY_TO_DESTROY(free_op1.var)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
@@ -25875,18 +25210,11 @@ static int ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_TMP_HANDLER(ZEND_OPCODE_HA
object = _get_obj_zval_ptr_unused(TSRMLS_C);
property_name = _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC);
-//??? if (1) {
-//??? MAKE_REAL_ZVAL_PTR(property_name);
-//??? }
if (IS_UNUSED == IS_VAR && UNEXPECTED(Z_TYPE_P(object) == IS_STR_OFFSET)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
}
zend_assign_to_object(RETURN_VALUE_USED(opline)?EX_VAR(opline->result.var):NULL, object, property_name, (opline+1)->op1_type, &(opline+1)->op1, execute_data, ZEND_ASSIGN_OBJ, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
-//??? if (1) {
-//??? zval_ptr_dtor(property_name);
-//??? } else {
- zval_dtor(free_op2.var);
-//??? }
+ zval_dtor(free_op2.var);
/* assign_obj has two opcodes! */
CHECK_EXCEPTION();
@@ -26140,22 +25468,13 @@ static int ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_UNUSED_TMP_HANDLER(ZEND_OPCODE_HAN
ZVAL_DEREF(container);
if (Z_TYPE_P(container) == IS_OBJECT) {
-//??? if (1) {
-//??? MAKE_REAL_ZVAL_PTR(offset);
-//??? }
if (Z_OBJ_HT_P(container)->unset_property) {
Z_OBJ_HT_P(container)->unset_property(container, offset, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
} else {
zend_error(E_NOTICE, "Trying to unset property of non-object");
}
-//??? if (1) {
-//??? zval_ptr_dtor(offset);
-//??? } else {
- zval_dtor(free_op2.var);
-//??? }
- } else {
- zval_dtor(free_op2.var);
}
+ zval_dtor(free_op2.var);
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
@@ -26218,11 +25537,7 @@ str_index_prop:
} else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
result = (value == NULL || !i_zend_is_true(value TSRMLS_CC));
}
- zval_dtor(free_op2.var);
} else if (Z_TYPE_P(container) == IS_OBJECT) {
-//??? if (1) {
-//??? MAKE_REAL_ZVAL_PTR(offset);
-//??? }
if (prop_dim) {
if (Z_OBJ_HT_P(container)->has_property) {
result = Z_OBJ_HT_P(container)->has_property(container, offset, (opline->extended_value & ZEND_ISSET) == 0, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
@@ -26241,11 +25556,6 @@ str_index_prop:
if ((opline->extended_value & ZEND_ISSET) == 0) {
result = !result;
}
-//??? if (1) {
-//??? zval_ptr_dtor(offset);
-//??? } else {
- zval_dtor(free_op2.var);
-//??? }
} else if (Z_TYPE_P(container) == IS_STRING && !prop_dim) { /* string offsets */
zval tmp;
@@ -26270,12 +25580,11 @@ str_index_prop:
if ((opline->extended_value & ZEND_ISSET) == 0) {
result = !result;
}
- zval_dtor(free_op2.var);
} else {
result = ((opline->extended_value & ZEND_ISSET) == 0);
- zval_dtor(free_op2.var);
}
+ zval_dtor(free_op2.var);
ZVAL_BOOL(EX_VAR(opline->result.var), result);
CHECK_EXCEPTION();
@@ -26458,11 +25767,6 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_UNUSED_VAR(int (*
}
} else {
/* here we are sure we are dealing with an object */
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
-
- /* here property is a string */
if (opline->extended_value == ZEND_ASSIGN_OBJ
&& Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval *zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
@@ -26520,11 +25824,7 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_UNUSED_VAR(int (*
}
}
-//??? if (0) {
-//??? zval_ptr_dtor(property);
-//??? } else {
- zval_ptr_dtor_nogc(free_op2.var);
-//??? }
+ zval_ptr_dtor_nogc(free_op2.var);
FREE_OP(free_op_data1);
}
@@ -26826,10 +26126,6 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_UNUSED_VAR(incdec_
/* here we are sure we are dealing with an object */
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
-
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval *zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
@@ -26873,11 +26169,7 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_UNUSED_VAR(incdec_
}
}
-//??? if (0) {
-//??? zval_ptr_dtor(property);
-//??? } else {
- zval_ptr_dtor_nogc(free_op2.var);
-//??? }
+ zval_ptr_dtor_nogc(free_op2.var);
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
@@ -26924,10 +26216,6 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_UNUSED_VAR(incdec
/* here we are sure we are dealing with an object */
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
-
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval *zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
@@ -26969,11 +26257,7 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_UNUSED_VAR(incdec
}
}
-//??? if (0) {
-//??? zval_ptr_dtor(property);
-//??? } else {
- zval_ptr_dtor_nogc(free_op2.var);
-//??? }
+ zval_ptr_dtor_nogc(free_op2.var);
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
@@ -27005,28 +26289,19 @@ static int ZEND_FASTCALL zend_fetch_property_address_read_helper_SPEC_UNUSED_VAR
UNEXPECTED(Z_OBJ_HT_P(container)->read_property == NULL)) {
zend_error(E_NOTICE, "Trying to get property of non-object");
ZVAL_NULL(EX_VAR(opline->result.var));
- zval_ptr_dtor_nogc(free_op2.var);
} else {
zval *retval;
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(offset);
-//??? }
-
/* here we are sure we are dealing with an object */
retval = Z_OBJ_HT_P(container)->read_property(container, offset, BP_VAR_R, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL), EX_VAR(opline->result.var) TSRMLS_CC);
if (retval != EX_VAR(opline->result.var)) {
ZVAL_COPY(EX_VAR(opline->result.var), retval);
}
-
-//??? if (0) {
-//??? zval_ptr_dtor(offset);
-//??? } else {
- zval_ptr_dtor_nogc(free_op2.var);
-//??? }
}
+ zval_ptr_dtor_nogc(free_op2.var);
+
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -27046,21 +26321,13 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_W_SPEC_UNUSED_VAR_HANDLER(ZEND_OPCODE_H
SAVE_OPLINE();
property = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2 TSRMLS_CC);
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
container = _get_obj_zval_ptr_unused(TSRMLS_C);
if (IS_UNUSED == IS_VAR && UNEXPECTED(Z_TYPE_P(container) == IS_STR_OFFSET)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
zend_fetch_property_address(EX_VAR(opline->result.var), container, property, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_W, (opline->extended_value & ZEND_FETCH_MAKE_REF) != 0 TSRMLS_CC);
-//??? if (0) {
-//??? zval_ptr_dtor(property);
-//??? } else {
- zval_ptr_dtor_nogc(free_op2.var);
-//??? }
-
+ zval_ptr_dtor_nogc(free_op2.var);
if (IS_UNUSED == IS_VAR && 0 && READY_TO_DESTROY(free_op1.var)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
@@ -27080,19 +26347,11 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_RW_SPEC_UNUSED_VAR_HANDLER(ZEND_OPCODE_
property = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2 TSRMLS_CC);
container = _get_obj_zval_ptr_unused(TSRMLS_C);
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
if (IS_UNUSED == IS_VAR && UNEXPECTED(Z_TYPE_P(container) == IS_STR_OFFSET)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
zend_fetch_property_address(EX_VAR(opline->result.var), container, property, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_RW, 0 TSRMLS_CC);
-//??? if (0) {
-//??? zval_ptr_dtor(property);
-//??? } else {
- zval_ptr_dtor_nogc(free_op2.var);
-//??? }
-
+ zval_ptr_dtor_nogc(free_op2.var);
if (IS_UNUSED == IS_VAR && 0 && READY_TO_DESTROY(free_op1.var)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
@@ -27116,28 +26375,19 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC_UNUSED_VAR_HANDLER(ZEND_OPCODE_
if (UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT) ||
UNEXPECTED(Z_OBJ_HT_P(container)->read_property == NULL)) {
ZVAL_NULL(EX_VAR(opline->result.var));
- zval_ptr_dtor_nogc(free_op2.var);
} else {
zval *retval;
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(offset);
-//??? }
-
/* here we are sure we are dealing with an object */
retval = Z_OBJ_HT_P(container)->read_property(container, offset, BP_VAR_IS, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL), EX_VAR(opline->result.var) TSRMLS_CC);
if (retval != EX_VAR(opline->result.var)) {
ZVAL_COPY(EX_VAR(opline->result.var), retval);
}
-
-//??? if (0) {
-//??? zval_ptr_dtor(offset);
-//??? } else {
- zval_ptr_dtor_nogc(free_op2.var);
-//??? }
}
+ zval_ptr_dtor_nogc(free_op2.var);
+
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -27156,19 +26406,11 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_UNUSED_VAR_HANDLER(ZEND_O
property = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2 TSRMLS_CC);
container = _get_obj_zval_ptr_unused(TSRMLS_C);
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
if (IS_UNUSED == IS_VAR && UNEXPECTED(Z_TYPE_P(container) == IS_STR_OFFSET)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
zend_fetch_property_address(EX_VAR(opline->result.var), container, property, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_W, 0 TSRMLS_CC);
-//??? if (0) {
-//??? zval_ptr_dtor(property);
-//??? } else {
- zval_ptr_dtor_nogc(free_op2.var);
-//??? }
-
+ zval_ptr_dtor_nogc(free_op2.var);
if (IS_UNUSED == IS_VAR && 0 && READY_TO_DESTROY(free_op1.var)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
@@ -27190,19 +26432,11 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_UNSET_SPEC_UNUSED_VAR_HANDLER(ZEND_OPCO
container = _get_obj_zval_ptr_unused(TSRMLS_C);
property = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2 TSRMLS_CC);
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
if (IS_UNUSED == IS_VAR && UNEXPECTED(Z_TYPE_P(container) == IS_STR_OFFSET)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
zend_fetch_property_address(EX_VAR(opline->result.var), container, property, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_UNSET, 0 TSRMLS_CC);
-//??? if (0) {
-//??? zval_ptr_dtor(property);
-//??? } else {
- zval_ptr_dtor_nogc(free_op2.var);
-//??? }
-
+ zval_ptr_dtor_nogc(free_op2.var);
if (IS_UNUSED == IS_VAR && 0 && READY_TO_DESTROY(free_op1.var)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
@@ -27222,18 +26456,11 @@ static int ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_VAR_HANDLER(ZEND_OPCODE_HA
object = _get_obj_zval_ptr_unused(TSRMLS_C);
property_name = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2 TSRMLS_CC);
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(property_name);
-//??? }
if (IS_UNUSED == IS_VAR && UNEXPECTED(Z_TYPE_P(object) == IS_STR_OFFSET)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
}
zend_assign_to_object(RETURN_VALUE_USED(opline)?EX_VAR(opline->result.var):NULL, object, property_name, (opline+1)->op1_type, &(opline+1)->op1, execute_data, ZEND_ASSIGN_OBJ, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
-//??? if (0) {
-//??? zval_ptr_dtor(property_name);
-//??? } else {
- zval_ptr_dtor_nogc(free_op2.var);
-//??? }
+ zval_ptr_dtor_nogc(free_op2.var);
/* assign_obj has two opcodes! */
CHECK_EXCEPTION();
@@ -27487,22 +26714,13 @@ static int ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_UNUSED_VAR_HANDLER(ZEND_OPCODE_HAN
ZVAL_DEREF(container);
if (Z_TYPE_P(container) == IS_OBJECT) {
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(offset);
-//??? }
if (Z_OBJ_HT_P(container)->unset_property) {
Z_OBJ_HT_P(container)->unset_property(container, offset, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
} else {
zend_error(E_NOTICE, "Trying to unset property of non-object");
}
-//??? if (0) {
-//??? zval_ptr_dtor(offset);
-//??? } else {
- zval_ptr_dtor_nogc(free_op2.var);
-//??? }
- } else {
- zval_ptr_dtor_nogc(free_op2.var);
}
+ zval_ptr_dtor_nogc(free_op2.var);
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
@@ -27565,11 +26783,7 @@ str_index_prop:
} else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
result = (value == NULL || !i_zend_is_true(value TSRMLS_CC));
}
- zval_ptr_dtor_nogc(free_op2.var);
} else if (Z_TYPE_P(container) == IS_OBJECT) {
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(offset);
-//??? }
if (prop_dim) {
if (Z_OBJ_HT_P(container)->has_property) {
result = Z_OBJ_HT_P(container)->has_property(container, offset, (opline->extended_value & ZEND_ISSET) == 0, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
@@ -27588,11 +26802,6 @@ str_index_prop:
if ((opline->extended_value & ZEND_ISSET) == 0) {
result = !result;
}
-//??? if (0) {
-//??? zval_ptr_dtor(offset);
-//??? } else {
- zval_ptr_dtor_nogc(free_op2.var);
-//??? }
} else if (Z_TYPE_P(container) == IS_STRING && !prop_dim) { /* string offsets */
zval tmp;
@@ -27617,12 +26826,11 @@ str_index_prop:
if ((opline->extended_value & ZEND_ISSET) == 0) {
result = !result;
}
- zval_ptr_dtor_nogc(free_op2.var);
} else {
result = ((opline->extended_value & ZEND_ISSET) == 0);
- zval_ptr_dtor_nogc(free_op2.var);
}
+ zval_ptr_dtor_nogc(free_op2.var);
ZVAL_BOOL(EX_VAR(opline->result.var), result);
CHECK_EXCEPTION();
@@ -27806,11 +27014,6 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_UNUSED_UNUSED(int
}
} else {
/* here we are sure we are dealing with an object */
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
-
- /* here property is a string */
if (opline->extended_value == ZEND_ASSIGN_OBJ
&& Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval *zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_UNUSED == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
@@ -27868,11 +27071,6 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_UNUSED_UNUSED(int
}
}
-//??? if (0) {
-//??? zval_ptr_dtor(property);
-//??? } else {
-
-//??? }
FREE_OP(free_op_data1);
}
@@ -28321,11 +27519,6 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_UNUSED_CV(int (*b
}
} else {
/* here we are sure we are dealing with an object */
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
-
- /* here property is a string */
if (opline->extended_value == ZEND_ASSIGN_OBJ
&& Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval *zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
@@ -28383,11 +27576,6 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_UNUSED_CV(int (*b
}
}
-//??? if (0) {
-//??? zval_ptr_dtor(property);
-//??? } else {
-
-//??? }
FREE_OP(free_op_data1);
}
@@ -28689,10 +27877,6 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_UNUSED_CV(incdec_t
/* here we are sure we are dealing with an object */
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
-
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval *zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
@@ -28736,11 +27920,6 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_UNUSED_CV(incdec_t
}
}
-//??? if (0) {
-//??? zval_ptr_dtor(property);
-//??? } else {
-
-//??? }
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
@@ -28787,10 +27966,6 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_UNUSED_CV(incdec_
/* here we are sure we are dealing with an object */
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
-
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval *zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
@@ -28832,11 +28007,6 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_UNUSED_CV(incdec_
}
}
-//??? if (0) {
-//??? zval_ptr_dtor(property);
-//??? } else {
-
-//??? }
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
@@ -28868,28 +28038,18 @@ static int ZEND_FASTCALL zend_fetch_property_address_read_helper_SPEC_UNUSED_CV(
UNEXPECTED(Z_OBJ_HT_P(container)->read_property == NULL)) {
zend_error(E_NOTICE, "Trying to get property of non-object");
ZVAL_NULL(EX_VAR(opline->result.var));
-
} else {
zval *retval;
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(offset);
-//??? }
-
/* here we are sure we are dealing with an object */
retval = Z_OBJ_HT_P(container)->read_property(container, offset, BP_VAR_R, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL), EX_VAR(opline->result.var) TSRMLS_CC);
if (retval != EX_VAR(opline->result.var)) {
ZVAL_COPY(EX_VAR(opline->result.var), retval);
}
-
-//??? if (0) {
-//??? zval_ptr_dtor(offset);
-//??? } else {
-
-//??? }
}
+
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -28909,20 +28069,12 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_W_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HA
SAVE_OPLINE();
property = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC);
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
container = _get_obj_zval_ptr_unused(TSRMLS_C);
if (IS_UNUSED == IS_VAR && UNEXPECTED(Z_TYPE_P(container) == IS_STR_OFFSET)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
zend_fetch_property_address(EX_VAR(opline->result.var), container, property, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_W, (opline->extended_value & ZEND_FETCH_MAKE_REF) != 0 TSRMLS_CC);
-//??? if (0) {
-//??? zval_ptr_dtor(property);
-//??? } else {
-
-//??? }
if (IS_UNUSED == IS_VAR && 0 && READY_TO_DESTROY(free_op1.var)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
@@ -28943,18 +28095,10 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_RW_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_H
property = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC);
container = _get_obj_zval_ptr_unused(TSRMLS_C);
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
if (IS_UNUSED == IS_VAR && UNEXPECTED(Z_TYPE_P(container) == IS_STR_OFFSET)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
zend_fetch_property_address(EX_VAR(opline->result.var), container, property, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_RW, 0 TSRMLS_CC);
-//??? if (0) {
-//??? zval_ptr_dtor(property);
-//??? } else {
-
-//??? }
if (IS_UNUSED == IS_VAR && 0 && READY_TO_DESTROY(free_op1.var)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
@@ -28979,28 +28123,18 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_H
if (UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT) ||
UNEXPECTED(Z_OBJ_HT_P(container)->read_property == NULL)) {
ZVAL_NULL(EX_VAR(opline->result.var));
-
} else {
zval *retval;
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(offset);
-//??? }
-
/* here we are sure we are dealing with an object */
retval = Z_OBJ_HT_P(container)->read_property(container, offset, BP_VAR_IS, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL), EX_VAR(opline->result.var) TSRMLS_CC);
if (retval != EX_VAR(opline->result.var)) {
ZVAL_COPY(EX_VAR(opline->result.var), retval);
}
-
-//??? if (0) {
-//??? zval_ptr_dtor(offset);
-//??? } else {
-
-//??? }
}
+
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -29019,18 +28153,10 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_UNUSED_CV_HANDLER(ZEND_OP
property = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC);
container = _get_obj_zval_ptr_unused(TSRMLS_C);
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
if (IS_UNUSED == IS_VAR && UNEXPECTED(Z_TYPE_P(container) == IS_STR_OFFSET)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
zend_fetch_property_address(EX_VAR(opline->result.var), container, property, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_W, 0 TSRMLS_CC);
-//??? if (0) {
-//??? zval_ptr_dtor(property);
-//??? } else {
-
-//??? }
if (IS_UNUSED == IS_VAR && 0 && READY_TO_DESTROY(free_op1.var)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
@@ -29053,18 +28179,10 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_UNSET_SPEC_UNUSED_CV_HANDLER(ZEND_OPCOD
container = _get_obj_zval_ptr_unused(TSRMLS_C);
property = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC);
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
if (IS_UNUSED == IS_VAR && UNEXPECTED(Z_TYPE_P(container) == IS_STR_OFFSET)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
zend_fetch_property_address(EX_VAR(opline->result.var), container, property, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_UNSET, 0 TSRMLS_CC);
-//??? if (0) {
-//??? zval_ptr_dtor(property);
-//??? } else {
-
-//??? }
if (IS_UNUSED == IS_VAR && 0 && READY_TO_DESTROY(free_op1.var)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
@@ -29085,18 +28203,11 @@ static int ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HAN
object = _get_obj_zval_ptr_unused(TSRMLS_C);
property_name = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC);
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(property_name);
-//??? }
if (IS_UNUSED == IS_VAR && UNEXPECTED(Z_TYPE_P(object) == IS_STR_OFFSET)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
}
zend_assign_to_object(RETURN_VALUE_USED(opline)?EX_VAR(opline->result.var):NULL, object, property_name, (opline+1)->op1_type, &(opline+1)->op1, execute_data, ZEND_ASSIGN_OBJ, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
-//??? if (0) {
-//??? zval_ptr_dtor(property_name);
-//??? } else {
-//??? }
/* assign_obj has two opcodes! */
CHECK_EXCEPTION();
@@ -29348,23 +28459,14 @@ static int ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HAND
ZVAL_DEREF(container);
if (Z_TYPE_P(container) == IS_OBJECT) {
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(offset);
-//??? }
if (Z_OBJ_HT_P(container)->unset_property) {
Z_OBJ_HT_P(container)->unset_property(container, offset, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
} else {
zend_error(E_NOTICE, "Trying to unset property of non-object");
}
-//??? if (0) {
-//??? zval_ptr_dtor(offset);
-//??? } else {
-
-//??? }
- } else {
-
}
+
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -29426,11 +28528,7 @@ str_index_prop:
} else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
result = (value == NULL || !i_zend_is_true(value TSRMLS_CC));
}
-
} else if (Z_TYPE_P(container) == IS_OBJECT) {
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(offset);
-//??? }
if (prop_dim) {
if (Z_OBJ_HT_P(container)->has_property) {
result = Z_OBJ_HT_P(container)->has_property(container, offset, (opline->extended_value & ZEND_ISSET) == 0, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
@@ -29449,11 +28547,6 @@ str_index_prop:
if ((opline->extended_value & ZEND_ISSET) == 0) {
result = !result;
}
-//??? if (0) {
-//??? zval_ptr_dtor(offset);
-//??? } else {
-
-//??? }
} else if (Z_TYPE_P(container) == IS_STRING && !prop_dim) { /* string offsets */
zval tmp;
@@ -29478,10 +28571,8 @@ str_index_prop:
if ((opline->extended_value & ZEND_ISSET) == 0) {
result = !result;
}
-
} else {
result = ((opline->extended_value & ZEND_ISSET) == 0);
-
}
ZVAL_BOOL(EX_VAR(opline->result.var), result);
@@ -30640,12 +29731,9 @@ static int ZEND_FASTCALL ZEND_FE_RESET_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS
ZVAL_DUP(&tmp, array_ref);
array_ptr = array_ref = &tmp;
} else if (IS_CV == IS_CV) {
-//??? dereference
- if (Z_ISREF_P(array_ref)) {
- if (Z_REFCOUNT_P(array_ref) == 1) {
- ZVAL_UNREF(array_ref);
- array_ptr = array_ref;
- }
+ if (Z_ISREF_P(array_ref) && Z_REFCOUNT_P(array_ref) == 1) {
+ ZVAL_UNREF(array_ref);
+ array_ptr = array_ref;
}
Z_ADDREF_P(array_ref);
}
@@ -31172,11 +30260,6 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_CV_CONST(int (*bi
}
} else {
/* here we are sure we are dealing with an object */
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
-
- /* here property is a string */
if (opline->extended_value == ZEND_ASSIGN_OBJ
&& Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval *zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
@@ -31234,11 +30317,6 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_CV_CONST(int (*bi
}
}
-//??? if (0) {
-//??? zval_ptr_dtor(property);
-//??? } else {
-
-//??? }
FREE_OP(free_op_data1);
}
@@ -31540,10 +30618,6 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_CV_CONST(incdec_t
/* here we are sure we are dealing with an object */
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
-
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval *zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
@@ -31587,11 +30661,6 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_CV_CONST(incdec_t
}
}
-//??? if (0) {
-//??? zval_ptr_dtor(property);
-//??? } else {
-
-//??? }
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
@@ -31638,10 +30707,6 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_CV_CONST(incdec_t
/* here we are sure we are dealing with an object */
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
-
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval *zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
@@ -31683,11 +30748,6 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_CV_CONST(incdec_t
}
}
-//??? if (0) {
-//??? zval_ptr_dtor(property);
-//??? } else {
-
-//??? }
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
@@ -32000,28 +31060,18 @@ static int ZEND_FASTCALL zend_fetch_property_address_read_helper_SPEC_CV_CONST(Z
UNEXPECTED(Z_OBJ_HT_P(container)->read_property == NULL)) {
zend_error(E_NOTICE, "Trying to get property of non-object");
ZVAL_NULL(EX_VAR(opline->result.var));
-
} else {
zval *retval;
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(offset);
-//??? }
-
/* here we are sure we are dealing with an object */
retval = Z_OBJ_HT_P(container)->read_property(container, offset, BP_VAR_R, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL), EX_VAR(opline->result.var) TSRMLS_CC);
if (retval != EX_VAR(opline->result.var)) {
ZVAL_COPY(EX_VAR(opline->result.var), retval);
}
-
-//??? if (0) {
-//??? zval_ptr_dtor(offset);
-//??? } else {
-
-//??? }
}
+
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -32041,20 +31091,12 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_W_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HAN
SAVE_OPLINE();
property = opline->op2.zv;
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
container = _get_zval_ptr_cv_BP_VAR_W(execute_data, opline->op1.var TSRMLS_CC);
if (IS_CV == IS_VAR && UNEXPECTED(Z_TYPE_P(container) == IS_STR_OFFSET)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
zend_fetch_property_address(EX_VAR(opline->result.var), container, property, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_W, (opline->extended_value & ZEND_FETCH_MAKE_REF) != 0 TSRMLS_CC);
-//??? if (0) {
-//??? zval_ptr_dtor(property);
-//??? } else {
-
-//??? }
if (IS_CV == IS_VAR && 0 && READY_TO_DESTROY(free_op1.var)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
@@ -32075,18 +31117,10 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_RW_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HA
property = opline->op2.zv;
container = _get_zval_ptr_cv_BP_VAR_RW(execute_data, opline->op1.var TSRMLS_CC);
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
if (IS_CV == IS_VAR && UNEXPECTED(Z_TYPE_P(container) == IS_STR_OFFSET)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
zend_fetch_property_address(EX_VAR(opline->result.var), container, property, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_RW, 0 TSRMLS_CC);
-//??? if (0) {
-//??? zval_ptr_dtor(property);
-//??? } else {
-
-//??? }
if (IS_CV == IS_VAR && 0 && READY_TO_DESTROY(free_op1.var)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
@@ -32111,28 +31145,18 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HA
if (UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT) ||
UNEXPECTED(Z_OBJ_HT_P(container)->read_property == NULL)) {
ZVAL_NULL(EX_VAR(opline->result.var));
-
} else {
zval *retval;
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(offset);
-//??? }
-
/* here we are sure we are dealing with an object */
retval = Z_OBJ_HT_P(container)->read_property(container, offset, BP_VAR_IS, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL), EX_VAR(opline->result.var) TSRMLS_CC);
if (retval != EX_VAR(opline->result.var)) {
ZVAL_COPY(EX_VAR(opline->result.var), retval);
}
-
-//??? if (0) {
-//??? zval_ptr_dtor(offset);
-//??? } else {
-
-//??? }
}
+
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -32151,18 +31175,10 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_CV_CONST_HANDLER(ZEND_OPC
property = opline->op2.zv;
container = _get_zval_ptr_cv_BP_VAR_W(execute_data, opline->op1.var TSRMLS_CC);
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
if (IS_CV == IS_VAR && UNEXPECTED(Z_TYPE_P(container) == IS_STR_OFFSET)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
zend_fetch_property_address(EX_VAR(opline->result.var), container, property, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_W, 0 TSRMLS_CC);
-//??? if (0) {
-//??? zval_ptr_dtor(property);
-//??? } else {
-
-//??? }
if (IS_CV == IS_VAR && 0 && READY_TO_DESTROY(free_op1.var)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
@@ -32185,18 +31201,10 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_UNSET_SPEC_CV_CONST_HANDLER(ZEND_OPCODE
container = _get_zval_ptr_cv_BP_VAR_UNSET(execute_data, opline->op1.var TSRMLS_CC);
property = opline->op2.zv;
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
if (IS_CV == IS_VAR && UNEXPECTED(Z_TYPE_P(container) == IS_STR_OFFSET)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
zend_fetch_property_address(EX_VAR(opline->result.var), container, property, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_UNSET, 0 TSRMLS_CC);
-//??? if (0) {
-//??? zval_ptr_dtor(property);
-//??? } else {
-
-//??? }
if (IS_CV == IS_VAR && 0 && READY_TO_DESTROY(free_op1.var)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
@@ -32217,18 +31225,11 @@ static int ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HAND
object = _get_zval_ptr_cv_BP_VAR_W(execute_data, opline->op1.var TSRMLS_CC);
property_name = opline->op2.zv;
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(property_name);
-//??? }
if (IS_CV == IS_VAR && UNEXPECTED(Z_TYPE_P(object) == IS_STR_OFFSET)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
}
zend_assign_to_object(RETURN_VALUE_USED(opline)?EX_VAR(opline->result.var):NULL, object, property_name, (opline+1)->op1_type, &(opline+1)->op1, execute_data, ZEND_ASSIGN_OBJ, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
-//??? if (0) {
-//??? zval_ptr_dtor(property_name);
-//??? } else {
-//??? }
/* assign_obj has two opcodes! */
CHECK_EXCEPTION();
@@ -32255,15 +31256,8 @@ static int ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HAND
zval *property_name = opline->op2.zv;
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(property_name);
-//??? }
zend_assign_to_object(RETURN_VALUE_USED(opline)?EX_VAR(opline->result.var):NULL, object_ptr, property_name, (opline+1)->op1_type, &(opline+1)->op1, execute_data, ZEND_ASSIGN_DIM, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
-//??? if (0) {
-//??? zval_ptr_dtor(property_name);
-//??? } else {
-//??? }
} else {
zend_free_op free_op_data1, free_op_data2;
zval *value;
@@ -32711,23 +31705,14 @@ static int ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDL
ZVAL_DEREF(container);
if (Z_TYPE_P(container) == IS_OBJECT) {
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(offset);
-//??? }
if (Z_OBJ_HT_P(container)->unset_property) {
Z_OBJ_HT_P(container)->unset_property(container, offset, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
} else {
zend_error(E_NOTICE, "Trying to unset property of non-object");
}
-//??? if (0) {
-//??? zval_ptr_dtor(offset);
-//??? } else {
-
-//??? }
- } else {
-
}
+
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -32868,11 +31853,7 @@ str_index_prop:
} else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
result = (value == NULL || !i_zend_is_true(value TSRMLS_CC));
}
-
} else if (Z_TYPE_P(container) == IS_OBJECT) {
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(offset);
-//??? }
if (prop_dim) {
if (Z_OBJ_HT_P(container)->has_property) {
result = Z_OBJ_HT_P(container)->has_property(container, offset, (opline->extended_value & ZEND_ISSET) == 0, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
@@ -32891,11 +31872,6 @@ str_index_prop:
if ((opline->extended_value & ZEND_ISSET) == 0) {
result = !result;
}
-//??? if (0) {
-//??? zval_ptr_dtor(offset);
-//??? } else {
-
-//??? }
} else if (Z_TYPE_P(container) == IS_STRING && !prop_dim) { /* string offsets */
zval tmp;
@@ -32920,10 +31896,8 @@ str_index_prop:
if ((opline->extended_value & ZEND_ISSET) == 0) {
result = !result;
}
-
} else {
result = ((opline->extended_value & ZEND_ISSET) == 0);
-
}
ZVAL_BOOL(EX_VAR(opline->result.var), result);
@@ -33384,11 +32358,6 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_CV_TMP(int (*bina
}
} else {
/* here we are sure we are dealing with an object */
-//??? if (1) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
-
- /* here property is a string */
if (opline->extended_value == ZEND_ASSIGN_OBJ
&& Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval *zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
@@ -33446,11 +32415,7 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_CV_TMP(int (*bina
}
}
-//??? if (1) {
-//??? zval_ptr_dtor(property);
-//??? } else {
- zval_dtor(free_op2.var);
-//??? }
+ zval_dtor(free_op2.var);
FREE_OP(free_op_data1);
}
@@ -33752,10 +32717,6 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_CV_TMP(incdec_t in
/* here we are sure we are dealing with an object */
-//??? if (1) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
-
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval *zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
@@ -33799,11 +32760,7 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_CV_TMP(incdec_t in
}
}
-//??? if (1) {
-//??? zval_ptr_dtor(property);
-//??? } else {
- zval_dtor(free_op2.var);
-//??? }
+ zval_dtor(free_op2.var);
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
@@ -33850,10 +32807,6 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_CV_TMP(incdec_t i
/* here we are sure we are dealing with an object */
-//??? if (1) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
-
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval *zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
@@ -33895,11 +32848,7 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_CV_TMP(incdec_t i
}
}
-//??? if (1) {
-//??? zval_ptr_dtor(property);
-//??? } else {
- zval_dtor(free_op2.var);
-//??? }
+ zval_dtor(free_op2.var);
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
@@ -34065,28 +33014,19 @@ static int ZEND_FASTCALL zend_fetch_property_address_read_helper_SPEC_CV_TMP(ZEN
UNEXPECTED(Z_OBJ_HT_P(container)->read_property == NULL)) {
zend_error(E_NOTICE, "Trying to get property of non-object");
ZVAL_NULL(EX_VAR(opline->result.var));
- zval_dtor(free_op2.var);
} else {
zval *retval;
-//??? if (1) {
-//??? MAKE_REAL_ZVAL_PTR(offset);
-//??? }
-
/* here we are sure we are dealing with an object */
retval = Z_OBJ_HT_P(container)->read_property(container, offset, BP_VAR_R, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL), EX_VAR(opline->result.var) TSRMLS_CC);
if (retval != EX_VAR(opline->result.var)) {
ZVAL_COPY(EX_VAR(opline->result.var), retval);
}
-
-//??? if (1) {
-//??? zval_ptr_dtor(offset);
-//??? } else {
- zval_dtor(free_op2.var);
-//??? }
}
+ zval_dtor(free_op2.var);
+
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -34106,21 +33046,13 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_W_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDL
SAVE_OPLINE();
property = _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC);
-//??? if (1) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
container = _get_zval_ptr_cv_BP_VAR_W(execute_data, opline->op1.var TSRMLS_CC);
if (IS_CV == IS_VAR && UNEXPECTED(Z_TYPE_P(container) == IS_STR_OFFSET)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
zend_fetch_property_address(EX_VAR(opline->result.var), container, property, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_W, (opline->extended_value & ZEND_FETCH_MAKE_REF) != 0 TSRMLS_CC);
-//??? if (1) {
-//??? zval_ptr_dtor(property);
-//??? } else {
- zval_dtor(free_op2.var);
-//??? }
-
+ zval_dtor(free_op2.var);
if (IS_CV == IS_VAR && 0 && READY_TO_DESTROY(free_op1.var)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
@@ -34140,19 +33072,11 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_RW_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HAND
property = _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC);
container = _get_zval_ptr_cv_BP_VAR_RW(execute_data, opline->op1.var TSRMLS_CC);
-//??? if (1) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
if (IS_CV == IS_VAR && UNEXPECTED(Z_TYPE_P(container) == IS_STR_OFFSET)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
zend_fetch_property_address(EX_VAR(opline->result.var), container, property, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_RW, 0 TSRMLS_CC);
-//??? if (1) {
-//??? zval_ptr_dtor(property);
-//??? } else {
- zval_dtor(free_op2.var);
-//??? }
-
+ zval_dtor(free_op2.var);
if (IS_CV == IS_VAR && 0 && READY_TO_DESTROY(free_op1.var)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
@@ -34176,28 +33100,19 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HAND
if (UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT) ||
UNEXPECTED(Z_OBJ_HT_P(container)->read_property == NULL)) {
ZVAL_NULL(EX_VAR(opline->result.var));
- zval_dtor(free_op2.var);
} else {
zval *retval;
-//??? if (1) {
-//??? MAKE_REAL_ZVAL_PTR(offset);
-//??? }
-
/* here we are sure we are dealing with an object */
retval = Z_OBJ_HT_P(container)->read_property(container, offset, BP_VAR_IS, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL), EX_VAR(opline->result.var) TSRMLS_CC);
if (retval != EX_VAR(opline->result.var)) {
ZVAL_COPY(EX_VAR(opline->result.var), retval);
}
-
-//??? if (1) {
-//??? zval_ptr_dtor(offset);
-//??? } else {
- zval_dtor(free_op2.var);
-//??? }
}
+ zval_dtor(free_op2.var);
+
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -34216,19 +33131,11 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_CV_TMP_HANDLER(ZEND_OPCOD
property = _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC);
container = _get_zval_ptr_cv_BP_VAR_W(execute_data, opline->op1.var TSRMLS_CC);
-//??? if (1) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
if (IS_CV == IS_VAR && UNEXPECTED(Z_TYPE_P(container) == IS_STR_OFFSET)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
zend_fetch_property_address(EX_VAR(opline->result.var), container, property, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_W, 0 TSRMLS_CC);
-//??? if (1) {
-//??? zval_ptr_dtor(property);
-//??? } else {
- zval_dtor(free_op2.var);
-//??? }
-
+ zval_dtor(free_op2.var);
if (IS_CV == IS_VAR && 0 && READY_TO_DESTROY(free_op1.var)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
@@ -34250,19 +33157,11 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_UNSET_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_H
container = _get_zval_ptr_cv_BP_VAR_UNSET(execute_data, opline->op1.var TSRMLS_CC);
property = _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC);
-//??? if (1) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
if (IS_CV == IS_VAR && UNEXPECTED(Z_TYPE_P(container) == IS_STR_OFFSET)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
zend_fetch_property_address(EX_VAR(opline->result.var), container, property, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_UNSET, 0 TSRMLS_CC);
-//??? if (1) {
-//??? zval_ptr_dtor(property);
-//??? } else {
- zval_dtor(free_op2.var);
-//??? }
-
+ zval_dtor(free_op2.var);
if (IS_CV == IS_VAR && 0 && READY_TO_DESTROY(free_op1.var)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
@@ -34282,18 +33181,11 @@ static int ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLE
object = _get_zval_ptr_cv_BP_VAR_W(execute_data, opline->op1.var TSRMLS_CC);
property_name = _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC);
-//??? if (1) {
-//??? MAKE_REAL_ZVAL_PTR(property_name);
-//??? }
if (IS_CV == IS_VAR && UNEXPECTED(Z_TYPE_P(object) == IS_STR_OFFSET)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
}
zend_assign_to_object(RETURN_VALUE_USED(opline)?EX_VAR(opline->result.var):NULL, object, property_name, (opline+1)->op1_type, &(opline+1)->op1, execute_data, ZEND_ASSIGN_OBJ, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
-//??? if (1) {
-//??? zval_ptr_dtor(property_name);
-//??? } else {
- zval_dtor(free_op2.var);
-//??? }
+ zval_dtor(free_op2.var);
/* assign_obj has two opcodes! */
CHECK_EXCEPTION();
@@ -34320,15 +33212,8 @@ static int ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLE
zend_free_op free_op2;
zval *property_name = _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC);
-//??? if (1) {
-//??? MAKE_REAL_ZVAL_PTR(property_name);
-//??? }
zend_assign_to_object(RETURN_VALUE_USED(opline)?EX_VAR(opline->result.var):NULL, object_ptr, property_name, (opline+1)->op1_type, &(opline+1)->op1, execute_data, ZEND_ASSIGN_DIM, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
-//??? if (1) {
-//??? zval_ptr_dtor(property_name);
-//??? } else {
- zval_dtor(free_op2.var);
-//??? }
+ zval_dtor(free_op2.var);
} else {
zend_free_op free_op2, free_op_data1, free_op_data2;
zval *value;
@@ -34707,22 +33592,13 @@ static int ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER
ZVAL_DEREF(container);
if (Z_TYPE_P(container) == IS_OBJECT) {
-//??? if (1) {
-//??? MAKE_REAL_ZVAL_PTR(offset);
-//??? }
if (Z_OBJ_HT_P(container)->unset_property) {
Z_OBJ_HT_P(container)->unset_property(container, offset, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
} else {
zend_error(E_NOTICE, "Trying to unset property of non-object");
}
-//??? if (1) {
-//??? zval_ptr_dtor(offset);
-//??? } else {
- zval_dtor(free_op2.var);
-//??? }
- } else {
- zval_dtor(free_op2.var);
}
+ zval_dtor(free_op2.var);
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
@@ -34785,11 +33661,7 @@ str_index_prop:
} else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
result = (value == NULL || !i_zend_is_true(value TSRMLS_CC));
}
- zval_dtor(free_op2.var);
} else if (Z_TYPE_P(container) == IS_OBJECT) {
-//??? if (1) {
-//??? MAKE_REAL_ZVAL_PTR(offset);
-//??? }
if (prop_dim) {
if (Z_OBJ_HT_P(container)->has_property) {
result = Z_OBJ_HT_P(container)->has_property(container, offset, (opline->extended_value & ZEND_ISSET) == 0, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
@@ -34808,11 +33680,6 @@ str_index_prop:
if ((opline->extended_value & ZEND_ISSET) == 0) {
result = !result;
}
-//??? if (1) {
-//??? zval_ptr_dtor(offset);
-//??? } else {
- zval_dtor(free_op2.var);
-//??? }
} else if (Z_TYPE_P(container) == IS_STRING && !prop_dim) { /* string offsets */
zval tmp;
@@ -34837,12 +33704,11 @@ str_index_prop:
if ((opline->extended_value & ZEND_ISSET) == 0) {
result = !result;
}
- zval_dtor(free_op2.var);
} else {
result = ((opline->extended_value & ZEND_ISSET) == 0);
- zval_dtor(free_op2.var);
}
+ zval_dtor(free_op2.var);
ZVAL_BOOL(EX_VAR(opline->result.var), result);
CHECK_EXCEPTION();
@@ -35301,11 +34167,6 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_CV_VAR(int (*bina
}
} else {
/* here we are sure we are dealing with an object */
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
-
- /* here property is a string */
if (opline->extended_value == ZEND_ASSIGN_OBJ
&& Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval *zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
@@ -35363,11 +34224,7 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_CV_VAR(int (*bina
}
}
-//??? if (0) {
-//??? zval_ptr_dtor(property);
-//??? } else {
- zval_ptr_dtor_nogc(free_op2.var);
-//??? }
+ zval_ptr_dtor_nogc(free_op2.var);
FREE_OP(free_op_data1);
}
@@ -35669,10 +34526,6 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_CV_VAR(incdec_t in
/* here we are sure we are dealing with an object */
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
-
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval *zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
@@ -35716,11 +34569,7 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_CV_VAR(incdec_t in
}
}
-//??? if (0) {
-//??? zval_ptr_dtor(property);
-//??? } else {
- zval_ptr_dtor_nogc(free_op2.var);
-//??? }
+ zval_ptr_dtor_nogc(free_op2.var);
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
@@ -35767,10 +34616,6 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_CV_VAR(incdec_t i
/* here we are sure we are dealing with an object */
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
-
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval *zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
@@ -35812,11 +34657,7 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_CV_VAR(incdec_t i
}
}
-//??? if (0) {
-//??? zval_ptr_dtor(property);
-//??? } else {
- zval_ptr_dtor_nogc(free_op2.var);
-//??? }
+ zval_ptr_dtor_nogc(free_op2.var);
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
@@ -36129,28 +34970,19 @@ static int ZEND_FASTCALL zend_fetch_property_address_read_helper_SPEC_CV_VAR(ZEN
UNEXPECTED(Z_OBJ_HT_P(container)->read_property == NULL)) {
zend_error(E_NOTICE, "Trying to get property of non-object");
ZVAL_NULL(EX_VAR(opline->result.var));
- zval_ptr_dtor_nogc(free_op2.var);
} else {
zval *retval;
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(offset);
-//??? }
-
/* here we are sure we are dealing with an object */
retval = Z_OBJ_HT_P(container)->read_property(container, offset, BP_VAR_R, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL), EX_VAR(opline->result.var) TSRMLS_CC);
if (retval != EX_VAR(opline->result.var)) {
ZVAL_COPY(EX_VAR(opline->result.var), retval);
}
-
-//??? if (0) {
-//??? zval_ptr_dtor(offset);
-//??? } else {
- zval_ptr_dtor_nogc(free_op2.var);
-//??? }
}
+ zval_ptr_dtor_nogc(free_op2.var);
+
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -36170,21 +35002,13 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_W_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDL
SAVE_OPLINE();
property = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2 TSRMLS_CC);
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
container = _get_zval_ptr_cv_BP_VAR_W(execute_data, opline->op1.var TSRMLS_CC);
if (IS_CV == IS_VAR && UNEXPECTED(Z_TYPE_P(container) == IS_STR_OFFSET)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
zend_fetch_property_address(EX_VAR(opline->result.var), container, property, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_W, (opline->extended_value & ZEND_FETCH_MAKE_REF) != 0 TSRMLS_CC);
-//??? if (0) {
-//??? zval_ptr_dtor(property);
-//??? } else {
- zval_ptr_dtor_nogc(free_op2.var);
-//??? }
-
+ zval_ptr_dtor_nogc(free_op2.var);
if (IS_CV == IS_VAR && 0 && READY_TO_DESTROY(free_op1.var)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
@@ -36204,19 +35028,11 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_RW_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HAND
property = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2 TSRMLS_CC);
container = _get_zval_ptr_cv_BP_VAR_RW(execute_data, opline->op1.var TSRMLS_CC);
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
if (IS_CV == IS_VAR && UNEXPECTED(Z_TYPE_P(container) == IS_STR_OFFSET)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
zend_fetch_property_address(EX_VAR(opline->result.var), container, property, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_RW, 0 TSRMLS_CC);
-//??? if (0) {
-//??? zval_ptr_dtor(property);
-//??? } else {
- zval_ptr_dtor_nogc(free_op2.var);
-//??? }
-
+ zval_ptr_dtor_nogc(free_op2.var);
if (IS_CV == IS_VAR && 0 && READY_TO_DESTROY(free_op1.var)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
@@ -36240,28 +35056,19 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HAND
if (UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT) ||
UNEXPECTED(Z_OBJ_HT_P(container)->read_property == NULL)) {
ZVAL_NULL(EX_VAR(opline->result.var));
- zval_ptr_dtor_nogc(free_op2.var);
} else {
zval *retval;
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(offset);
-//??? }
-
/* here we are sure we are dealing with an object */
retval = Z_OBJ_HT_P(container)->read_property(container, offset, BP_VAR_IS, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL), EX_VAR(opline->result.var) TSRMLS_CC);
if (retval != EX_VAR(opline->result.var)) {
ZVAL_COPY(EX_VAR(opline->result.var), retval);
}
-
-//??? if (0) {
-//??? zval_ptr_dtor(offset);
-//??? } else {
- zval_ptr_dtor_nogc(free_op2.var);
-//??? }
}
+ zval_ptr_dtor_nogc(free_op2.var);
+
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -36280,19 +35087,11 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_CV_VAR_HANDLER(ZEND_OPCOD
property = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2 TSRMLS_CC);
container = _get_zval_ptr_cv_BP_VAR_W(execute_data, opline->op1.var TSRMLS_CC);
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
if (IS_CV == IS_VAR && UNEXPECTED(Z_TYPE_P(container) == IS_STR_OFFSET)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
zend_fetch_property_address(EX_VAR(opline->result.var), container, property, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_W, 0 TSRMLS_CC);
-//??? if (0) {
-//??? zval_ptr_dtor(property);
-//??? } else {
- zval_ptr_dtor_nogc(free_op2.var);
-//??? }
-
+ zval_ptr_dtor_nogc(free_op2.var);
if (IS_CV == IS_VAR && 0 && READY_TO_DESTROY(free_op1.var)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
@@ -36314,19 +35113,11 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_UNSET_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_H
container = _get_zval_ptr_cv_BP_VAR_UNSET(execute_data, opline->op1.var TSRMLS_CC);
property = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2 TSRMLS_CC);
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
if (IS_CV == IS_VAR && UNEXPECTED(Z_TYPE_P(container) == IS_STR_OFFSET)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
zend_fetch_property_address(EX_VAR(opline->result.var), container, property, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_UNSET, 0 TSRMLS_CC);
-//??? if (0) {
-//??? zval_ptr_dtor(property);
-//??? } else {
- zval_ptr_dtor_nogc(free_op2.var);
-//??? }
-
+ zval_ptr_dtor_nogc(free_op2.var);
if (IS_CV == IS_VAR && 0 && READY_TO_DESTROY(free_op1.var)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
@@ -36346,18 +35137,11 @@ static int ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLE
object = _get_zval_ptr_cv_BP_VAR_W(execute_data, opline->op1.var TSRMLS_CC);
property_name = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2 TSRMLS_CC);
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(property_name);
-//??? }
if (IS_CV == IS_VAR && UNEXPECTED(Z_TYPE_P(object) == IS_STR_OFFSET)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
}
zend_assign_to_object(RETURN_VALUE_USED(opline)?EX_VAR(opline->result.var):NULL, object, property_name, (opline+1)->op1_type, &(opline+1)->op1, execute_data, ZEND_ASSIGN_OBJ, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
-//??? if (0) {
-//??? zval_ptr_dtor(property_name);
-//??? } else {
- zval_ptr_dtor_nogc(free_op2.var);
-//??? }
+ zval_ptr_dtor_nogc(free_op2.var);
/* assign_obj has two opcodes! */
CHECK_EXCEPTION();
@@ -36384,15 +35168,8 @@ static int ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLE
zend_free_op free_op2;
zval *property_name = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2 TSRMLS_CC);
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(property_name);
-//??? }
zend_assign_to_object(RETURN_VALUE_USED(opline)?EX_VAR(opline->result.var):NULL, object_ptr, property_name, (opline+1)->op1_type, &(opline+1)->op1, execute_data, ZEND_ASSIGN_DIM, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
-//??? if (0) {
-//??? zval_ptr_dtor(property_name);
-//??? } else {
- zval_ptr_dtor_nogc(free_op2.var);
-//??? }
+ zval_ptr_dtor_nogc(free_op2.var);
} else {
zend_free_op free_op2, free_op_data1, free_op_data2;
zval *value;
@@ -36906,22 +35683,13 @@ static int ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER
ZVAL_DEREF(container);
if (Z_TYPE_P(container) == IS_OBJECT) {
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(offset);
-//??? }
if (Z_OBJ_HT_P(container)->unset_property) {
Z_OBJ_HT_P(container)->unset_property(container, offset, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
} else {
zend_error(E_NOTICE, "Trying to unset property of non-object");
}
-//??? if (0) {
-//??? zval_ptr_dtor(offset);
-//??? } else {
- zval_ptr_dtor_nogc(free_op2.var);
-//??? }
- } else {
- zval_ptr_dtor_nogc(free_op2.var);
}
+ zval_ptr_dtor_nogc(free_op2.var);
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
@@ -37063,11 +35831,7 @@ str_index_prop:
} else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
result = (value == NULL || !i_zend_is_true(value TSRMLS_CC));
}
- zval_ptr_dtor_nogc(free_op2.var);
} else if (Z_TYPE_P(container) == IS_OBJECT) {
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(offset);
-//??? }
if (prop_dim) {
if (Z_OBJ_HT_P(container)->has_property) {
result = Z_OBJ_HT_P(container)->has_property(container, offset, (opline->extended_value & ZEND_ISSET) == 0, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
@@ -37086,11 +35850,6 @@ str_index_prop:
if ((opline->extended_value & ZEND_ISSET) == 0) {
result = !result;
}
-//??? if (0) {
-//??? zval_ptr_dtor(offset);
-//??? } else {
- zval_ptr_dtor_nogc(free_op2.var);
-//??? }
} else if (Z_TYPE_P(container) == IS_STRING && !prop_dim) { /* string offsets */
zval tmp;
@@ -37115,12 +35874,11 @@ str_index_prop:
if ((opline->extended_value & ZEND_ISSET) == 0) {
result = !result;
}
- zval_ptr_dtor_nogc(free_op2.var);
} else {
result = ((opline->extended_value & ZEND_ISSET) == 0);
- zval_ptr_dtor_nogc(free_op2.var);
}
+ zval_ptr_dtor_nogc(free_op2.var);
ZVAL_BOOL(EX_VAR(opline->result.var), result);
CHECK_EXCEPTION();
@@ -37304,11 +36062,6 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_CV_UNUSED(int (*b
}
} else {
/* here we are sure we are dealing with an object */
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
-
- /* here property is a string */
if (opline->extended_value == ZEND_ASSIGN_OBJ
&& Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval *zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_UNUSED == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
@@ -37366,11 +36119,6 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_CV_UNUSED(int (*b
}
}
-//??? if (0) {
-//??? zval_ptr_dtor(property);
-//??? } else {
-
-//??? }
FREE_OP(free_op_data1);
}
@@ -37885,15 +36633,8 @@ static int ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_HAN
zval *property_name = NULL;
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(property_name);
-//??? }
zend_assign_to_object(RETURN_VALUE_USED(opline)?EX_VAR(opline->result.var):NULL, object_ptr, property_name, (opline+1)->op1_type, &(opline+1)->op1, execute_data, ZEND_ASSIGN_DIM, ((IS_UNUSED == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
-//??? if (0) {
-//??? zval_ptr_dtor(property_name);
-//??? } else {
-//??? }
} else {
zend_free_op free_op_data1, free_op_data2;
zval *value;
@@ -38620,11 +37361,6 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_CV_CV(int (*binar
}
} else {
/* here we are sure we are dealing with an object */
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
-
- /* here property is a string */
if (opline->extended_value == ZEND_ASSIGN_OBJ
&& Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval *zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
@@ -38682,11 +37418,6 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_CV_CV(int (*binar
}
}
-//??? if (0) {
-//??? zval_ptr_dtor(property);
-//??? } else {
-
-//??? }
FREE_OP(free_op_data1);
}
@@ -38988,10 +37719,6 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_CV_CV(incdec_t inc
/* here we are sure we are dealing with an object */
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
-
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval *zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
@@ -39035,11 +37762,6 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_CV_CV(incdec_t inc
}
}
-//??? if (0) {
-//??? zval_ptr_dtor(property);
-//??? } else {
-
-//??? }
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
@@ -39086,10 +37808,6 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_CV_CV(incdec_t in
/* here we are sure we are dealing with an object */
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
-
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
zval *zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
@@ -39131,11 +37849,6 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_CV_CV(incdec_t in
}
}
-//??? if (0) {
-//??? zval_ptr_dtor(property);
-//??? } else {
-
-//??? }
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
@@ -39301,28 +38014,18 @@ static int ZEND_FASTCALL zend_fetch_property_address_read_helper_SPEC_CV_CV(ZEND
UNEXPECTED(Z_OBJ_HT_P(container)->read_property == NULL)) {
zend_error(E_NOTICE, "Trying to get property of non-object");
ZVAL_NULL(EX_VAR(opline->result.var));
-
} else {
zval *retval;
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(offset);
-//??? }
-
/* here we are sure we are dealing with an object */
retval = Z_OBJ_HT_P(container)->read_property(container, offset, BP_VAR_R, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL), EX_VAR(opline->result.var) TSRMLS_CC);
if (retval != EX_VAR(opline->result.var)) {
ZVAL_COPY(EX_VAR(opline->result.var), retval);
}
-
-//??? if (0) {
-//??? zval_ptr_dtor(offset);
-//??? } else {
-
-//??? }
}
+
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -39342,20 +38045,12 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_W_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLE
SAVE_OPLINE();
property = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC);
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
container = _get_zval_ptr_cv_BP_VAR_W(execute_data, opline->op1.var TSRMLS_CC);
if (IS_CV == IS_VAR && UNEXPECTED(Z_TYPE_P(container) == IS_STR_OFFSET)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
zend_fetch_property_address(EX_VAR(opline->result.var), container, property, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_W, (opline->extended_value & ZEND_FETCH_MAKE_REF) != 0 TSRMLS_CC);
-//??? if (0) {
-//??? zval_ptr_dtor(property);
-//??? } else {
-
-//??? }
if (IS_CV == IS_VAR && 0 && READY_TO_DESTROY(free_op1.var)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
@@ -39376,18 +38071,10 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_RW_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDL
property = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC);
container = _get_zval_ptr_cv_BP_VAR_RW(execute_data, opline->op1.var TSRMLS_CC);
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
if (IS_CV == IS_VAR && UNEXPECTED(Z_TYPE_P(container) == IS_STR_OFFSET)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
zend_fetch_property_address(EX_VAR(opline->result.var), container, property, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_RW, 0 TSRMLS_CC);
-//??? if (0) {
-//??? zval_ptr_dtor(property);
-//??? } else {
-
-//??? }
if (IS_CV == IS_VAR && 0 && READY_TO_DESTROY(free_op1.var)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
@@ -39412,28 +38099,18 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDL
if (UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT) ||
UNEXPECTED(Z_OBJ_HT_P(container)->read_property == NULL)) {
ZVAL_NULL(EX_VAR(opline->result.var));
-
} else {
zval *retval;
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(offset);
-//??? }
-
/* here we are sure we are dealing with an object */
retval = Z_OBJ_HT_P(container)->read_property(container, offset, BP_VAR_IS, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL), EX_VAR(opline->result.var) TSRMLS_CC);
if (retval != EX_VAR(opline->result.var)) {
ZVAL_COPY(EX_VAR(opline->result.var), retval);
}
-
-//??? if (0) {
-//??? zval_ptr_dtor(offset);
-//??? } else {
-
-//??? }
}
+
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -39452,18 +38129,10 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_CV_CV_HANDLER(ZEND_OPCODE
property = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC);
container = _get_zval_ptr_cv_BP_VAR_W(execute_data, opline->op1.var TSRMLS_CC);
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
if (IS_CV == IS_VAR && UNEXPECTED(Z_TYPE_P(container) == IS_STR_OFFSET)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
zend_fetch_property_address(EX_VAR(opline->result.var), container, property, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_W, 0 TSRMLS_CC);
-//??? if (0) {
-//??? zval_ptr_dtor(property);
-//??? } else {
-
-//??? }
if (IS_CV == IS_VAR && 0 && READY_TO_DESTROY(free_op1.var)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
@@ -39486,18 +38155,10 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_UNSET_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HA
container = _get_zval_ptr_cv_BP_VAR_UNSET(execute_data, opline->op1.var TSRMLS_CC);
property = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC);
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(property);
-//??? }
if (IS_CV == IS_VAR && UNEXPECTED(Z_TYPE_P(container) == IS_STR_OFFSET)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
zend_fetch_property_address(EX_VAR(opline->result.var), container, property, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_UNSET, 0 TSRMLS_CC);
-//??? if (0) {
-//??? zval_ptr_dtor(property);
-//??? } else {
-
-//??? }
if (IS_CV == IS_VAR && 0 && READY_TO_DESTROY(free_op1.var)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
@@ -39518,18 +38179,11 @@ static int ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER
object = _get_zval_ptr_cv_BP_VAR_W(execute_data, opline->op1.var TSRMLS_CC);
property_name = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC);
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(property_name);
-//??? }
if (IS_CV == IS_VAR && UNEXPECTED(Z_TYPE_P(object) == IS_STR_OFFSET)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
}
zend_assign_to_object(RETURN_VALUE_USED(opline)?EX_VAR(opline->result.var):NULL, object, property_name, (opline+1)->op1_type, &(opline+1)->op1, execute_data, ZEND_ASSIGN_OBJ, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
-//??? if (0) {
-//??? zval_ptr_dtor(property_name);
-//??? } else {
-//??? }
/* assign_obj has two opcodes! */
CHECK_EXCEPTION();
@@ -39556,15 +38210,8 @@ static int ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER
zval *property_name = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC);
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(property_name);
-//??? }
zend_assign_to_object(RETURN_VALUE_USED(opline)?EX_VAR(opline->result.var):NULL, object_ptr, property_name, (opline+1)->op1_type, &(opline+1)->op1, execute_data, ZEND_ASSIGN_DIM, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
-//??? if (0) {
-//??? zval_ptr_dtor(property_name);
-//??? } else {
-//??? }
} else {
zend_free_op free_op_data1, free_op_data2;
zval *value;
@@ -40001,23 +38648,14 @@ static int ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_
ZVAL_DEREF(container);
if (Z_TYPE_P(container) == IS_OBJECT) {
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(offset);
-//??? }
if (Z_OBJ_HT_P(container)->unset_property) {
Z_OBJ_HT_P(container)->unset_property(container, offset, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
} else {
zend_error(E_NOTICE, "Trying to unset property of non-object");
}
-//??? if (0) {
-//??? zval_ptr_dtor(offset);
-//??? } else {
-
-//??? }
- } else {
-
}
+
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -40079,11 +38717,7 @@ str_index_prop:
} else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
result = (value == NULL || !i_zend_is_true(value TSRMLS_CC));
}
-
} else if (Z_TYPE_P(container) == IS_OBJECT) {
-//??? if (0) {
-//??? MAKE_REAL_ZVAL_PTR(offset);
-//??? }
if (prop_dim) {
if (Z_OBJ_HT_P(container)->has_property) {
result = Z_OBJ_HT_P(container)->has_property(container, offset, (opline->extended_value & ZEND_ISSET) == 0, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
@@ -40102,11 +38736,6 @@ str_index_prop:
if ((opline->extended_value & ZEND_ISSET) == 0) {
result = !result;
}
-//??? if (0) {
-//??? zval_ptr_dtor(offset);
-//??? } else {
-
-//??? }
} else if (Z_TYPE_P(container) == IS_STRING && !prop_dim) { /* string offsets */
zval tmp;
@@ -40131,10 +38760,8 @@ str_index_prop:
if ((opline->extended_value & ZEND_ISSET) == 0) {
result = !result;
}
-
} else {
result = ((opline->extended_value & ZEND_ISSET) == 0);
-
}
ZVAL_BOOL(EX_VAR(opline->result.var), result);
diff --git a/ext/date/php_date.c b/ext/date/php_date.c
index 6bc2db7a71..8009897b9a 100644
--- a/ext/date/php_date.c
+++ b/ext/date/php_date.c
@@ -2212,7 +2212,7 @@ static HashTable *date_object_get_properties(zval *object TSRMLS_DC) /* {{{ */
abs(utc_offset / 60),
abs((utc_offset % 60)));
-//??? ZVAL_STRING(zv, tmpstr, 0);
+ // TODO: avoid reallocation ???
ZVAL_STRING(&zv, tmpstr);
efree(tmpstr);
}
@@ -2306,7 +2306,7 @@ static HashTable *date_object_get_properties_timezone(zval *object TSRMLS_DC) /*
abs(tzobj->tzi.utc_offset / 60),
abs((tzobj->tzi.utc_offset % 60)));
-//??? ZVAL_STRING(zv, tmpstr, 0);
+ // TODO: avoid reallocation ???
ZVAL_STRING(&zv, tmpstr);
efree(tmpstr);
}
@@ -3744,7 +3744,7 @@ PHP_FUNCTION(timezone_name_get)
abs(utc_offset / 60),
abs((utc_offset % 60)));
-//??? RETURN_STRING(tmpstr, 0);
+ // TODO: avoid reallocation ???
RETVAL_STRING(tmpstr);
efree(tmpstr);
return;
@@ -4003,8 +4003,6 @@ zval *date_interval_read_property(zval *object, zval *member, int type, const ze
return retval;
} while(0);
-//??? ALLOC_INIT_ZVAL(retval);
-//??? Z_SET_REFCOUNT_P(retval, 0);
retval = rv;
if (value != -99999) {
@@ -4622,7 +4620,7 @@ static void php_do_date_sunrise_sunset(INTERNAL_FUNCTION_PARAMETERS, int calc_su
switch (retformat) {
case SUNFUNCS_RET_STRING:
spprintf(&retstr, 0, "%02d:%02d", (int) N, (int) (60 * (N - (int) N)));
-//??? RETURN_STRINGL(retstr, 5, 0);
+ // TODO: avoid reallocation ???
RETVAL_STRINGL(retstr, 5);
efree(retstr);
return;
diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c
index b7f97bb953..50827b26f3 100644
--- a/ext/mbstring/mbstring.c
+++ b/ext/mbstring/mbstring.c
@@ -2172,7 +2172,7 @@ PHP_FUNCTION(mb_output_handler)
}
/* get the converter output, and return it */
mbfl_buffer_converter_result(MBSTRG(outconv), &result);
- //????
+ // TODO: avoid reallocation ???
RETVAL_STRINGL((char *)result.val, result.len); /* the string is already strdup()'ed */
efree(result.val);
@@ -2476,7 +2476,7 @@ PHP_FUNCTION(mb_strstr)
if (part) {
ret = mbfl_substr(&haystack, &result, 0, n);
if (ret != NULL) {
- //???
+ // TODO: avoid reallocation ???
RETVAL_STRINGL((char *)ret->val, ret->len);
efree(ret->val);
} else {
@@ -2486,7 +2486,7 @@ PHP_FUNCTION(mb_strstr)
len = (mblen - n);
ret = mbfl_substr(&haystack, &result, n, len);
if (ret != NULL) {
- //????
+ // TODO: avoid reallocation ???
RETVAL_STRINGL((char *)ret->val, ret->len);
efree(ret->val);
} else {
@@ -2540,7 +2540,7 @@ PHP_FUNCTION(mb_strrchr)
if (part) {
ret = mbfl_substr(&haystack, &result, 0, n);
if (ret != NULL) {
- //????
+ // TODO: avoid reallocation ???
RETVAL_STRINGL((char *)ret->val, ret->len);
efree(ret->val);
} else {
@@ -2550,7 +2550,7 @@ PHP_FUNCTION(mb_strrchr)
len = (mblen - n);
ret = mbfl_substr(&haystack, &result, n, len);
if (ret != NULL) {
- //????
+ // TODO: avoid reallocation ???
RETVAL_STRINGL((char *)ret->val, ret->len);
efree(ret->val);
} else {
@@ -2606,7 +2606,7 @@ PHP_FUNCTION(mb_stristr)
if (part) {
ret = mbfl_substr(&haystack, &result, 0, n);
if (ret != NULL) {
- //????
+ // TODO: avoid reallocation ???
RETVAL_STRINGL((char *)ret->val, ret->len);
efree(ret->val);
} else {
@@ -2616,7 +2616,7 @@ PHP_FUNCTION(mb_stristr)
len = (mblen - n);
ret = mbfl_substr(&haystack, &result, n, len);
if (ret != NULL) {
- //????
+ // TODO: avoid reallocaton ???
RETVAL_STRINGL((char *)ret->val, ret->len);
efree(ret->val);
} else {
@@ -2663,7 +2663,7 @@ PHP_FUNCTION(mb_strrichr)
if (part) {
ret = mbfl_substr(&haystack, &result, 0, n);
if (ret != NULL) {
- //???
+ // TODO: avoid reallocation ???
RETVAL_STRINGL((char *)ret->val, ret->len);
efree(ret->val);
} else {
@@ -2673,7 +2673,7 @@ PHP_FUNCTION(mb_strrichr)
len = (mblen - n);
ret = mbfl_substr(&haystack, &result, n, len);
if (ret != NULL) {
- //????
+ // TODO: avoid reallocation ???
RETVAL_STRINGL((char *)ret->val, ret->len);
efree(ret->val);
} else {
@@ -2798,7 +2798,7 @@ PHP_FUNCTION(mb_substr)
RETURN_FALSE;
}
- //????
+ // TODO: avoid reallocation ???
RETVAL_STRINGL((char *)ret->val, ret->len); /* the string is already strdup()'ed */
efree(ret->val);
}
@@ -2867,7 +2867,7 @@ PHP_FUNCTION(mb_strcut)
RETURN_FALSE;
}
- //????
+ // TODO: avoid reallocation ???
RETVAL_STRINGL((char *)ret->val, ret->len); /* the string is already strdup()'ed */
efree(ret->val);
}
@@ -2961,7 +2961,7 @@ PHP_FUNCTION(mb_strimwidth)
if (ret == NULL) {
RETURN_FALSE;
}
- //????
+ // TODO: avoid reallocation ???
RETVAL_STRINGL((char *)ret->val, ret->len); /* the string is already strdup()'ed */
efree(ret->val);
}
@@ -3117,8 +3117,8 @@ PHP_FUNCTION(mb_convert_encoding)
/* new encoding */
ret = php_mb_convert_encoding(arg_str, str_len, arg_new, _from_encodings, &size TSRMLS_CC);
if (ret != NULL) {
+ // TODO: avoid reallocation ???
RETVAL_STRINGL(ret, size); /* the string is already strdup()'ed */
- //???
efree(ret);
} else {
RETVAL_FALSE;
@@ -3150,8 +3150,8 @@ PHP_FUNCTION(mb_convert_case)
newstr = php_unicode_convert_case(case_mode, str, (size_t) str_len, &ret_len, from_encoding TSRMLS_CC);
if (newstr) {
+ // TODO: avoid reallocation ???
RETVAL_STRINGL(newstr, ret_len);
- //???
efree(newstr);
}
}
@@ -3175,7 +3175,7 @@ PHP_FUNCTION(mb_strtoupper)
newstr = php_unicode_convert_case(PHP_UNICODE_CASE_UPPER, str, (size_t) str_len, &ret_len, from_encoding TSRMLS_CC);
if (newstr) {
- //???
+ // TODO: avoid reallocation ???
RETVAL_STRINGL(newstr, ret_len);
efree(newstr);
return;
@@ -3202,7 +3202,7 @@ PHP_FUNCTION(mb_strtolower)
newstr = php_unicode_convert_case(PHP_UNICODE_CASE_LOWER, str, (size_t) str_len, &ret_len, from_encoding TSRMLS_CC);
if (newstr) {
- //???
+ // TODO: avoid reallocation ???
RETVAL_STRINGL(newstr, ret_len);
efree(newstr);
return;
@@ -3383,7 +3383,7 @@ PHP_FUNCTION(mb_encode_mimeheader)
mbfl_string_init(&result);
ret = mbfl_mime_header_encode(&string, &result, charset, transenc, linefeed, indent);
if (ret != NULL) {
- //?????
+ // TODO: avoid reallocation ???
RETVAL_STRINGL((char *)ret->val, ret->len); /* the string is already strdup()'ed */
efree(ret->val);
} else {
@@ -3409,7 +3409,7 @@ PHP_FUNCTION(mb_decode_mimeheader)
mbfl_string_init(&result);
ret = mbfl_mime_header_decode(&string, &result, MBSTRG(current_internal_encoding)->no_encoding);
if (ret != NULL) {
- //????
+ // TODO: avoid reallocation ???
RETVAL_STRINGL((char *)ret->val, ret->len); /* the string is already strdup()'ed */
efree(ret->val);
} else {
@@ -3514,7 +3514,7 @@ PHP_FUNCTION(mb_convert_kana)
ret = mbfl_ja_jp_hantozen(&string, &result, opt);
if (ret != NULL) {
- //???
+ // TODO: avoid reallocation ???
RETVAL_STRINGL((char *)ret->val, ret->len); /* the string is already strdup()'ed */
efree(ret->val);
} else {
@@ -3716,7 +3716,7 @@ detect_end:
ret = mbfl_buffer_converter_feed_result(convd, &string, &result);
if (ret != NULL) {
zval_ptr_dtor(hash_entry_ptr);
- //???
+ // TODO: avoid reallocation ???
ZVAL_STRINGL(hash_entry_ptr, (char *)ret->val, ret->len);
efree(ret->val);
}
@@ -3729,7 +3729,7 @@ detect_end:
ret = mbfl_buffer_converter_feed_result(convd, &string, &result);
if (ret != NULL) {
zval_ptr_dtor(var);
- //????
+ // TODO: avoid reallocation ???
ZVAL_STRINGL(var, (char *)ret->val, ret->len);
efree(ret->val);
}
@@ -3820,7 +3820,7 @@ php_mb_numericentity_exec(INTERNAL_FUNCTION_PARAMETERS, int type)
ret = mbfl_html_numeric_entity(&string, &result, convmap, mapsize, type);
if (ret != NULL) {
- //???
+ // TODO: avoid reallocation ???
RETVAL_STRINGL((char *)ret->val, ret->len);
efree(ret->val);
} else {
diff --git a/ext/mysql/php_mysql.c b/ext/mysql/php_mysql.c
index b6d43687e0..1731c8a538 100644
--- a/ext/mysql/php_mysql.c
+++ b/ext/mysql/php_mysql.c
@@ -1335,8 +1335,9 @@ PHP_FUNCTION(mysql_stat)
RETURN_STRING(stat);
#else
if (mysqlnd_stat(mysql->conn, &stat, &stat_len) == PASS) {
- //???? memleak
- RETURN_STRINGL(stat, stat_len);
+ // TODO: avoid reallocation ???
+ RETVAL_STRINGL(stat, stat_len);
+ efree(stat);
#endif
} else {
RETURN_FALSE;
diff --git a/ext/opcache/Optimizer/compact_literals.c b/ext/opcache/Optimizer/compact_literals.c
index deaf09547d..1905e66136 100644
--- a/ext/opcache/Optimizer/compact_literals.c
+++ b/ext/opcache/Optimizer/compact_literals.c
@@ -281,7 +281,6 @@ static void optimizer_compact_literals(zend_op_array *op_array TSRMLS_DC)
/* Merge equal constants */
j = 0; cache_slots = 0;
zend_hash_init(&hash, 16, NULL, NULL, 0);
-//??? hash.flags |= HASH_FLAG_BIG_DATA;
map = (int*)ecalloc(op_array->last_literal, sizeof(int));
for (i = 0; i < op_array->last_literal; i++) {
if (!info[i].flags) {
diff --git a/ext/opcache/Optimizer/zend_optimizer_internal.h b/ext/opcache/Optimizer/zend_optimizer_internal.h
index c0e298b94f..049036c1f4 100644
--- a/ext/opcache/Optimizer/zend_optimizer_internal.h
+++ b/ext/opcache/Optimizer/zend_optimizer_internal.h
@@ -24,7 +24,7 @@
#include "ZendAccelerator.h"
-#if 1 //???ZEND_EXTENSION_API_NO > PHP_5_6_X_API_NO
+#if 1 // TODO: remove support for old PHP versions ???
# define VAR_NUM(v) EX_VAR_TO_NUM(v)
# define NUM_VAR(v) ((zend_uint)(zend_uintptr_t)EX_VAR_NUM_2(0, v))
#elif ZEND_EXTENSION_API_NO > PHP_5_4_X_API_NO
diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c
index cdf48f2bb2..01dfd5c2a9 100644
--- a/ext/opcache/ZendAccelerator.c
+++ b/ext/opcache/ZendAccelerator.c
@@ -329,9 +329,7 @@ zend_string *accel_new_interned_string(zend_string *str TSRMLS_DC)
p = ZCSG(interned_strings).arData + idx;
if ((p->h == h) && (p->key->len == str->len)) {
if (!memcmp(p->key->val, str->val, str->len)) {
-//??? if (free_src) {
- STR_RELEASE(str);
-//??? }
+ STR_RELEASE(str);
return p->key;
}
}
@@ -366,11 +364,7 @@ zend_string *accel_new_interned_string(zend_string *str TSRMLS_DC)
ZVAL_STR(&p->val, p->key);
Z_NEXT(p->val) = ZCSG(interned_strings).arHash[nIndex];
ZCSG(interned_strings).arHash[nIndex] = idx;
-
-//??? if (free_src) {
- STR_RELEASE(str);
-//??? }
-
+ STR_RELEASE(str);
return p->key;
#else
return str;
@@ -2231,9 +2225,6 @@ static void accel_fast_zval_dtor(zval *zvalue)
{
TSRMLS_FETCH();
-#if ZEND_EXTENSION_API_NO >= PHP_5_3_X_API_NO
-//??? GC_REMOVE_FROM_BUFFER(Z_OBJ_P(zvalue));
-#endif
OBJ_RELEASE(Z_OBJ_P(zvalue));
}
break;
diff --git a/ext/opcache/zend_accelerator_util_funcs.c b/ext/opcache/zend_accelerator_util_funcs.c
index 61d662a4f8..0d1a1907cd 100644
--- a/ext/opcache/zend_accelerator_util_funcs.c
+++ b/ext/opcache/zend_accelerator_util_funcs.c
@@ -354,9 +354,6 @@ static void zend_hash_clone_zval(HashTable *ht, HashTable *source, int bind)
ht->nNumOfElements = source->nNumOfElements;
ht->nNextFreeElement = source->nNextFreeElement;
ht->pDestructor = ZVAL_PTR_DTOR;
-#if ZEND_DEBUG
-//??? ht->inconsistent = 0;
-#endif
ht->flags = HASH_FLAG_APPLY_PROTECTION;
ht->arData = NULL;
ht->arHash = NULL;
@@ -430,9 +427,6 @@ static void zend_hash_clone_methods(HashTable *ht, HashTable *source, zend_class
ht->nNumOfElements = source->nNumOfElements;
ht->nNextFreeElement = source->nNextFreeElement;
ht->pDestructor = ZEND_FUNCTION_DTOR;
-#if ZEND_DEBUG
-//??? ht->inconsistent = 0;
-#endif
ht->flags = HASH_FLAG_APPLY_PROTECTION;
ht->nInternalPointer = source->nNumOfElements ? 0 : INVALID_IDX;
ht->nApplyCount = 0;
@@ -531,9 +525,6 @@ static void zend_hash_clone_prop_info(HashTable *ht, HashTable *source, zend_cla
ht->nNumOfElements = source->nNumOfElements;
ht->nNextFreeElement = source->nNextFreeElement;
ht->pDestructor = zend_destroy_property_info;
-#if ZEND_DEBUG
-//??? ht->inconsistent = 0;
-#endif
ht->flags = HASH_FLAG_APPLY_PROTECTION;
ht->nInternalPointer = source->nNumOfElements ? 0 : INVALID_IDX;
ht->nApplyCount = 0;
diff --git a/ext/opcache/zend_persist.c b/ext/opcache/zend_persist.c
index 78cb5abc8a..da9ec7dd87 100644
--- a/ext/opcache/zend_persist.c
+++ b/ext/opcache/zend_persist.c
@@ -170,12 +170,6 @@ static void zend_persist_zval(zval *z TSRMLS_DC)
}
}
-static void zend_protect_zval(zval *z TSRMLS_DC)
-{
-//??? PZ_SET_ISREF_P(z);
-//??? PZ_SET_REFCOUNT_P(z, 2);
-}
-
static void zend_persist_op_array_ex(zend_op_array *op_array, zend_persistent_script* main_persistent_script TSRMLS_DC)
{
zend_op *persist_ptr;
@@ -233,7 +227,6 @@ static void zend_persist_op_array_ex(zend_op_array *op_array, zend_persistent_sc
op_array->literals = p;
while (p < end) {
zend_persist_zval(&p->constant TSRMLS_CC);
- zend_protect_zval(&p->constant TSRMLS_CC);
p++;
}
efree(orig_literals);
@@ -255,7 +248,6 @@ static void zend_persist_op_array_ex(zend_op_array *op_array, zend_persistent_sc
opline->op1.zv = (zval*)((char*)opline->op1.zv + ((char*)op_array->literals - (char*)orig_literals));
#else
zend_persist_zval(&opline->op1.u.constant TSRMLS_CC);
- zend_protect_zval(&opline->op1.u.constant TSRMLS_CC);
#endif
}
if (ZEND_OP2_TYPE(opline) == IS_CONST) {
@@ -263,7 +255,6 @@ static void zend_persist_op_array_ex(zend_op_array *op_array, zend_persistent_sc
opline->op2.zv = (zval*)((char*)opline->op2.zv + ((char*)op_array->literals - (char*)orig_literals));
#else
zend_persist_zval(&opline->op2.u.constant TSRMLS_CC);
- zend_protect_zval(&opline->op2.u.constant TSRMLS_CC);
#endif
}
diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c
index bd76b556af..54f7667d0f 100644
--- a/ext/pcre/php_pcre.c
+++ b/ext/pcre/php_pcre.c
@@ -1243,7 +1243,6 @@ static zend_string *php_replace_in_subject(zval *regex, zval *replace, zval *sub
}
/* FIXME: This might need to be changed to STR_EMPTY_ALLOC(). Check if this zval could be dtor()'ed somehow */
-//??? ZVAL_STRINGL(&empty_replace, "", 0, 0);
ZVAL_EMPTY_STRING(&empty_replace);
/* If regex is an array */
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c
index 6dc4ef2edf..0b8027dd85 100644
--- a/ext/reflection/php_reflection.c
+++ b/ext/reflection/php_reflection.c
@@ -732,7 +732,6 @@ static void _parameter_string(string *str, zend_function *fptr, struct _zend_arg
int use_copy;
string_write(str, " = ", sizeof(" = ")-1);
ZVAL_DUP(&zv, precv->op2.zv);
-//??? INIT_PZVAL(zv);
zval_update_constant_ex(&zv, (void*)1, fptr->common.scope TSRMLS_CC);
if (Z_TYPE(zv) == IS_BOOL) {
if (Z_LVAL(zv)) {
@@ -1378,8 +1377,6 @@ static void _reflection_export(INTERNAL_FUNCTION_PARAMETERS, zend_class_entry *c
ZVAL_COPY_VALUE(&params[1], argument2_ptr);
}
-//??? INIT_PZVAL(&output);
-
/* Create object */
if (object_and_properties_init(&reflector, ce_ptr, NULL) == FAILURE) {
_DO_THROW("Could not create reflector");
@@ -2585,11 +2582,11 @@ ZEND_METHOD(reflection_parameter, getDefaultValue)
}
ZVAL_COPY_VALUE(return_value, precv->op2.zv);
-//??? INIT_PZVAL(return_value);
- if (!Z_CONSTANT_P(return_value)) {
+ if (Z_CONSTANT_P(return_value)) {
+ zval_update_constant_ex(return_value, (void*)0, param->fptr->common.scope TSRMLS_CC);
+ } else {
zval_copy_ctor(return_value);
}
- zval_update_constant_ex(return_value, (void*)0, param->fptr->common.scope TSRMLS_CC);
}
/* }}} */
@@ -3377,7 +3374,6 @@ static void add_class_vars(zend_class_entry *ce, int statics, zval *return_value
/* copy: enforce read only access */
ZVAL_DUP(&prop_copy, prop);
-//??? INIT_PZVAL(prop_copy);
/* this is necessary to make it able to work with default array
* properties, returned to user */
@@ -4956,7 +4952,6 @@ ZEND_METHOD(reflection_property, getValue)
/* Bails out */
}
ZVAL_DUP(return_value, &CE_STATIC_MEMBERS(intern->ce)[ref->prop.offset]);
-//??? INIT_PZVAL(return_value);
} else {
const char *class_name, *prop_name;
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c
index 6632e99328..0dc9874f4b 100644
--- a/ext/standard/basic_functions.c
+++ b/ext/standard/basic_functions.c
@@ -4030,7 +4030,7 @@ PHP_FUNCTION(getenv)
/* SAPI method returns an emalloc()'d string */
ptr = sapi_getenv(str, str_len TSRMLS_CC);
if (ptr) {
-//??? RETURN_STRING(ptr, 0);
+ // TODO: avoid realocation ???
RETVAL_STRING(ptr);
efree(ptr);
return;
diff --git a/ext/standard/browscap.c b/ext/standard/browscap.c
index 3b7b994ab0..08a01d5dff 100644
--- a/ext/standard/browscap.c
+++ b/ext/standard/browscap.c
@@ -84,8 +84,7 @@ static void convert_browscap_pattern(zval *pattern, int persistent) /* {{{ */
char *lc_pattern;
// TODO: overflow check???
-//??? t = (char *) safe_pemalloc(Z_STRLEN_P(pattern), 2, 5, persistent);
- res = STR_ALLOC(Z_STRLEN_P(pattern) * 2 + 5, persistent);
+ res = STR_SAFE_ALLOC(Z_STRLEN_P(pattern), 2, 4, persistent);
t = res->val;
lc_pattern = zend_str_tolower_dup(Z_STRVAL_P(pattern), Z_STRLEN_P(pattern));
@@ -436,8 +435,8 @@ static int browser_reg_compare(zval *browser TSRMLS_DC, int num_args, va_list ar
static void browscap_zval_copy_ctor(zval *p) /* {{{ */
{
zval_copy_ctor(p);
-//??? INIT_PZVAL(p);
-} /* }}} */
+}
+/* }}} */
/* {{{ proto mixed get_browser([string browser_name [, bool return_array]])
Get information about the capabilities of a browser. If browser_name is omitted or null, HTTP_USER_AGENT is used. Returns an object by default; if return_array is true, returns an array. */
diff --git a/ext/standard/file.c b/ext/standard/file.c
index b802e2c4e7..536cdfb269 100644
--- a/ext/standard/file.c
+++ b/ext/standard/file.c
@@ -822,10 +822,8 @@ PHP_FUNCTION(tempnam)
if ((fd = php_open_temporary_fd_ex(dir, p->val, &opened_path, 1 TSRMLS_CC)) >= 0) {
close(fd);
-//??? RETVAL_STRING(opened_path, 0);
+ // TODO: avoid reallocation ???
RETVAL_STRING(opened_path);
- //??? temporary fixed the memory leak, I've tried to make opened_path a zend_string
- //but too too many places need to be changed.... let's keep it simple for now
efree(opened_path);
}
STR_RELEASE(p);
@@ -1116,7 +1114,7 @@ PHPAPI PHP_FUNCTION(fgetss)
retval_len = php_strip_tags(retval, actual_len, &stream->fgetss_state, allowed_tags, allowed_tags_len);
-//??? RETURN_STRINGL(retval, retval_len, 0);
+ // TODO: avoid reallocation ???
RETVAL_STRINGL(retval, retval_len);
efree(retval);
}
diff --git a/ext/standard/fsock.c b/ext/standard/fsock.c
index 0774893e85..8e164bab38 100644
--- a/ext/standard/fsock.c
+++ b/ext/standard/fsock.c
@@ -100,7 +100,7 @@ static void php_fsockopen_stream(INTERNAL_FUNCTION_PARAMETERS, int persistent)
if (zerrstr && errstr) {
/* no need to dup; we need to efree buf anyway */
zval_dtor(zerrstr);
-//??? ZVAL_STRING(zerrstr, errstr, 0);
+ // TODO: avoid reallocation ???
ZVAL_STRING(zerrstr, errstr);
efree(errstr);
} else if (!zerrstr && errstr) {
diff --git a/ext/standard/html.c b/ext/standard/html.c
index cc772859a5..69f2400c53 100644
--- a/ext/standard/html.c
+++ b/ext/standard/html.c
@@ -1276,8 +1276,7 @@ PHPAPI zend_string *php_escape_html_entities_ex(unsigned char *old, size_t oldle
/* guarantee we have at least 40 bytes to write.
* In HTML5, entities may take up to 33 bytes */
if (len > maxlen - 40) { /* maxlen can never be smaller than 128 */
-//??? replaced = safe_erealloc(replaced, maxlen , 1, 128 + 1);
- replaced = STR_REALLOC(replaced, maxlen + 128, 0);
+ replaced = STR_SAFE_REALLOC(replaced, maxlen, 1, 128, 0);
maxlen += 128;
}
@@ -1409,8 +1408,7 @@ encode_amp:
/* at this point maxlen - len >= 40 */
if (maxlen - len < ent_len + 2 /* & and ; */) {
/* ent_len < oldlen, which is certainly <= SIZE_MAX/2 */
-//??? replaced = safe_erealloc(replaced, maxlen, 1, ent_len + 128 + 1);
- replaced = STR_REALLOC(replaced, maxlen + ent_len + 128, 0);
+ replaced = STR_SAFE_REALLOC(replaced, maxlen, 1, ent_len + 128, 0);
maxlen += ent_len + 128;
}
replaced->val[len++] = '&';
diff --git a/ext/standard/iptc.c b/ext/standard/iptc.c
index fa17c95f3c..2df16daaac 100644
--- a/ext/standard/iptc.c
+++ b/ext/standard/iptc.c
@@ -285,8 +285,9 @@ PHP_FUNCTION(iptcembed)
fclose(fp);
if (spool < 2) {
-//??? RETVAL_STRINGL(spoolbuf, poi - spoolbuf, 0);
+ // TODO: avoid reallocation ???
RETVAL_STRINGL(spoolbuf, poi - spoolbuf);
+ efree(spoolbuf);
} else {
RETURN_TRUE;
}
diff --git a/ext/standard/quot_print.c b/ext/standard/quot_print.c
index 4e6b1f1e2e..aa3d256c3a 100644
--- a/ext/standard/quot_print.c
+++ b/ext/standard/quot_print.c
@@ -152,8 +152,7 @@ PHPAPI zend_string *php_quot_print_encode(const unsigned char *str, size_t lengt
char *hex = "0123456789ABCDEF";
zend_string *ret;
-//??? ret = safe_emalloc(3, length + (((3 * length)/(PHP_QPRINT_MAXL-9)) + 1), 1);
- ret = STR_ALLOC(3 * (length + (((3 * length)/(PHP_QPRINT_MAXL-9)) + 1)), 0);
+ ret = STR_SAFE_ALLOC(3, (length + (((3 * length)/(PHP_QPRINT_MAXL-9)) + 1)), 0, 0);
d = (unsigned char*)ret->val;
while (length--) {
diff --git a/ext/standard/scanf.c b/ext/standard/scanf.c
index 77f781c49b..3eb58e1837 100644
--- a/ext/standard/scanf.c
+++ b/ext/standard/scanf.c
@@ -866,7 +866,7 @@ literal:
current = &args[objIndex++];
zval_dtor(Z_REFVAL_P(current));
ZVAL_STRINGL(Z_REFVAL_P(current), string, end-string);
-// Z_SET_REFCOUNT_P(current, refcount);
+//??? Z_SET_REFCOUNT_P(current, refcount);
//??? Z_SET_ISREF_PP(current);
} else {
add_index_stringl(return_value, objIndex++, string, end-string);
diff --git a/ext/standard/streamsfuncs.c b/ext/standard/streamsfuncs.c
index 360c436be7..e668b973b4 100644
--- a/ext/standard/streamsfuncs.c
+++ b/ext/standard/streamsfuncs.c
@@ -156,7 +156,7 @@ PHP_FUNCTION(stream_socket_client)
if (zerrstr && errstr) {
/* no need to dup; we need to efree buf anyway */
zval_dtor(zerrstr);
-//??? ZVAL_STRING(zerrstr, errstr, 0);
+ // TODO: avoid reallocation ???
ZVAL_STRING(zerrstr, errstr);
efree(errstr);
} else if (errstr) {
@@ -224,8 +224,9 @@ PHP_FUNCTION(stream_socket_server)
if (zerrstr && errstr) {
/* no need to dup; we need to efree buf anyway */
zval_dtor(zerrstr);
-//??? ZVAL_STRING(zerrstr, errstr, 0);
+ // TODO: avoid reallocation ???
ZVAL_STRING(zerrstr, errstr);
+ efree(errstr);
} else if (errstr) {
efree(errstr);
}
@@ -283,8 +284,9 @@ PHP_FUNCTION(stream_socket_accept)
TSRMLS_CC) && clistream) {
if (peername) {
-//??? ZVAL_STRINGL(zpeername, peername, peername_len, 0);
+ // TODO: avoid reallocation ???
ZVAL_STRINGL(zpeername, peername, peername_len);
+ efree(peername);
}
php_stream_to_zval(clistream, return_value);
} else {
@@ -322,8 +324,9 @@ PHP_FUNCTION(stream_socket_get_name)
RETURN_FALSE;
}
-//??? RETURN_STRINGL(name, name_len, 0);
- RETURN_STRINGL(name, name_len);
+ // TODO: avoid reallocation ???
+ RETVAL_STRINGL(name, name_len);
+ efree(name);
}
/* }}} */
@@ -394,8 +397,9 @@ PHP_FUNCTION(stream_socket_recvfrom)
if (recvd >= 0) {
if (zremote) {
-//??? ZVAL_STRINGL(zremote, remote_addr, remote_addr_len, 0);
+ // TODO: avoid reallocation ???
ZVAL_STRINGL(zremote, remote_addr, remote_addr_len);
+ efree(remote_addr);
}
read_buf->val[recvd] = '\0';
read_buf->len = recvd;
@@ -1537,7 +1541,7 @@ PHP_FUNCTION(stream_resolve_include_path)
resolved_path = zend_resolve_path(filename, filename_len TSRMLS_CC);
if (resolved_path) {
-//??? RETURN_STRING(resolved_path, 0);
+ // TODO: avoid reallocation ???
RETVAL_STRING(resolved_path);
efree(resolved_path);
return;
diff --git a/ext/standard/string.c b/ext/standard/string.c
index 19a3fda93b..290fa21879 100644
--- a/ext/standard/string.c
+++ b/ext/standard/string.c
@@ -132,8 +132,7 @@ static zend_string *php_bin2hex(const unsigned char *old, const size_t oldlen)
zend_string *result;
size_t i, j;
-//??? result = (unsigned char *) safe_emalloc(oldlen, 2 * sizeof(char), 1);
- result = STR_ALLOC(oldlen * 2 * sizeof(char), 0);
+ result = STR_SAFE_ALLOC(oldlen, 2 * sizeof(char), 0, 0);
for (i = j = 0; i < oldlen; i++) {
result->val[j++] = hexconvtab[old[i] >> 4];
@@ -277,8 +276,9 @@ PHP_FUNCTION(hex2bin)
RETURN_FALSE;
}
-//??? RETURN_STRINGL(result, newlen, 0);
- RETURN_STRINGL(result, newlen);
+ // TODO: avoid reallocation ???
+ RETVAL_STRINGL(result, newlen);
+ efree(result);
}
/* }}} */
@@ -3566,8 +3566,12 @@ PHPAPI int php_char_to_str_ex(char *str, uint len, char from, char *to, int to_l
return 0;
}
- ZVAL_NEW_STR(result, STR_ALLOC(len + (char_count * (to_len - 1)), 0));
- target = Z_STRVAL_P(result); //??? = target = safe_emalloc(char_count, to_len, len + 1);
+ if (to_len > 0) {
+ ZVAL_NEW_STR(result, STR_SAFE_ALLOC(char_count, to_len - 1, len, 0));
+ } else {
+ ZVAL_NEW_STR(result, STR_ALLOC(len - char_count, 0));
+ }
+ target = Z_STRVAL_P(result);
if (case_sensitivity) {
char *p = str, *e = p + len, *s = str;
@@ -4265,13 +4269,12 @@ PHP_FUNCTION(nl2br)
Strips HTML and PHP tags from a string */
PHP_FUNCTION(strip_tags)
{
- char *buf;
+ zend_string *buf;
char *str;
zval *allow=NULL;
char *allowed_tags=NULL;
int allowed_tags_len=0;
int str_len;
- size_t retval_len;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|z", &str, &str_len, &allow) == FAILURE) {
return;
@@ -4284,11 +4287,9 @@ PHP_FUNCTION(strip_tags)
allowed_tags_len = Z_STRLEN_P(allow);
}
- buf = estrndup(str, str_len);
- retval_len = php_strip_tags_ex(buf, str_len, NULL, allowed_tags, allowed_tags_len, 0);
-//??? RETURN_STRINGL(buf, retval_len, 0);
- RETVAL_STRINGL(buf, retval_len);
- efree(buf);
+ buf = STR_INIT(str, str_len, 0);
+ buf->len = php_strip_tags_ex(buf->val, str_len, NULL, allowed_tags, allowed_tags_len, 0);
+ RETURN_STR(buf);
}
/* }}} */
@@ -4852,9 +4853,8 @@ PHP_FUNCTION(str_repeat)
RETURN_EMPTY_STRING();
/* Initialize the result string */
+ result = STR_SAFE_ALLOC(input_len, mult, 0, 0);
result_len = input_len * mult;
-//??? result = (char *)safe_emalloc(input_len, mult, 1);
- result = STR_ALLOC(result_len, 0);
/* Heavy optimization for situations where input string is 1 byte long */
if (input_len == 1) {
diff --git a/ext/standard/type.c b/ext/standard/type.c
index 69e3305ea9..3feac632d8 100644
--- a/ext/standard/type.c
+++ b/ext/standard/type.c
@@ -392,7 +392,7 @@ PHP_FUNCTION(is_callable)
}
retval = zend_is_callable_ex(var, NULL, check_flags, &name, NULL, &error TSRMLS_CC);
zval_dtor(callable_name);
- //??? is it necessary to be consistent with old PHP
+ //??? is it necessary to be consistent with old PHP ("\0" support)
name->len = strlen(name->val);
ZVAL_STR(callable_name, name);
} else {
diff --git a/ext/standard/uniqid.c b/ext/standard/uniqid.c
index ecaf6c0f5f..610fb2809c 100644
--- a/ext/standard/uniqid.c
+++ b/ext/standard/uniqid.c
@@ -81,7 +81,7 @@ PHP_FUNCTION(uniqid)
spprintf(&uniqid, 0, "%s%08x%05x", prefix, sec, usec);
}
-//??? RETURN_STRING(uniqid, 0);
+ // TODO: avoid reallocation ???
RETVAL_STRING(uniqid);
efree(uniqid);
}
diff --git a/ext/standard/var.c b/ext/standard/var.c
index 4aedbc83fe..3f669dbda1 100644
--- a/ext/standard/var.c
+++ b/ext/standard/var.c
@@ -193,7 +193,7 @@ again:
break;
}
case IS_REFERENCE:
-//??? hide references with refcount==1 (for compatibility)
+ //??? hide references with refcount==1 (for compatibility)
if (Z_REFCOUNT_P(struc) > 1) {
is_ref = 1;
}
@@ -359,7 +359,7 @@ head_done:
break;
}
case IS_REFERENCE:
-//??? hide references with refcount==1 (for compatibility)
+ //??? hide references with refcount==1 (for compatibility)
if (Z_REFCOUNT_P(struc) > 1) {
is_ref = 1;
}