summaryrefslogtreecommitdiff
path: root/Zend/zend_compile.c
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2014-09-22 10:26:17 +0200
committerAnatol Belski <ab@php.net>2014-09-22 10:26:17 +0200
commit6bb530d1eba583143efda0b4f49e43cb6d6fb203 (patch)
tree75f5432eac05df91defaf2f530efd08eb4796605 /Zend/zend_compile.c
parent403709aaf46f2fe563df4d9f238528428287eb92 (diff)
parent065edced71c7f15f32fc2fb483a9048328b8108e (diff)
downloadphp-git-6bb530d1eba583143efda0b4f49e43cb6d6fb203.tar.gz
Merge remote-tracking branch 'origin/master' into native-tls
* origin/master: (24 commits) added a comment fix the REPARSE_DATA_BUFFER struct def simplify the condition Fix two memory errors by interning earlier Add smart_str_append for appending zend_strings Rename smart_str_append to smart_str_append_smart_str Use smart_str for exception stack traces Use smart_str in get_function_declaration Move smart_str implementation into Zend/ UPGRADING for Integer Semantics Fixed bug #66242 (don't assume char is signed) Fixed bug #67633 Fixed if/else if ordering Use SIZEOF_ZEND_LONG instead of SIZEOF_LONG Use zend_ polyfilled nan/finite, check finite Updated 32-bit << test Updated << 64-bit tests Prevent bit shift count wrapping quirkiness on some CPUs for left shift Cast NaN and Infinity to zero Updated >> 64-bit tests ...
Diffstat (limited to 'Zend/zend_compile.c')
-rw-r--r--Zend/zend_compile.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c
index 0b114552cc..b88f329eaf 100644
--- a/Zend/zend_compile.c
+++ b/Zend/zend_compile.c
@@ -128,7 +128,7 @@ static zend_string *zend_build_runtime_definition_key(zend_string *name, unsigne
/* NULL, name length, filename length, last accepting char position length */
result = zend_string_alloc(1 + name->len + filename_len + char_pos_len, 0);
sprintf(result->val, "%c%s%s%s", '\0', name->val, filename, char_pos_buf);
- return result;
+ return zend_new_interned_string(result TSRMLS_CC);
}
/* }}} */
@@ -3409,6 +3409,10 @@ void zend_compile_foreach(zend_ast *ast TSRMLS_DC) /* {{{ */
zend_compile_expr(&expr_node, expr_ast TSRMLS_CC);
}
+ if (by_ref) {
+ zend_separate_if_call_and_write(&expr_node, expr_ast, BP_VAR_W TSRMLS_CC);
+ }
+
opnum_reset = get_next_op_number(CG(active_op_array));
opline = zend_emit_op(&reset_node, ZEND_FE_RESET, &expr_node, NULL TSRMLS_CC);
if (by_ref && is_variable) {
@@ -4856,6 +4860,7 @@ void zend_compile_const_decl(zend_ast *ast TSRMLS_DC) /* {{{ */
}
name = zend_prefix_with_ns(name TSRMLS_CC);
+ name = zend_new_interned_string(name TSRMLS_CC);
if (CG(current_import_const)
&& (import_name = zend_hash_find_ptr(CG(current_import_const), name))