com php-src: Make ZEND_ECHO and removed ZEND_PRINT distinguishable: Zend/zend_compile.c Zend/zend_comp ile.h

From: Date: Tue, 29 Sep 2015 13:50:15 +0000
Subject: com php-src: Make ZEND_ECHO and removed ZEND_PRINT distinguishable: Zend/zend_compile.c Zend/zend_comp ile.h
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-89217@lists.php.net to get a copy of this message
Commit: df2ff75116dc96d542aa7631028b09954faa4fea Author: Xinchen Hui <laruence@gmail.com> Tue, 29 Sep 2015 21:49:22 +0800 Parents: 27d4d32e6bd4c6ff2f65d162e9478671348764f4 Branches: PHP-7.0 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=df2ff75116dc96d542aa7631028b09954faa4fea Log: Make ZEND_ECHO and removed ZEND_PRINT distinguishable Changed paths: M Zend/zend_compile.c M Zend/zend_compile.h Diff: diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 8e9f541..4886fcc 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -3612,12 +3612,14 @@ void zend_compile_return(zend_ast *ast) /* {{{ */ void zend_compile_echo(zend_ast *ast) /* {{{ */ { + zend_op *opline; zend_ast *expr_ast = ast->child[0]; znode expr_node; zend_compile_expr(&expr_node, expr_ast); - zend_emit_op(NULL, ZEND_ECHO, &expr_node, NULL); + opline = zend_emit_op(NULL, ZEND_ECHO, &expr_node, NULL); + opline->extended_value = ZEND_ECHO; } /* }}} */ @@ -6214,12 +6216,14 @@ void zend_compile_coalesce(znode *result, zend_ast *ast) /* {{{ */ void zend_compile_print(znode *result, zend_ast *ast) /* {{{ */ { + zend_op *opline; zend_ast *expr_ast = ast->child[0]; znode expr_node; zend_compile_expr(&expr_node, expr_ast); - zend_emit_op(NULL, ZEND_ECHO, &expr_node, NULL); + opline = zend_emit_op(NULL, ZEND_ECHO, &expr_node, NULL); + opline->extended_value = ZEND_PRINT; result->op_type = IS_CONST; ZVAL_LONG(&result->u.constant, 1); diff --git a/Zend/zend_compile.h b/Zend/zend_compile.h index f6283fb..3a03041 100644 --- a/Zend/zend_compile.h +++ b/Zend/zend_compile.h @@ -954,9 +954,10 @@ static zend_always_inline int zend_check_arg_send_type(const zend_function *zf, #define ZEND_ARRAY_SIZE_SHIFT 2 /* Pseudo-opcodes that are used only temporarily during compilation */ -#define ZEND_GOTO 253 -#define ZEND_BRK 254 -#define ZEND_CONT 255 +#define ZEND_PRINT 252 +#define ZEND_GOTO 253 +#define ZEND_BRK 254 +#define ZEND_CONT 255 END_EXTERN_C()

« previous php.cvs (#89217) next »