com php-src: CT bind args before unpack: Zend/zend_compile. c

From: Date: Tue, 22 Jul 2014 18:41:45 +0000
Subject: com php-src: CT bind args before unpack: Zend/zend_compile. c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-80959@lists.php.net to get a copy of this message
Commit: f21d8bc23b11d016bc56382538c7b4faea318eff Author: Nikita Popov <nikic@php.net> Tue, 22 Jul 2014 20:41:45 +0200 Parents: 1859674061615f0f925c17f31c5953b5e727994f Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=f21d8bc23b11d016bc56382538c7b4faea318eff Log: CT bind args before unpack Changed paths: M Zend/zend_compile.c Diff: diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index cc89a22..a20e24c 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -4139,6 +4139,7 @@ zend_uint zend_compile_args(zend_ast *args, zend_function *fbc TSRMLS_DC) { if (arg->kind == ZEND_AST_UNPACK) { uses_arg_unpack = 1; + fbc = NULL; zend_compile_expr(&arg_node, arg->child[0] TSRMLS_CC); opline = emit_op(NULL, ZEND_SEND_UNPACK, &arg_node, NULL TSRMLS_CC); @@ -4303,12 +4304,6 @@ void zend_compile_call(znode *result, zend_ast *ast, int type TSRMLS_DC) { } } - /* Arg unpacking needs EX(call), so don't try to optimize it away */ - if (zend_args_contain_unpack(args_ast)) { - zend_compile_dynamic_call(result, &name_node, args_ast TSRMLS_CC); - return; - } - { zval *name = &name_node.u.constant; zend_string *lcname = STR_ALLOC(Z_STRLEN_P(name), 0); @@ -4316,6 +4311,7 @@ void zend_compile_call(znode *result, zend_ast *ast, int type TSRMLS_DC) { zend_op *opline; zend_str_tolower_copy(lcname->val, Z_STRVAL_P(name), Z_STRLEN_P(name)); + if (!(fbc = zend_hash_find_ptr(CG(function_table), lcname)) || ((CG(compiler_options) & ZEND_COMPILE_IGNORE_INTERNAL_FUNCTIONS) && fbc->type == ZEND_INTERNAL_FUNCTION)

« previous php.cvs (#80959) next »