com php-src: Pass class_entry through IS_VAR to avo id hash lookup in ZEND_NEW.: Zend/zend_compil e.c

From: Date: Mon, 27 Apr 2015 11:16:29 +0000
Subject: com php-src: Pass class_entry through IS_VAR to avo id hash lookup in ZEND_NEW.: Zend/zend_compil e.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-86493@lists.php.net to get a copy of this message
Commit: 8acd7f49dafa9b9743d2921b3f3e49503d9fe342 Author: Dmitry Stogov <dmitry@zend.com> Mon, 27 Apr 2015 14:16:29 +0300 Parents: 2a1b0b112129c947e24c0fd9243df88816adac42 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=8acd7f49dafa9b9743d2921b3f3e49503d9fe342 Log: Pass class_entry through IS_VAR to avoid hash lookup in ZEND_NEW. Changed paths: M Zend/zend_compile.c Diff: diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index c417067..ddd1346 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -3246,13 +3246,13 @@ void zend_compile_new(znode *result, zend_ast *ast) /* {{{ */ } else if (class_ast->kind == ZEND_AST_CLASS) { uint32_t dcl_opnum = get_next_op_number(CG(active_op_array)); zend_class_entry *ce = zend_compile_class_decl(class_ast); - class_node.op_type = IS_CONST; - ZVAL_STR_COPY(&class_node.u.constant, ce->name); /* jump over anon class declaration */ opline = &CG(active_op_array)->opcodes[dcl_opnum]; if (opline->opcode == ZEND_FETCH_CLASS) { opline++; } + class_node.op_type = opline->result_type; + class_node.u..op.var = opline->result.var; opline->op1.opline_num = get_next_op_number(CG(active_op_array)); } else { zend_compile_class_ref(&class_node, class_ast, 1);

« previous php.cvs (#86493) next »