diff options
author | Anatol Belski <ab@php.net> | 2014-11-18 21:18:52 +0100 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2014-11-18 21:18:52 +0100 |
commit | c6bad96f306df8e8b656472e618283ced5083cdb (patch) | |
tree | 7e5b52aa07777f0336b0944a228bf66f8f56b31f /Zend/zend_compile.c | |
parent | 4262663e4caa82ba17666781a95bdcb872b4e109 (diff) | |
parent | 64a39dc7b07d4b54d050a3a5c15045fe91c0b651 (diff) | |
download | php-git-c6bad96f306df8e8b656472e618283ced5083cdb.tar.gz |
Merge remote-tracking branch 'origin/master' into native-tls
* origin/master: (398 commits)
NEWS
add test for bug #68381
Fixed bug #68381 Set FPM log level earlier during init
proper dllexport
move to size_t where zend_string is used internally
fix some datatype mismatches
return after the warning, to fix uninitialized salt usage
fix datatype mismatches
add missing type specifier
fix datatype mismatches
fix unsigned check
"extern" shouldn't be used for definitions
joined identical conditional blocks
simplify fpm tests
SEND_VAR_NO_REF optimization
Add test for bug #68442
Add various tests for FPM - covering recent bugs (68420, 68421, 68423, 68428) - for UDS - for ping and status URI - for multi pool and multi mode
Include small MIT FastCGI client library from https://github.com/adoy/PHP-FastCGI-Client
Get rid of zend_free_op structure (use zval* instead). Get rid of useless TSRMLS arguments.
Add new FPM test for IPv4/IPv6
...
Conflicts:
win32/build/config.w32
Diffstat (limited to 'Zend/zend_compile.c')
-rw-r--r-- | Zend/zend_compile.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index c72a972007..b7ed0980b3 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -2109,7 +2109,8 @@ static zend_op *zend_delayed_compile_prop(znode *result, zend_ast *ast, uint32_t zend_compile_expr(&prop_node, prop_ast TSRMLS_CC); opline = zend_delayed_emit_op(result, ZEND_FETCH_OBJ_R, &obj_node, &prop_node TSRMLS_CC); - if (opline->op2_type == IS_CONST && Z_TYPE(CONSTANT(opline->op2.constant)) == IS_STRING) { + if (opline->op2_type == IS_CONST) { + convert_to_string(&CONSTANT(opline->op2.constant)); zend_alloc_polymorphic_cache_slot(opline->op2.constant TSRMLS_CC); } @@ -2477,7 +2478,12 @@ uint32_t zend_compile_args(zend_ast *ast, zend_function *fbc TSRMLS_DC) /* {{{ * if (fbc) { flags |= ZEND_ARG_COMPILE_TIME_BOUND; } - opline->extended_value = flags; + if ((flags & ZEND_ARG_COMPILE_TIME_BOUND) && !(flags & ZEND_ARG_SEND_BY_REF)) { + opline->opcode = ZEND_SEND_VAR; + opline->extended_value = ZEND_ARG_COMPILE_TIME_BOUND; + } else { + opline->extended_value = flags; + } } else if (fbc) { opline->extended_value = ZEND_ARG_COMPILE_TIME_BOUND; } @@ -2984,9 +2990,7 @@ void zend_compile_global_var(zend_ast *ast TSRMLS_DC) /* {{{ */ zend_compile_expr(&name_node, name_ast TSRMLS_CC); if (name_node.op_type == IS_CONST) { - if (Z_TYPE(name_node.u.constant) != IS_STRING) { - convert_to_string(&name_node.u.constant); - } + convert_to_string(&name_node.u.constant); } if (zend_try_compile_cv(&result, var_ast TSRMLS_CC) == SUCCESS) { @@ -4639,6 +4643,8 @@ static HashTable *zend_get_import_ht(uint32_t type TSRMLS_DC) /* {{{ */ return CG(current_import_const); EMPTY_SWITCH_DEFAULT_CASE() } + + return NULL; } /* }}} */ @@ -4653,6 +4659,8 @@ static char *zend_get_use_type_str(uint32_t type) /* {{{ */ return " const"; EMPTY_SWITCH_DEFAULT_CASE() } + + return " unknown"; } /* }}} */ @@ -5465,7 +5473,7 @@ void zend_compile_isset_or_empty(znode *result, zend_ast *ast TSRMLS_DC) /* {{{ zend_ast *var_ast = ast->child[0]; znode var_node; - zend_op *opline; + zend_op *opline = NULL; ZEND_ASSERT(ast->kind == ZEND_AST_ISSET || ast->kind == ZEND_AST_EMPTY); |