com php-src: Small generator-related cleanups: Zend/zend_comp ile.c Zend/zend_opcode.c
| From: | Nikita Popov | Date: | Sat, 04 Jun 2016 11:27:11 +0000 |
| Subject: | com php-src: Small generator-related cleanups: Zend/zend_comp ile.c Zend/zend_opcode.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-92295@lists.php.net to get a copy of this message | ||
Commit: cb3825a8dc551e6a43b4ea3a01dbd0584bf606bb
Author: Nikita Popov <nikic@php.net> Sat, 4 Jun 2016 12:59:35 +0200
Parents: b7bb6d04fd829bc5e854e76f669316f8147e468a
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=cb3825a8dc551e6a43b4ea3a01dbd0584bf606bb
Log:
Small generator-related cleanups
Changed paths:
M Zend/zend_compile.c
M Zend/zend_opcode.c
Diff:
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c
index 4bb7126...9ebe966 100644
--- a/Zend/zend_compile.c
+++ b/Zend/zend_compile.c
@@ -3183,11 +3183,7 @@ ZEND_API zend_uchar zend_get_call_op(const zend_op *init_op, zend_function
*fbc)
}
} else {
if (zend_execute_ex == execute_ex) {
- if (!(fbc->common.fn_flags & ZEND_ACC_GENERATOR)) {
- return ZEND_DO_UCALL;
- } else {
- return ZEND_DO_FCALL_BY_NAME;
- }
+ return ZEND_DO_UCALL;
}
}
} else if (zend_execute_ex == execute_ex &&
diff --git a/Zend/zend_opcode.c b/Zend/zend_opcode.c
index 0b5fe75..91787aa 100644
--- a/Zend/zend_opcode.c
+++ b/Zend/zend_opcode.c
@@ -642,19 +642,6 @@ ZEND_API int pass_two(zend_op_array *op_array)
/* absolute index to relative offset */
opline->extended_value = ZEND_OPLINE_NUM_TO_OFFSET(op_array, opline,
opline->extended_value);
break;
- case ZEND_VERIFY_RETURN_TYPE:
- if (op_array->fn_flags & ZEND_ACC_GENERATOR) {
- if (opline->op1_type != IS_UNUSED) {
- zend_op *ret = opline;
- do ret++; while (ret->opcode != ZEND_RETURN);
-
- ret->op1 = opline->op1;
- ret->op1_type = opline->op1_type;
- }
-
- MAKE_NOP(opline);
- }
- break;
case ZEND_RETURN:
case ZEND_RETURN_BY_REF:
if (op_array->fn_flags & ZEND_ACC_GENERATOR) {