Skip to content

Commit 297a323

Browse files
committed
zend_compile: Use zend_set_class_name_op1() in zend_compile_new()
1 parent 191ae5e commit 297a323

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

Zend/zend_compile.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5491,13 +5491,10 @@ static void zend_compile_new(znode *result, zend_ast *ast) /* {{{ */
54915491

54925492
opline = zend_emit_op(result, ZEND_NEW, NULL, NULL);
54935493

5494-
if (class_node.op_type == IS_CONST) {
5495-
opline->op1_type = IS_CONST;
5496-
opline->op1.constant = zend_add_class_name_literal(
5497-
Z_STR(class_node.u.constant));
5494+
zend_set_class_name_op1(opline, &class_node);
5495+
5496+
if (opline->op1_type == IS_CONST) {
54985497
opline->op2.num = zend_alloc_cache_slot();
5499-
} else {
5500-
SET_NODE(opline->op1, &class_node);
55015498
}
55025499

55035500
zend_compile_call_common(&ctor_result, args_ast, NULL, ast->lineno);

0 commit comments

Comments
 (0)